How bhavya-durgani/cs26020-codesarthi works
CodeSarthi is a visual backend workflow builder and execution engine. Developers create projects and workflows, edit connected nodes on the canvas, test and publish gateway endpoints, monitor activity, and export standalone backend code. The graph includes the documented AI synthesis, service mesh, analytics, and GitHub export capabilities; some are represented at their existing route or page paths because their implementation was not sampled. Edges are limited to source-index references, shown calls, or README relationships.
Main entry points: gateway.ts Gateway execution · scheduler.ts Workflow scheduler · db.ts PostgreSQL data · exporter.ts Export routes
Components 34
Workflow workspace
- Workflow canvas
frontend/src/app/projects/[id]/builder/page.tsx - Canvas nodes
frontend/src/components/customNodes.tsx - Node controls
frontend/src/components/CustomSelect.tsx - API client
frontend/src/services/api.ts - Project dashboard
frontend/src/app/dashboard/page.tsx - Service mesh view
frontend/src/app/projects/[id]/services/page.tsx - Analytics view
frontend/src/app/projects/[id]/analytics/page.tsx - Live monitor
frontend/src/app/projects/[id]/monitor/page.tsx
API and project management
- Authentication routes
backend/src/routes/auth.ts - Authentication logic
backend/src/controllers/auth.ts - Authentication guard
backend/src/middlewares/auth.ts - Project routes
backend/src/routes/projects.ts - Workflow routes
backend/src/routes/workflows.ts - Service routes
backend/src/routes/services.ts - Service management
backend/src/controllers/services.ts - AI workflow routes
backend/src/routes/ai.ts - AI synthesis
backend/src/services/ai.ts
Execution and monitoring
- Analytics routes
backend/src/routes/analytics.ts - Analytics logic
backend/src/controllers/analytics.ts - Gateway execution
backend/src/routes/gateway.ts - Workflow sandbox
backend/src/services/sandbox.ts - DAG utilities
backend/src/services/dag.ts - Workflow cache
backend/src/services/cache.ts - Secrets and tokens
backend/src/services/crypto.ts - Execution logging
backend/src/services/logger.ts - Workflow scheduler
backend/src/services/scheduler.ts - Live event server
backend/src/websocket.ts - PostgreSQL data
backend/src/services/db.ts
Compilation and export
- Export routes
backend/src/routes/exporter.ts - Export queue
backend/src/queue/exportQueue.ts - Export worker
backend/src/queue/worker.ts - Compilation processor
backend/src/queue/processor.ts - Backend compiler
backend/src/services/compiler.ts
Other components
- Developer
Connections 43
- Developer → Workflow canvas: designs workflows
README.md - Workflow canvas → Canvas nodes: renders nodes
frontend/src/app/projects/[id]/builder/page.tsx - Workflow canvas → Node controls: uses controls
frontend/src/app/projects/[id]/builder/page.tsx - Workflow canvas → API client: calls API
frontend/src/app/projects/[id]/builder/page.tsx - Project dashboard → API client: calls API
frontend/src/app/dashboard/page.tsx - Service mesh view → API client: calls API
frontend/src/app/projects/[id]/services/page.tsx - Analytics view → API client: requests analytics
- Live monitor → Live event server: streams metrics
README.md - API client → Authentication routes: sends auth requests
- Authentication routes → Authentication logic: dispatches
backend/src/routes/auth.ts - Authentication routes → Authentication guard: guards routes
backend/src/routes/auth.ts - Authentication logic → PostgreSQL data: reads and writes
backend/src/controllers/auth.ts - Service routes → Service management: dispatches
backend/src/routes/services.ts - Service management → PostgreSQL data: reads and writes
backend/src/controllers/services.ts - Service management → Workflow cache: invalidates cache
backend/src/controllers/services.ts - Service management → Secrets and tokens: encrypts keys
backend/src/controllers/services.ts - AI workflow routes → Authentication guard: guards routes
backend/src/routes/ai.ts - AI workflow routes → AI synthesis: delegates synthesis
backend/src/routes/ai.ts - Analytics routes → Authentication guard: guards routes
backend/src/routes/analytics.ts - Analytics routes → Analytics logic: dispatches
backend/src/routes/analytics.ts - Gateway execution → PostgreSQL data: loads workflows
backend/src/routes/gateway.ts - Gateway execution → Workflow sandbox: executes workflows
backend/src/routes/gateway.ts - Gateway execution → DAG utilities: uses DAG logic
backend/src/routes/gateway.ts - Gateway execution → Workflow cache: uses cache
backend/src/routes/gateway.ts - Gateway execution → Secrets and tokens: uses secrets
backend/src/routes/gateway.ts - Gateway execution → Execution logging: records execution
backend/src/routes/gateway.ts - Workflow scheduler → PostgreSQL data: reads workflows
backend/src/services/scheduler.ts - Workflow scheduler → Workflow sandbox: executes workflows
backend/src/services/scheduler.ts - Workflow scheduler → DAG utilities: uses DAG logic
backend/src/services/scheduler.ts - Workflow scheduler → Secrets and tokens: uses secrets
backend/src/services/scheduler.ts - Workflow scheduler → Execution logging: records execution
backend/src/services/scheduler.ts - Export routes → Authentication guard: guards routes
backend/src/routes/exporter.ts - Export routes → Export queue: queues export
backend/src/routes/exporter.ts - Export routes → PostgreSQL data: reads export data
backend/src/routes/exporter.ts - Export routes → Backend compiler: previews output
backend/src/routes/exporter.ts - Export queue → Compilation processor: processes jobs
backend/src/queue/exportQueue.ts - Export worker → Compilation processor: runs jobs
backend/src/queue/worker.ts - Compilation processor → PostgreSQL data: loads project
backend/src/queue/processor.ts - Compilation processor → Backend compiler: compiles project
backend/src/queue/processor.ts - Compilation processor → Secrets and tokens: decrypts credentials
backend/src/queue/processor.ts - Developer → Service mesh view: maps services
README.md - Developer → Analytics view: reviews analytics
README.md - Developer → Export routes: requests export
README.md