How justteshi/excelsiorclinic-new works
Main Components
• React Components: Organized by pages (e.g., HomePage, LoginPage, ServicesPage etc.).
• Redux Layer: Actions, reducers, and a store to manage application state.
• Static assets management (Webpack, Babel for compiling JSX/JS files and React Bootstrap for styling).
• Server (Back-end): A Django project built as a set of modular apps. Its components include:
• Core Django Project Files (settings.py, urls.py, wsgi.py, etc.) that bootstrap the application.
• Django Apps:
‣ Accounts – for user management and authentication (with its own models, serializers, and REST endpoints).
‣ Webapp – handling services, doctors, news articles, etc.
‣ Frontend (as a Django app) – which might be serving rendered HTML templates or acting in a supporting capacity.
• Database: Although not explicitly listed, it is implied by the Django ORM with migrations and models present in several apps.
• Admin & API: The Django admin site (accessible via /admin) and a suite of REST APIs for the client-side to interact with the back-end.
Relationships and Data Flow
• The Frontend (React) directly communicates with the Django REST API endpoints (using axios), including endpoints for authentication (using Knox), data fetching (e.g., doctors, services, news), and updates.
• The Django server uses internal URL routing (distributed across the apps) to delegate requests to proper views, serializers, and models.
• The Django ORM manages data persistence interacting with the underlying database.
• The Django admin panel provides an interface for administrators to manage data such as services, doctors, and news articles.
• External libraries such as Redux, React Bootstrap, and Webpack add additional layers to the UI/UX and asset bundling.
Architectural Patterns and Technologies
• Separation of concerns: The design clearly separates the presentation layer (React) from the back-end logic (Django) and data storage.
• RESTful API design: Using Django REST Framework for standard API practices.
• Authentication Management: Using Django REST Knox for token-based authentication.
• Modular Django Apps: Each app (accounts, webapp, frontend) represents separate business domains within the overall project.
• Frontend state management and component-based design: Redux with actions and reducers to handle application state across multiple React components.
• Modern JavaScript tooling: Utilization of Webpack/Babel for bundling and transpiling JS code.