How damix00/taskbuddy-backend works
TaskBuddy is a backend for matching people who need task help with people who can provide it. Its main workflow accepts mobile-app requests, authenticates users, manages task posts and discovery, and supports task negotiation through chat and completion reviews. The graph also retains documented recommendations, moderation, location services, phone verification, and Firebase capabilities. Evidence is limited to the README and sampled source; unsampled feature connections are shown only where documentation supports them.
Main entry points: src/index.ts HTTP server · routes/index.ts Route registry · posts Task endpoints · channels Chat endpoints
Components 24
Server runtime
- HTTP server
src/index.ts - Route registry
src/routes/index.ts - PostgreSQL
src/database/connection.ts
Accounts and identity
- Request authorization
src/middleware/authorization.ts - JWT verification
src/verification/jwt.ts - Phone verification
src/verification/phone.ts - User accounts
src/database/wrappers/accounts/users/index.ts - User profiles
src/database/wrappers/accounts/profiles/index.ts
Tasks and discovery
- Task posts
src/database/wrappers/posts/post/index.ts - Task endpoints
src/routes/v1/posts - Task classification
src/classification/cohere.ts - Content moderation
src/classification/text_check.ts - Search and recommendations
src/routes/v1/search - Feed sessions
src/database/wrappers/algorithm/sessions_wrapper.ts
Chat and reviews
- Task channels
src/database/models/chats/channels.ts - Chat endpoints
src/routes/v1/channels - Realtime chat
src/socket/socket_server.ts - Task reviews
src/database/wrappers/reviews/wrapper.ts
External services
- Cohere API
- OpenAI moderation API
- OpenStreetMap API
- Twilio SMS
- Firebase services
src/firebase
Other components
- Mobile app
Connections 25
- Mobile app → HTTP server: sends requests
- HTTP server → Route registry: registers routes
src/index.ts - HTTP server → PostgreSQL: connects
src/index.ts - HTTP server → Realtime chat: starts
src/index.ts - Route registry → Task endpoints: routes tasks
src/routes/index.ts - Route registry → Chat endpoints: routes chat
src/routes/index.ts - Request authorization → JWT verification: verifies tokens
src/middleware/authorization.ts - Request authorization → User accounts: loads user
src/middleware/authorization.ts - Request authorization → User profiles: loads profile
src/middleware/authorization.ts - Task endpoints → Task posts: manages tasks
- Task posts → PostgreSQL: persists tasks
- Task endpoints → Task classification: classifies text
- Task classification → Cohere API: embeds text
- Task endpoints → Content moderation: checks content
- Content moderation → OpenAI moderation API: moderates content
- Route registry → Search and recommendations: routes search
src/routes/index.ts - Search and recommendations → Feed sessions: personalizes feed
- Search and recommendations → OpenStreetMap API: filters by location
- Chat endpoints → Task channels: loads channel
src/routes/v1/channels/[uuid]/middleware.ts - Chat endpoints → Task reviews: creates review
src/routes/v1/channels/[uuid]/messages/[message_uuid]/review.ts - Chat endpoints → Realtime chat: emits chat events
src/routes/v1/channels/[uuid]/actions/worker.ts - Realtime chat → PostgreSQL: connects
src/socket/socket_server.ts - Phone verification → Twilio SMS: verifies numbers
- User profiles → Firebase services: uploads media
src/database/wrappers/accounts/profiles/index.ts - HTTP server → Firebase services: initializes
src/index.ts