How nipuana/teflow_backend works
Teflow is a team-collaboration backend exposing an Express REST API. The documented user workflow enters through the versioned API, authenticates a session, then manages organizations, projects, tasks, and notifications; billing and outbound integrations are additional product capabilities. Domain services and repositories provide the internal application and persistence layers. Edges are limited to relationships shown in the README, excerpts, or SOURCE INDEX; unsampled details are not inferred.
Main entry points: index.ts Versioned API · orgs.service.ts Organizations and roles · auth.service.ts Accounts and sessions · notifications.service.ts Notifications
Components 24
API entry
- Express app
src/app.ts - Versioned API
src/api/v1/index.ts
Identity and access
- Accounts and sessions
src/modules/auth/auth.service.ts - Auth repository
src/modules/auth/auth.repository.ts - Auth controller
src/modules/auth/auth.controller.ts - Token authentication
src/shared/middleware/auth.ts
Team and work
- Organizations and roles
src/modules/orgs/orgs.service.ts - Organization repository
src/modules/orgs/orgs.repository.ts - Organization controller
src/modules/orgs/orgs.controller.ts - Projects
src/modules/projects/projects.service.ts - Project repository
src/modules/projects/projects.repository.ts - Project controller
src/modules/projects/projects.controller.ts - Tasks and attachments
src/modules/tasks/tasks.service.ts - Task repository
src/modules/tasks/tasks.repository.ts - Task controller
src/modules/tasks/tasks.controller.ts
Product capabilities
- Notifications
src/modules/notifications/notifications.service.ts - Notification repository
src/modules/notifications/notifications.repository.ts - Billing
src/modules/billing/billing.service.ts - Outbound integrations
src/modules/integrations/integrations.service.ts
Shared platform
- Database adapter
src/shared/adapters/db.ts - File storage
src/shared/adapters/fileStorage.ts - Outbound HTTP adapter
src/shared/adapters/outboundHttp.ts - Runtime configuration
src/shared/config/index.ts
Other components
- Teflow web client
Connections 34
- Teflow web client → Express app: sends requests
- Express app → Versioned API: mounts API
src/app.ts - Versioned API → Auth controller: routes requests
src/api/v1/index.ts - Versioned API → Organization controller: routes requests
src/api/v1/index.ts - Versioned API → Project controller: routes requests
src/api/v1/index.ts - Versioned API → Task controller: routes requests
src/api/v1/index.ts - Versioned API → Billing: exposes routes
src/api/v1/index.ts - Versioned API → Outbound integrations: exposes routes
src/api/v1/index.ts - Versioned API → Notifications: exposes routes
src/api/v1/index.ts - Auth controller → Accounts and sessions: calls service
src/modules/auth/auth.controller.ts - Accounts and sessions → Auth repository: uses repository
src/modules/auth/auth.service.ts - Auth repository → Database adapter: uses adapter
src/modules/auth/auth.repository.ts - Accounts and sessions → Organizations and roles: creates organization
src/modules/auth/auth.service.ts - Accounts and sessions → Notifications: emits notification
src/modules/auth/auth.service.ts - Accounts and sessions → File storage: stores avatar
src/modules/auth/auth.service.ts - Accounts and sessions → Outbound HTTP adapter: fetches avatar URL
src/modules/auth/auth.service.ts - Organization controller → Organizations and roles: calls service
src/modules/orgs/orgs.controller.ts - Organizations and roles → Organization repository: uses repository
src/modules/orgs/orgs.service.ts - Organizations and roles → Auth repository: uses repository
src/modules/orgs/orgs.service.ts - Organizations and roles → Notifications: uses service
src/modules/orgs/orgs.service.ts - Project controller → Projects: calls service
src/modules/projects/projects.controller.ts - Projects → Project repository: uses repository
src/modules/projects/projects.service.ts - Projects → Organizations and roles: checks organization
src/modules/projects/projects.service.ts - Task controller → Tasks and attachments: calls service
src/modules/tasks/tasks.controller.ts - Tasks and attachments → Task repository: uses repository
src/modules/tasks/tasks.service.ts - Tasks and attachments → Projects: checks project
src/modules/tasks/tasks.service.ts - Tasks and attachments → Notifications: emits notification
src/modules/tasks/tasks.service.ts - Tasks and attachments → File storage: stores attachments
src/modules/tasks/tasks.service.ts - Notifications → Notification repository: uses repository
src/modules/notifications/notifications.service.ts - Notifications → Auth repository: looks up account
src/modules/notifications/notifications.service.ts - Billing → Organizations and roles: uses service
- Outbound integrations → Outbound HTTP adapter: uses adapter
- File storage → Runtime configuration: reads limits
src/shared/adapters/fileStorage.ts - Express app → Runtime configuration: reads settings
src/app.ts