How marcelovicentegc/django-react-typescript works
Main Components
• Frontend: Represent the React application. Show that it includes components, pages, API consumers, and uses environment variables for configuration.
• Backend: Represent the Django application which is split between:
• API endpoints provided via Django Rest Framework (DRF) — located in folders like api/ and backend views.
• Traditional Django components (views, templates, models, admin, migrations, signals) in the backend/ and core/ directories.
• Database: A Postgres instance, referencing both local development (Docker Compose configurations) and production storage.
• CDN: Cloudinary integration used for storing media files.
Relationships and Interactions
• A clear data flow between React on the frontend and the Django backend.
• That Django’s view functions serve both API data and render templates that include the React app (especially in production where the frontend is served by Django).
• That models in Django interact with both the REST API layer (via serializers) and are ultimately stored in Postgres.
• That static assets and media files are handled by the CDN, and that NGINX acts as a reverse proxy or static asset server in the deployment layer.
• CI/CD pipelines as external systems that trigger builds, tests, and deployment operations using either virtualized (via VM SSH) or bare-metal deployment workflows.
Architectural Patterns & Design Principles
• Separation of concerns: route the business logic in Django (views, models, serializers) from the client-side rendering in React.
• Demonstrate integration patterns between server-rendered pages (using Django templates) and client-side routed React components.
• Use of containerization (Docker) and automation (GitHub Actions) for a smooth development-to-production pipeline.
• That environment variables drive configuration for both frontend and backend, and denote CI/CD integration for automated deployments.