How basava2005/sathyagraha_ai works
DocuManage is a legal-document hub whose main user workflow is to sign in, choose or fill a template, and manage or export a generated document; separate routes support document analysis, legal chat, and administration. The graph distinguishes the React experience, API/authentication, domain services, and persistence. Several page and route implementations were not sampled, so their documented capabilities are represented without guessing their internal call chains.
Main entry points: App.tsx Application router · routes.ts HTTP API routes · storage.ts Database storage · queryClient.ts API query client
Components 22
Client experience
- Application router
client/src/App.tsx - Sign-in and account
client/src/pages/auth-page.tsx - Template workflow
client/src/pages/template-form.tsx - Document management
client/src/pages/documents.tsx - User dashboard
client/src/pages/dashboard.tsx - Document analyzer
client/src/pages/fir-analyzer.tsx - Legal consultation
client/src/pages/consultation.tsx - Admin console
client/src/pages/admin - API query client
client/src/lib/queryClient.ts - Client auth state
client/src/hooks/use-auth.tsx
API and access
- HTTP API routes
server/routes.ts - Session authentication
server/auth.ts
Legal services
- Template and document service
server/routes.ts - PDF generation
server/pdf-generator.ts - Legal text analysis
server/routes.ts - LLM legal chat
server/routes.ts - Admin operations
server/routes.ts
Persistence
- Database storage
server/storage.ts - Domain schema
shared/schema.ts - PostgreSQL
server/db.ts
Other components
- User
- Configured LLM endpoint
Connections 23
- User → Application router: uses
client/src/App.tsx - Application router → API query client: provides queries
client/src/App.tsx - Application router → Sign-in and account: routes to
client/src/App.tsx - Application router → Template workflow: routes to
client/src/App.tsx - Application router → Document management: routes to
client/src/App.tsx - Application router → User dashboard: routes to
client/src/App.tsx - Application router → Document analyzer: routes to
client/src/App.tsx - Application router → Legal consultation: routes to
client/src/App.tsx - Application router → Admin console: routes to
client/src/App.tsx - Application router → Client auth state: provides auth
client/src/App.tsx - Client auth state → API query client: requests API
client/src/hooks/use-auth.tsx - API query client → HTTP API routes: sends requests
- HTTP API routes → Session authentication: sets up auth
server/routes.ts - HTTP API routes → Database storage: reads and writes
server/routes.ts - HTTP API routes → PDF generation: generates PDF
server/routes.ts - HTTP API routes → Configured LLM endpoint: sends chat request
server/routes.ts - HTTP API routes → Legal text analysis: handles analysis
server/routes.ts - HTTP API routes → Admin operations: handles admin
server/routes.ts - Session authentication → Database storage: loads users
server/auth.ts - Database storage → PostgreSQL: queries
server/storage.ts - Database storage → Domain schema: uses types
server/storage.ts - Document analyzer → Legal text analysis: posts analysis
README.md - Legal consultation → LLM legal chat: uses chat