Django React Template

screenshot of Django React Template

Template repo which involves Django, DRF, React 18, Typescript, Postgres, docker-compose, optional deploy to Heroku, and CI/CD pipeline. Feel free to leave a star if you liked it.

Overview:

This repository serves as a starting point for developing a production-ready application using Django Rest Framework, React with Typescript, and Postgres in a Dockerized environment with an option to deploy to Heroku. The setup includes tools, libraries, and frameworks such as Django, Django Rest Framework, React, Typescript, Node, and Postgres. It also suggests additional packages for enhancing authentication, form handling, data fetching, UI libraries, and testing.

Features:

  • Backend:

    • Django and Django Rest Framework for building the backend server.
    • Django-cors-headers for handling cross-origin requests.
    • Coverage for code coverage reports and running unit tests.
    • Psycopg2 for using Postgres in a Docker container.
    • Gunicorn for production WSGI HTTP server.
    • Whitenoise for building static files.
    • Black, isort, flake8 for code quality (optional).
    • Suggested packages such as drf-yasg for open API documentation, django-rest-auth, django-allauth, djoser for authentication, django-filter for enabling filtering querysets, django-import-export for data import/export, and django-debug-toolbar for debugging.
  • Frontend:

    • React and Typescript for building the frontend.
    • React-router-dom for frontend routing.
    • Axios for making HTTP requests.
    • Suggested packages such as UI libraries (Chakra-UI, Material-UI, Reactstrap, TailwindCSS, etc.), react-query for handling data fetching logic, formik + yup for handling form state and validation, and @reduxjs/toolkit + required packages for simpler use of Redux.
    • Cypress for end-to-end testing.

Summary:

This repository provides a starting point for developing a production-ready application using Django Rest Framework and React with Typescript. It includes a Dockerized environment for easy deployment and various tools and libraries to enhance development, testing, and code quality. With clear installation instructions, developers can quickly set up the project and utilize suggested packages for improved authentication, form handling, data fetching, UI design, and testing.