How maxlapeuff/allomedecin works
Project Type and Purpose
• AlloMédecin is a monolithic full-stack web application (backend-driven) built with Django, exposing REST endpoints (via serializers/views) and using PostgreSQL for data persistence. It provides a platform to manage user accounts (patients/medecins), schedule and track consultations, handle notifications, and process payments.
File‐Structure Analysis
• Top‐Level Files:
• manage.py – Django CLI entry point
• requirements.txt – Python dependencies
• allomedecin/ – project settings, URL routing, WSGI/ASGI startup
• Django Apps:
• admin/ – custom admin extensions, models, views for back-office
• users/ – user model, serializers, views, URL endpoints
• consultations/ – consultation scheduling, status management, serializers, views
• notifications/ – creating/sending notifications (e-mail, SMS, in-app)
• payments/ – payment models and processing logic
• No dedicated “frontend” directory implies server-rendered UI (Django templates) or a separate frontend repo not shown here.
Key README Insights
• Tech stack: Django (Python 3.12+), PostgreSQL
• Runtime: manage.py runserver (dev), WSGI/ASGI on production
• Environment config: .env variables for DB and Django settings
a. Main Components
• Clients (Web browsers/mobile apps)
• Reverse Proxy / Load Balancer (e.g., Nginx)
• Django Application Server (Gunicorn / uWSGI)
• Django Apps Modules (admin, users, consultations, notifications, payments)
• PostgreSQL Database
• External Services: SMTP server (for e-mails), Payment Gateway (Stripe/PayPal API)
b. Relationships & Data Flows
• Client → Reverse Proxy: HTTP(s) requests
• Reverse Proxy → Django WSGI/ASGI: forwards requests
• Django Server routes to app URLs → appropriate view/serializer → ORM → DB
• Notifications app triggers external SMTP or SMS gateway
• Payments app communicates with third-party payment API and writes transaction logs to DB
c. Architectural Patterns
• Monolithic modular design: each Django “app” encapsulates a domain
• Layered architecture:
– Presentation (Django Templates or REST endpoints)
– Business Logic (views, serializers, services inside each app)
– Data Access (Django ORM)
• 12-factor app practices: environment configuration, separate settings, dependency management
d. Core Technologies
• Django (REST framework serializers + views)
• PostgreSQL (persistent storage)
• Gunicorn/uWSGI + Nginx
• dotenv for configuration
• Third-party services: SMTP, Payment Gateway APIs