How dhvll/crm-system works
Main Components
• Web Client: Represents the browser (or client) where users interact with the UI. It loads pages (templates) and assets (CSS/JS).
• Web Server (Django Application): The central component that handles requests. It includes:
• The core project (djcrm) that contains project-wide settings, URL routing, and WSGI/ASGI configurations.
• Two major apps:
▪ Agents: Manages agent profiles, CRUD operations, and related business logic.
▪ Leads: Handles lead data, lead assignment, categorization, and follow-ups.
• Database: PostgreSQL is used to store customer, agent, lead, and related metadata.
• Static & Media Assets: Managed through Django’s static and media directories that supply CSS, JavaScript, and image resources.
• External Services: Optionally, if any third-party integrations exist (like sending emails, using Django REST Framework endpoints) indicate these as external connectors.
Out Relationships and Interactions
• Requests hit the web server (Django) where the URL router (configured in djcrm/urls.py) dispatches traffic into the proper app (agents or leads) based on routes.
• Within each app, controllers (views), forms, and models process the request, applying business logic.
• The models interact with PostgreSQL for data storage and retrieval.
• The templates (separated per app as well as common templates in src/templates) render the HTML returned to the client.
• Dependency on Django Rest Framework if any endpoints are exposed to external applications.
Architectural Patterns & Design Principles
• MVC / MVT (Model-View-Template) Pattern: Clearly represent how models, views, and templates interact within each app.
• Layered Architecture: Show separation between the presentation layer (templates, static assets), business logic layer (views, forms, mixins), and persistence layer (models connected to PostgreSQL).
• That apps are modular. Each app (agents and leads) is self-contained with its own URL configurations, migrations, and templates, which promotes separation of concerns.