How codenik07/worksphere works
Project type and purpose
• This is a full-stack task/workspace management application.
• Frontend: a React+TypeScript single-page app (Vite, Tailwind) providing UI for auth, workspaces, projects, tasks, members, analytics, etc.
• Backend: a Node.js/TypeScript REST API (Express, Passport for auth) exposing endpoints for users, workspaces, projects, tasks, members.
• Database: a relational DB (configured in backend/src/config/database.config.ts) accessed via models (e.g., Sequelize or TypeORM).
File structure
• Top-level separation: /frontend and /backend directories.
• Backend follows an MVC-like pattern:
• config (app, http, DB, passport)
• controllers (auth, user, workspace, project, task, member)
• routes (map controllers to endpoints)
• service layer (business logic)
• models (ORM definitions for user, workspace, project, task, member, roles-permission)
• middleware (auth guard, error handling)
• utils & validation
• seeders for initial data
• Frontend implements:
• src/page (route views)
• src/components (UI building blocks, workspace/project/task dialogs)
• src/hooks (API calls, state logic)
• src/context (auth & query providers)
• src/lib (axios client, API helpers)
• routing layer (protected vs public routes)
README
• (Empty in this case; infer from structure and file names.)
Detail
• Subsystems (e.g., AuthController, TaskService, RoleGuard middleware).
• API layer, business logic layer, data layer distinctly.
• Do not over-simplify; break backend and frontend into as many meaningful components as needed.