How ismail-en-niou/mandomati_pfe works
Project type and purpose
• This is a React single-page application (SPA) scaffolded with Vite.
• It serves as a multi-role educational management portal (Admin, Professor, Student, Parent, HR, Root), with login, routing, and UI state managed in-browser.
High-level file-structure analysis
• Top level:
• index.html – SPA entry point
• vite.config.js, postcss.config.js, tailwind.config.js – build and styling configs
• src/ – all application code
• src/components/ – reusable UI pieces (modals, tables, cards, calendar, etc.)
• src/pages/ – route-specific container components grouped by user role
• src/context/ – React Context providers for Auth, Admin, RH, Root
• package.json & ESLint config – dependencies and linting rules
Architectural characteristics & patterns
• SPA with client-side routing (React Router implied by pages folder structure).
• UI organized in a component hierarchy:
Context Providers → App → Navbar/Top → Page Container → Role-specific components.
• Shared state via React Context (auth, admin state, etc.).
• Build-time pipeline using Vite, PostCSS, Tailwind and ESLint.
Main components
• Browser (end user)
• React SPA
• App Shell (index.html, main.jsx)
• Context Layer (AuthContext, AdminContext, etc.)
• Routing Layer (maps URLs to page components)
• UI Component Layer (reusable components from src/components/)
• Page Layer (role-based pages under src/pages/)
• Static asset store (public folder & imported images/assets)
• External API Service(s) (REST/GraphQL—endpoints consumed by contexts or hooks)
• Build & Deployment (Vite dev server, production static host like Vercel)
Relationships & interactions
• Browser → (HTTP) → Vite Dev Server or Static Host → delivers index.html + bundled JS/CSS
• React App bootstraps → mounts into DOM
• Contexts initialize (e.g., check auth via API)
• Router directs user to correct page based on role
• Page components request data via Context or direct fetch to external API
• Components render UI, user events propagate back through contexts or local state
• Assets loaded from public directory or bundled path
Key architectural patterns & principles
• Component-based architecture for UI reuse
• Context APIs for cross-cutting state
• Clear folder structure separating reusable components from pages
• Build-time toolchain (Vite, PostCSS, Tailwind) decoupled from runtime
Detail level
• Representative page groups (Admin Pages, Student Pages, etc.)
• Asset flow from public/ folder.