How gurram-rohith/devhub works
This is a workspace collaboration application: users authenticate, create or join workspaces, then coordinate assigned tasks and workspace events. The browser provides protected workspace views and task, event, and member tabs; its API modules communicate with an Express service that applies authentication and workspace permissions before controllers update or query MongoDB models. The tree also identifies workspace statistics, though their detailed behavior and wiring were not sampled. Edges for the sampled task and event flows follow their routes and controller model operations; unsampled UI and statistics details are represented cautiously.
Main entry points: app.js Express app · App.jsx App routing · axios.js HTTP client · Workspace.js Workspace records
Components 34
Browser application
- App routing
client/src/App.jsx - Auth context
client/src/context/AuthContext.jsx - Protected routes
client/src/components/ProtectedRoute.jsx - Login and register
client/src/pages/Login.jsx - Workspace list
client/src/pages/Workspaces.jsx - Workspace detail
client/src/pages/WorkspaceDetail.jsx - Task tab
client/src/components/TasksTab.jsx - Event tab
client/src/components/EventsTab.jsx - Member tab
client/src/components/MembersTab.jsx - Auth API
client/src/api/auth.js - Workspace API
client/src/api/workspaces.js - Task API
client/src/api/tasks.js - Event API
client/src/api/events.js - HTTP client
client/src/api/axios.js
HTTP service
- Express app
server/src/app.js - Auth routes
server/src/routes/auth.js - Workspace routes
server/src/routes/workspaceRoutes.js - Task routes
server/src/routes/taskRoutes.js - Event routes
server/src/routes/eventRoutes.js - Statistics routes
server/src/routes/statsRoutes.js - Authentication
server/src/middleware/auth.js - Workspace access
server/src/middleware/workspaceAccess.js - Error handling
server/src/middleware/errorHandler.js
Workspace features
- Authentication logic
server/src/controllers/auth.js - Workspace logic
server/src/controllers/workspaceController.js - Task logic
server/src/controllers/taskController.js - Event logic
server/src/controllers/eventController.js - Workspace statistics
server/src/controllers/statsController.js
Persistence
- User records
server/src/models/User.js - Workspace records
server/src/models/Workspace.js - Task records
server/src/models/Task.js - Event records
server/src/models/Event.js
Other components
- Workspace user
- MongoDB
server/src/config/db.js
Connections 48
- Workspace user → App routing: uses
- App routing → Login and register: routes
- App routing → Workspace list: routes
- App routing → Workspace detail: routes
- App routing → Protected routes: guards
- Protected routes → Auth context: checks session
- Login and register → Auth API: authenticates
- Auth context → Auth API: manages session
- Workspace list → Workspace API: loads workspaces
- Workspace detail → Task tab: shows
- Workspace detail → Event tab: shows
- Workspace detail → Member tab: shows
- Task tab → Task API: manages tasks
- Event tab → Event API: manages events
- Auth API → HTTP client: sends requests
- Workspace API → HTTP client: sends requests
- Task API → HTTP client: sends requests
- Event API → HTTP client: sends requests
- HTTP client → Express app: HTTP requests
- Express app → Auth routes: mounts
- Express app → Workspace routes: mounts
- Express app → Task routes: mounts
- Express app → Event routes: mounts
- Express app → Statistics routes: mounts
- Auth routes → Authentication: protects
- Workspace routes → Authentication: protects
- Workspace routes → Workspace access: checks roles
- Task routes → Authentication: protects
- Event routes → Authentication: protects
- Auth routes → Authentication logic: dispatches
- Workspace routes → Workspace logic: dispatches
- Task routes → Task logic: dispatches
- Event routes → Event logic: dispatches
- Statistics routes → Workspace statistics: dispatches
- Authentication logic → User records: reads and writes
- Workspace logic → Workspace records: reads and writes
- Workspace logic → Event records: deletes events
- Workspace logic → Task records: deletes tasks
- Task logic → Workspace records: checks membership
- Task logic → Task records: reads and writes
- Event logic → Workspace records: checks membership
- Event logic → Event records: reads and writes
- Workspace statistics → Workspace records: reads
- Workspace statistics → Task records: reads
- Workspace statistics → Event records: reads
- Express app → Error handling: handles errors
- MongoDB → Workspace records: persists
- MongoDB → Task records: persists