Clarus is an AI powered legal assistant for Swedish employment and immigration topics. It provides a chat experience, guided workflows, and a document analysis placeholder to help users understand common scenarios and next steps.
Navigating Swedish employment and immigration law can be overwhelming. Legal information is often scattered, dense, and difficult to interpret without expertise.
Clarus aims to democratize access to legal information by making Swedish employment and immigration guidance accessible, understandable, and actionable.
Clarus helps users understand their options, navigate common legal processes, and prepare for next steps related to work permits and employment changes.
- Chat mode with streaming responses
- Guided workflows for common scenarios
- Session history for guided workflows
- Document analysis placeholder that returns a summary and suggested questions
- Clerk based sign in and sign out
- Frontend: TypeScript, React, Vite, Tailwind CSS
- Backend: Convex functions and database
- AI and LLM: Google Gemini via the AI SDK in Convex actions
- Authentication: Clerk
- UI calls Convex queries, mutations, and actions directly via
useQuery,useMutation, anduseAction - Convex auth is integrated with Clerk using
ConvexProviderWithClerkandconvex/auth.config.ts - Streaming chat uses the Convex HTTP route
/chat/stream - Guided workflows are defined in
frontend/convex/workflows.ts - Guided sessions are stored in the
guidedSessionstable - Document analysis is a stub in
frontend/convex/documents.ts
Frontend:
VITE_CLERK_PUBLISHABLE_KEYClerk publishable keyVITE_CONVEX_URLConvex deployment URL, defaulthttp://localhost:3210VITE_CONVEX_SITE_URLOptional Convex site URL used for streaming endpoint
Convex backend:
GEMINI_API_KEYRequired for chat responsesGEMINI_MODELOptional, defaultgemini-3-flash-previewCLERK_JWT_ISSUER_DOMAINRequired Clerk issuer domain for Convex authCLIENT_ORIGINOptional CORS origin for streaming endpoint, defaulthttp://localhost:5173
From the repository root:
cd frontend
npm install
npm run devIn another terminal:
cd frontend
npm run dev:convexcd frontend
npm run build
npm run previewfrontend/React app and Convex backendsrc/UI pages and componentsconvex/Convex actions, queries, mutations, and schema
docs/Internal notes and sandbox reviewdocker-compose.ymlLegacy reference to a backend directory not included here
- Document analysis is a placeholder and does not parse files yet
- Chat citations are not implemented
Clarus provides informational guidance only and does not constitute legal advice. Users should consult qualified legal professionals for their specific situations.