How nikhitasathish1/campusledger works
Project type and purpose
• CampusLedger is a full-stack, Dockerized web application built with Django.
• Purpose: allow faculty to manage student records and track book borrow/return with standard CRUD operations and user authentication.
File structure
• Top-level artifacts:
• docker-compose.yml & dockerfile — define and coordinate containers
• manage.py & requirements.txt — Django management and Python dependencies
• mydb.py — (likely helper script for DB setup or connection)
• dcrm/ — the Django “project” module (settings.py, asgi.py, wsgi.py, urls.py)
• website/ — single Django “app” that implements the core features:
• models.py — data schema (Student, Book, Record)
• views.py & forms.py — request handlers and forms
• templates/ — HTML views (add/update, list pages, base layout)
• migrations/ — database schema evolution
• admin.py — Django admin integration
• .dockerignore, .gitignore, .vscode/ — tooling and IDE config
README for additional insights
• Tech stack: Django (Python) backend, Bootstrap/HTML/CSS frontend, MySQL database in Docker, Django’s built-in auth.
• Workflow: Docker Compose spins up web and db containers, run migrations, create superuser, then serve on localhost.
a. Main components
• Client (Web Browser)
• Docker Compose (orchestrator)
• Web container (Django app)
• dcrm module (URL router, settings, ASGI/Wsgi entry)
• website app (models, views, forms, templates)
• Django Auth subsystem
• Database container (MySQL)
b. Relationships and interactions
• Browser → HTTP(S) → Django server (port 8000)
• Django URL dispatcher (dcrm/urls.py) → website.views
• Views use Django ORM → SQL queries → MySQL
• Templates rendered → HTML/CSS/Bootstrap → Browser
• Docker Compose binds and links web ↔ db containers
c. Architectural patterns/design principles
• Three-tier architecture: Presentation ←→ Application ←→ Data
• MVC (Django’s model-view-template)
• Containerization: each service lives in its own Docker container
• Separation of concerns: project module vs. app module vs. migrations vs. templates
d. Key technologies/frameworks
• Django (Python)
• MySQL (in Docker)
• Docker & Docker Compose
• HTML/CSS/Bootstrap
• Django’s built-in authentication