Documentation

API reference, guides, and best practices for the Lionfish Compliance Platform

Authentication
GET/api/trpc/auth.me
POST/api/trpc/auth.logout
Clients
GET/api/trpc/clients.list
GET/api/trpc/clients.getById
POST/api/trpc/clients.create
POST/api/trpc/clients.update
POST/api/trpc/clients.delete
Compliance Frameworks
GET/api/trpc/compliance.listFrameworks
GET/api/trpc/compliance.getFramework
GET/api/trpc/compliance.getControls
GET/api/trpc/compliance.getControlDetail
Assessments
GET/api/trpc/assessments.list
POST/api/trpc/assessments.create
POST/api/trpc/assessments.updateStatus
GET/api/trpc/assessments.getScore
Evidence
GET/api/trpc/evidence.list
POST/api/trpc/evidence.upload
POST/api/trpc/evidence.approve
POST/api/trpc/evidence.reject
Reports
POST/api/trpc/stakeholderReports.generate
GET/api/trpc/stakeholderReports.list
GET/api/trpc/stakeholderReports.getById
Risk Management
GET/api/trpc/risks.list
POST/api/trpc/risks.create
POST/api/trpc/risks.update
GET/api/trpc/risks.getMatrix
Usage Example
Example of calling the API using tRPC client
// Using tRPC React hooks
import { trpc } from "@/lib/trpc";

function MyComponent() {
  // Query example
  const { data: clients, isLoading } = trpc.clients.list.useQuery();
  
  // Mutation example
  const createClient = trpc.clients.create.useMutation({
    onSuccess: () => {
      toast.success("Client created successfully");
    },
  });
  
  const handleCreate = () => {
    createClient.mutate({
      name: "New Client",
      industry: "Technology",
    });
  };
  
  return (
    <div>
      {clients?.map(client => (
        <div key={client.id}>{client.name}</div>
      ))}
    </div>
  );
}