How niteshkrverma/life-insurance works
Project Type and Purpose
• This is a monolithic, full-stack web application (“Life-Insurance Portal”) built with Django (Python).
• It follows Django’s MTV (Model-Template-View) pattern and provides two main user-facing domains:
• “customer” app – lets end users register, login, apply for policies, ask questions, view history.
• “insurance” app – lets admin users manage policies, categories, questions; view policy holders; handle contact inquiries.
Top-Level Components
• Client (Web Browser)
• Load Balancer / Web Server (e.g., Nginx)
• Application Server (Gunicorn/uWSGI running Django)
• Django Project (“insurancemanagement”)
• customer app
• insurance app
• shared settings, URL routing, ASGI/WSGI entrypoints
• Relational Database (PostgreSQL/MySQL/SQLite)
• Static File Server (for CSS/JS/docs/images)
• (Optional) External Services – e-mail/SMS gateway for notifications, third-party authentication, etc.
Relationships & Data-Flows
• 1) Browser → HTTP(S) → Nginx → Gunicorn → Django URL dispatcher
• 2) URL dispatcher → appropriate view function/class in customer/insurance app
• 3) View uses Forms and Models (Django ORM) → issues SQL queries → Database
• 4) ORM returns model instances → view renders Template → HTML response
• 5) Nginx (or WhiteNoise) serves static assets directly to browser
• 6) Admin actions (via Django admin site) follow same backend→DB flow
• 7) Contact form or policy notifications may invoke external email/SMS APIs
Architectural Patterns & Design Principles
• MTV (separation of Models, Templates, Views)
• App Modularization – customer vs. insurance concerns kept in separate Django apps
• Use of Django migrations to evolve database schema
• Shared settings.py configures middleware, installed apps, static/media routing