How backmeupplz/todorant-backend works
Todorant is a task-management backend exposing HTTP APIs, authenticated user accounts, real-time client synchronization, a Telegram bot, and Google Calendar integration. The main workflow is a client request authenticated as a user, task operations against MongoDB, and synchronization notifications or client sync; Telegram offers another task-entry surface. The sampled source confirms task ordering, persistence, and socket sync. Several controller capabilities are represented from their filenames and index references rather than inspected implementation, so their internal links are omitted.
Main entry points: index.ts Socket Events · todo.ts Todo API · app.ts HTTP Application · authenticate.ts Authentication
Components 22
HTTP API
- Backend Server
src/server.ts - HTTP Application
src/app.ts - API Controllers
src/controllers - Todo API
src/controllers/todo.ts
Task Domain
- Todo Records
src/models/todo/Todo.ts - Tags
src/models/tag.ts - Hero Points
src/models/hero.ts - Todo Ordering
src/helpers/fixOrder.ts
Realtime Sync
- Socket Events
src/sockets/index.ts - Socket Authorization
src/sockets/setupAuthorization.ts - Entity Sync
src/sockets/setupSync.ts - Sync Conversion
src/helpers/wmdb.ts
Integrations
- Telegram Bot
src/helpers/telegram/index.ts - Bot Todo Commands
src/helpers/telegram/commands/todo.ts - Calendar Integration
src/helpers/googleCalendar.ts
Identity
- Authentication
src/middlewares/authenticate.ts - Login API
src/controllers/login.ts - User Accounts
src/models/user/User.ts
Other components
- API Client
- MongoDB
- Google Calendar
- Telegram Platform
Connections 28
- API Client → HTTP Application: sends requests
- Backend Server → HTTP Application: starts app
src/server.ts - HTTP Application → API Controllers: registers routes
src/app.ts - Todo API → Authentication: requires authentication
src/controllers/todo.ts - Authentication → User Accounts: looks up user
src/middlewares/authenticate.ts - Authentication → User Accounts: verifies identity
src/middlewares/authenticate.ts - Login API → User Accounts: uses accounts
src/controllers/login.ts - Todo API → Todo Records: operates on todos
src/controllers/todo.ts - Todo API → Tags: adds tags
src/controllers/todo.ts - Todo API → Todo Ordering: reorders todos
src/controllers/todo.ts - Todo Ordering → Todo Records: loads and saves
src/helpers/fixOrder.ts - Todo API → Socket Events: requests sync
src/controllers/todo.ts - Backend Server → Telegram Bot: starts bot
src/server.ts - Telegram Bot → Bot Todo Commands: routes commands
src/helpers/telegram/index.ts - Bot Todo Commands → Todo Records: uses todo records
src/helpers/telegram/commands/todo.ts - Backend Server → Socket Events: loads sockets
src/server.ts - Socket Events → Socket Authorization: sets authorization
src/sockets/index.ts - Socket Events → Entity Sync: sets up sync
src/sockets/index.ts - Socket Events → Todo Records: syncs todos
src/sockets/index.ts - Socket Events → Tags: syncs tags
src/sockets/index.ts - Socket Events → User Accounts: syncs user data
src/sockets/index.ts - Socket Events → Hero Points: syncs hero data
src/sockets/index.ts - Socket Events → Sync Conversion: converts sync data
src/sockets/index.ts - Socket Authorization → Authentication: uses authentication
src/sockets/setupAuthorization.ts - HTTP Application → Calendar Integration: loads channel handler
src/app.ts - Socket Events → Calendar Integration: uses calendar API
src/sockets/index.ts - Calendar Integration → Google Calendar: reads and updates events
src/helpers/googleCalendar.ts - Telegram Bot → Telegram Platform: connects bot