How mahakpatel/online-salon-management works
Project type and purpose
• This is a monolithic, full-stack Django web application called “Online Salon Management System.”
• It consists of several Django “apps” (home, staff, appointment, services, etc.), a SQLite database, static assets (CSS/JS/fonts/images), server-side templates, and a Paytm payment integration.
File structure
• Top-level Django project: m_salon/m_salon (settings.py, urls.py, wsgi.py) and manage.py.
• Seven feature apps under m_salon/: home, Staff, appoinment, services, contact, gallery, about, dashboard, plus payment utilities.
• A single-file default database (db.sqlite3).
• Static assets in m_salon/static, including CSS, JS, fonts, images, vendor code.
• Templates under m_salon/templates for server-rendered HTML.
• URL routing files (urls.py) and view modules in each app.
• Migrations for every app, indicating persistent data models.
README
• Confirms Django installation and use of a virtual environment.
• Mentions merchant ID/Key needed for payments.
Main components & interactions
a. Presentation layer
• Client browser (HTML/CSS/JS)
• Static assets served via Django’s staticfiles (or via NGINX in production)
• Templates rendered by Django views
b. Application layer (Django)
• URL dispatcher (m_salon/urls.py)
• Feature apps: home, Staff, appointment, services, contact, gallery, about, dashboard
• Payment module (Checksum.py) integrating with Paytm API
c. Data layer
• SQLite database with data models in each app
• Django ORM for CRUD operations
d. External services
• Paytm payment gateway
Interactions:
1. Client HTTP request → (NGINX/WSGI) → Django URL router
2. Routed to app’s view → business logic → ORM → SQLite
3. ORM returns data → view renders template → HTTP response
4. For payments: view calls Checksum module → Paytm API → callback handled by Django view → update DB → render status page
Architectural patterns & design principles
• MVC (Model-View-Template)
• Single monolithic codebase but modularized into feature apps
• Separation of concerns: each Django app owns its models, views, URLs, templates
• Static vs dynamic content separation
• External integration via a dedicated payment component
Diagramming conventions
• Presentation (blue)
• Application logic (green)
• Data storage (orange)
• External services (red)
• Rectangles for components