How jinay-bhatt/backend-api works
JBSnap is a visual backend-workflow builder: developers create projects, design and test API pipelines, then monitor executions and export deployable code. Its major branches include AI-assisted workflow generation, service-mesh configuration, analytics/live monitoring, and account management. The README documents these capabilities; sampled backend and frontend files confirm the server setup, gateway execution dependencies, export worker, service configuration, and API client. Several feature implementations were not sampled, so their internal call relationships are omitted.
Main entry points: index.ts Fastify API Server · api.ts Frontend API Client · gateway.ts Gateway Execution · processor.ts Export Processor
Components 28
Workspace and Identity
- Project Dashboard
frontend/src/app/dashboard/page.tsx - Sign-in and Registration
frontend/src/app/login/page.tsx - Authentication
backend/src/controllers/auth.ts - Project Management
backend/src/controllers/projects.ts
Workflow Design and Runtime
- Visual Workflow Builder
frontend/src/app/projects/[id]/builder/page.tsx - Workflow Nodes
frontend/src/components/customNodes.tsx - Workflow Management
backend/src/controllers/workflows.ts - Gateway Execution
backend/src/routes/gateway.ts - DAG Ordering
backend/src/services/dag.ts - Code Sandbox
backend/src/services/sandbox.ts - AI Workflow Synthesis
backend/src/services/ai.ts
Monitoring and Services
- Analytics and Logs
backend/src/controllers/analytics.ts - Live Monitor
frontend/src/app/projects/[id]/monitor/page.tsx - Live WebSocket
backend/src/websocket.ts - Service Mesh Workspace
frontend/src/app/projects/[id]/services/page.tsx - Service Registry
backend/src/controllers/services.ts
Compilation and Export
- Backend Compiler
backend/src/services/compiler.ts - Export Workspace
frontend/src/app/projects/[id]/export/page.tsx - Export Queue
backend/src/queue/exportQueue.ts - Export Worker
backend/src/queue/worker.ts - Export Processor
backend/src/queue/processor.ts - GitHub Integration
backend/src/services/github.ts
Platform Core
- Frontend API Client
frontend/src/services/api.ts - Fastify API Server
backend/src/index.ts - PostgreSQL Database
backend/src/services/db.ts - Workflow Cache
backend/src/services/cache.ts - Security Middleware
backend/src/middleware/security.ts
Other components
- Developer
Connections 38
- Developer → Project Dashboard: manages projects
README.md - Developer → Sign-in and Registration: signs in
README.md - Project Dashboard → Frontend API Client: requests data
frontend/src/app/dashboard/page.tsx - Sign-in and Registration → Frontend API Client: authenticates through
frontend/src/app/login/page.tsx - Frontend API Client → Fastify API Server: calls API
frontend/src/services/api.ts - Fastify API Server → Authentication: registers routes
backend/src/index.ts - Fastify API Server → Project Management: registers routes
backend/src/index.ts - Fastify API Server → Workflow Management: registers routes
backend/src/index.ts - Fastify API Server → Gateway Execution: registers routes
backend/src/index.ts - Fastify API Server → Service Registry: registers routes
backend/src/index.ts - Fastify API Server → Analytics and Logs: registers routes
backend/src/index.ts - Visual Workflow Builder → Frontend API Client: saves workflows
frontend/src/app/projects/[id]/builder/page.tsx - Visual Workflow Builder → Workflow Nodes: renders nodes
frontend/src/app/projects/[id]/builder/page.tsx - Developer → Visual Workflow Builder: designs pipelines
README.md - Developer → AI Workflow Synthesis: describes workflow
README.md - Developer → Gateway Execution: tests and invokes
README.md - Gateway Execution → PostgreSQL Database: loads workflow data
backend/src/routes/gateway.ts - Gateway Execution → DAG Ordering: orders steps
backend/src/routes/gateway.ts - Gateway Execution → Code Sandbox: executes code
backend/src/routes/gateway.ts - Gateway Execution → Workflow Cache: uses cache
backend/src/routes/gateway.ts - Developer → Live Monitor: monitors runs
README.md - Live Monitor → Frontend API Client: requests metrics
README.md - Developer → Service Mesh Workspace: maps services
README.md - Service Mesh Workspace → Frontend API Client: configures services
README.md - Service Registry → PostgreSQL Database: persists configuration
backend/src/controllers/services.ts - Service Registry → Workflow Cache: invalidates workflows
backend/src/controllers/services.ts - Developer → Export Workspace: exports backend
README.md - Export Workspace → Frontend API Client: requests export
README.md - Fastify API Server → Export Queue: initializes queue
backend/src/index.ts - Export Queue → Export Processor: dispatches jobs
backend/src/queue/exportQueue.ts - Fastify API Server → Export Worker: starts worker
backend/src/index.ts - Export Worker → Export Processor: processes jobs
backend/src/queue/worker.ts - Export Processor → Backend Compiler: compiles project
backend/src/queue/processor.ts - Export Processor → GitHub Integration: publishes code
backend/src/queue/processor.ts - Export Processor → PostgreSQL Database: loads project data
backend/src/queue/processor.ts - Fastify API Server → Live WebSocket: initializes socket
backend/src/index.ts - Fastify API Server → Security Middleware: registers hooks
backend/src/index.ts - Live Monitor → Live WebSocket: streams execution data
README.md