How fathy-said/capstone works
Purpose and Runtime
Trend-pm is a Vite-built React/TypeScript single-page application for capstone/project management. Its structure supports role-specific workflows for administrators, students, and supervisors: dashboards, projects, teams/tasks, reports, archives, users, and chat. The browser client is bootstrapped by src/main.tsx, renders the root application in src/App.tsx, and is served through index.html.
Application Composition and Routing
The route graph is centralized in src/router/index.tsx. Domain route aggregators partition navigation by feature and role:
• Dashboard: src/pages/Dashboard/route.tsx
• Projects: src/pages/Project/route.tsx
• Teams: src/pages/Teams/route.tsx
• Users: src/pages/users/route.tsx
• Archive: src/pages/Archive/route.tsx
Role-specific route modules beneath each domain select distinct pages rather than sharing a single generic screen, e.g. src/pages/Project/Admin/admin-route.tsx, src/pages/Project/Student/student-route.tsx, and src/pages/Project/SuperVisor/superVisor-route.tsx.
Authentication, Authorization, and Access Boundaries
Authentication state is represented in src/store/auth.ts and exposed through src/hooks/auth.ts and src/hooks/useAuth.ts. src/components/AuthorizedRoute/Index.tsx is the route-level access boundary, while permission evaluation is separated into src/hooks/permissions.ts, src/hooks/HandlePermissions.tsx, and src/components/PermissionPage/PermissionPage.tsx. Auth-oriented screens are grouped in src/layouts/Auth/Index.tsx, with login and password recovery flows at src/pages/Login/Index.tsx, src/pages/ForgetPassword/Index.tsx, and src/pages/ResetPassword/Index.tsx.
Shells and Shared UI Layer
Authenticated pages use the main application shell in src/layouts/Main/Index.tsx, composed around shared navigation elements such as src/components/Header/Index.tsx and src/components/SideMenu/Index.tsx. Reusable interaction primitives—forms, tables, dialogs, loading states, notifications, and media—form the presentation boundary: src/components/AppTable/Index.tsx, src/components/FormInputs, src/components/ModalDialog/Index.tsx, src/components/CustomToast/index.tsx, and src/components/AppImage/Index.tsx. Styling is component-local CSS plus Tailwind entry styles at src/assets/css/tailwindcss.css.
Project and Team Execution Workflows
Projects are managed through role-specific project pages, including administrator management in src/pages/Project/Admin/adminProject.tsx, student project/team formation in src/pages/Project/Student/ProjectPage.tsx and src/pages/Project/Student/CreateTeamPanel.tsx, and supervisor project creation/details in src/pages/Project/SuperVisor/CreateProject.tsx and src/pages/Project/SuperVisor/ProjectDetails.tsx.
Team delivery centers on task boards, task detail/editing, membership, and supervisor reporting. Student task-board composition resides in src/pages/Teams/Student/components/TaskBoard.tsx, src/pages/Teams/Student/components/TaskColumn.tsx, and src/pages/Teams/Student/components/TaskForm.tsx; supervisor report workflows are in src/pages/Teams/SuperVisor/Report/Reports.tsx and src/pages/Teams/SuperVisor/Report/CreateReport.tsx.
State, Client Boundary, and Services
The repository is a frontend client; no backend implementation or infrastructure manifests are present. The likely API boundary is concentrated under src/client/index.ts, with feature hooks such as src/hooks/archive.ts and src/hooks/useNotifications.ts mediating UI behavior and remote/client operations. Shared utility/state transformations live in src/store/utils.ts, src/utils/transform.ts, and src/utils/types.ts. Environment values are supplied through .env and .env.example.
Build and Assets
Vite is configured by vite.config.ts; the app uses TypeScript, PostCSS, and Tailwind configuration (tsconfig.json, postcss.config.cjs, tailwind.config.js). Static/public assets are under public/images, while bundled images and SVG icons are under src/assets/Images and src/assets/icons. The README identifies SVGO as the SVG optimization tool for the icon asset pipeline.
Main entry points: index.ts API client boundary · App.tsx Root application · index.tsx Route graph · route.tsx Domain route aggregators
Components 19
Browser Runtime
- Vite HTML entry
index.html - React bootstrap
src/main.tsx - Root application
src/App.tsx - Authenticated shell · Composes shared header and side navigation.
src/layouts/Main/Index.tsx - Shared UI primitives · Tables, forms, dialogs, notifications, loading, and media.
src/components/AppTable/Index.tsx - Styles & bundled assets · Tailwind entry styles and bundled images/icons.
src/assets/css/tailwindcss.css
Routing & Access
- Route graph · Centralizes application navigation.
src/router/index.tsx - Domain route aggregators · Partitions dashboard, projects, teams, users, and archive navigation.
src/pages/Dashboard/route.tsx - Authorized route
src/components/AuthorizedRoute/Index.tsx - Auth state & hooks · Auth state is exposed to UI through authentication hooks.
src/store/auth.ts - Permission evaluation
src/hooks/permissions.ts - Authentication screens · Hosts login and password recovery flows.
src/layouts/Auth/Index.tsx
Role Workflows
- Project workflows · Admin management, student team formation, and supervisor project work.
src/pages/Project/route.tsx - Student task board · Board, columns, and task forms support team delivery.
src/pages/Teams/Student/components/TaskBoard.tsx - Supervisor reports
src/pages/Teams/SuperVisor/Report/Reports.tsx
Client Services
- Archive & notifications · Feature hooks mediate archive and notification behavior.
src/hooks/archive.ts - API client boundary · Frontend boundary for remote operations; no backend is in this repository.
src/client/index.ts - State transformations · Shared store and data transformation utilities.
src/store/utils.ts - Remote backend API · Implemented outside this frontend repository.
Connections 24
- Vite HTML entry → React bootstrap: loads
- React bootstrap → Root application: renders
- Root application → Route graph: mounts
- Root application → Auth state & hooks: reads auth
- Route graph → Domain route aggregators: aggregates
- Route graph → Authorized route: guards protected routes
- Authorized route → Auth state & hooks: checks session
- Authorized route → Permission evaluation: evaluates access
- Route graph → Authentication screens: routes unauthenticated flows
- Authorized route → Authenticated shell: admits authenticated pages
- Authenticated shell → Shared UI primitives: uses
- Domain route aggregators → Project workflows: projects
- Domain route aggregators → Student task board: teams
- Domain route aggregators → Supervisor reports: reporting
- Project workflows → Shared UI primitives: composes
- Student task board → Shared UI primitives: composes
- Supervisor reports → Shared UI primitives: composes
- Project workflows → API client boundary: remote operations
- Student task board → API client boundary: task operations
- Supervisor reports → API client boundary: report operations
- Archive & notifications → API client boundary: uses
- API client boundary → Remote backend API: requests
- API client boundary → State transformations: normalizes data
- Root application → Styles & bundled assets: applies styles and assets