How jak010/tpjt-django-employees works
System Overview
This is a Django-based web application for employee management with a containerized architecture. The system uses nginx as a reverse proxy, uWSGI as the application server, and MySQL as the database.
Main Components
A. Client Layer:
• External Client Applications/Browsers
B. Infrastructure Layer:
• Nginx Container (Port 8001)
• Django Container (Port 3031)
• MySQL Container (Development Database)
C. Application Layer (Django):
• Core Configuration Module
• Employees Module
• API Layer
• Services Layer
D. Database Layer:
• MySQL Database with Employee-related tables
Detailed Component Breakdown
a) Frontend/Client Interaction:
• HTTP requests coming through Nginx reverse proxy
• Port 8001 for external access
b) Application Server:
• UWSGI connection between Nginx and Django
• Port 3031 for Django container
c) Django Application Structure:
• API Layer (src/employees/api/)
• CRUD Operations
• Statistics Endpoint
• Models Layer (src/employees/models/)
• EmployeeModel
• EngineerModel
• Services Layer (src/employees/services.py)
• Serializers (src/employees/serializers.py)
d) Database Structure:
Tables for:
• Employees
• Titles
• Salaries
• Departments
Flow and Relationships
• Request flow: Client → Nginx → uWSGI → Django
• Data flow: Django ↔ Database
• Internal service communications
Additional Elements
• Configuration management (src/config/)
• Exception handling (config/exception_handler.py)
• Testing framework (src/tests/)
Specific Implementation Details
Notes indicating:
• Docker containerization
• Database initialization process
• Employee data structure based on MySQL employees sample database
• API endpoints for CRUD operations and statistics