How pharouqy/moprice-app works
Main System Components
a) Client-Side Architecture:
• Inside this container, create three main sections:
b) Core Application Layers (arranged vertically):
Routing Layer
• Router configuration (src/router/index.jsx)
• Route definitions for all pages
Component Layer
• Authentication Components (authCheck.jsx)
• Layout Components (layout.jsx)
• PDF Rendering Components (pdfRendering.jsx)
Pages Layer
• User Authentication Pages (login, register, forgotPassword, resetPassword)
• Main Application Pages (home, contact, profil)
• Error Handling (errors.jsx)
c) External Interactions:
• API Communication (show connection to VITE_API_URL)
• Authentication Service Integration
Component Relationships
• Data flow between components
• Authentication flow
• Route navigation paths
• API calls to backend services
Technical Stack Indicators
A "Technology Stack" section showing:
• React 18.3.1
• Vite 5.4.1
• React Router 6.26.1
• Axios for API communication
Specific Elements
a) Authentication Flow:
Login/Register Page → AuthCheck Component → Protected Routes
b) Layout Structure:
Layout Component
• Header
• Main Content (Router Outlet)
• Footer
c) State Management:
• Custom hooks (useLogout.jsx)
• Component-level state
• Props flow
Important Notes
• Clear separation between public and protected routes
• Role of the layout component as a wrapper
• Where PDF rendering occurs
• How the custom hooks integrate with components
• Static assets handling (public folder)