How durjoykumar177/tuitionvault works
Project Type and Purpose
• This is a Django REST Framework (DRF) backend service for the TuitionsVault full-stack web application.
• Its primary responsibility is to expose a set of RESTful endpoints for user authentication, tuition post management, application tracking, and a review system.
Main Components
• API Gateway / Load Balancer (if used in production)
• Django Application Server (TuitionVault project) broken into four Django “apps”:
• accounts (authentication, user profiles, password reset & email confirmation)
• tutions (tuition listing, filtering, search, apply)
• applications (view pending/approved/archived applications)
• reviews (submit/view reviews)
• Django Admin Interface
• Database (PostgreSQL in prod, SQLite in dev)
• Email/SMTP Service (for confirmation & reset emails)
• Static/File Storage (local filesystem or S3 for user photos and tuition images)
• (Optional) Caching Layer or Message Broker if planning async tasks
Relationships and Data Flows
• External Client (Web or Mobile) → HTTP/HTTPS → Load Balancer → Django REST Framework
• DRF endpoints are namespaced by app (e.g., /accounts/, /tutions/, /applications/, /reviews/)
• Each view or serializer invokes Django ORM, which issues SQL queries to the database
• For email-related actions, DRF triggers Django’s Email Backend → SMTP provider
• File uploads/downloads flow between Django and file storage (local or cloud)
• Admin users access the Django Admin UI directly on the application server
Architectural Patterns and Design Principles
• Layered Architecture (Views → Serializers → Models → Database)
• Modular “Django App” decomposition by domain
• Stateless JWT Authentication for API requests
• Use of Django’s built-in URL routing to map endpoints to viewsets/functions
• Separation of concerns: business logic in views/serializers, data in models
Technologies and Frameworks to Annotate
• Django & Django REST Framework
• Python 3.x
• PostgreSQL (primary), SQLite (development)
• JWT for token-based auth
• Django ORM for database interaction
• SMTP or third-party email service (Mailgun, SendGrid)
• (Optional) Redis/Celery for background tasks
• Web Server (Gunicorn/Uvicorn) and WSGI/ASGI Interfaces
Step-by-Step for the Engineer
1. Sketch the client side (browser or mobile) at the top.
7. JWT auth flow: client → login endpoint → token issuance → subsequent calls bear token.