Django Nextjs Boilerplate

screenshot of Django Nextjs Boilerplate
django
nextjs

A starter template for building a fullstack web app with Django, django-rest-framework, Next.js(Typescripted) using docker with PostgreSQL as the primary DB.

Overview

The Django-Next.js-Boilerplate is a basic boilerplate starter for a fullstack web project. It uses Django as the server, PostgreSQL as the database, and Next.js as the frontend. The template includes features such as integration with Django Rest Framework, user register/login/logout workflows, and authentication using JWT. It also provides API documentation configured with swagger and is containerized using Docker. The frontend includes Chakra UI and Chakra icons for design and component library, along with axios for making API calls.

Features

  • PostgreSQL used as the primary database
  • Integration with Django Rest Framework
  • Integrated Djoser for user register/login/logout workflows
  • Authentication using JWT
  • API Documentation configured using swagger
  • Containerized using Docker and managed using docker-compose
  • Preinstalled and integrated Next.js client with TypeScript
  • Chakra UI and Chakra icons for design and component library
  • Axios for making API calls

Prerequisites

  • Docker
  • curl

Installation Steps

  1. Clone the repo: git clone https://github.com/akshat2602/django-nextjs-boilerplate.git
  2. Change the current directory to the template: cd django-nextjs-boilerplate
  3. Build the Docker containers:
    • For dev containers: docker-compose -f docker-compose.dev.yml build
    • For prod containers: docker-compose -f docker-compose.prod.yml build
  4. Run the Docker containers:
    • For dev containers: docker-compose -f docker-compose.dev.yml up
    • For prod containers: docker-compose -f docker-compose.prod.yml up

Summary

The Django-Next.js-Boilerplate is a comprehensive boilerplate starter for a fullstack web project. It provides a ready-to-use setup with Django as the server, PostgreSQL as the database, and Next.js as the frontend. The template includes various features such as authentication, API documentation, and containerization using Docker. It is a convenient starting point for developers looking to build web applications using these technologies.

django
Django

Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. It follows the model-view-controller (MVC) architectural pattern, providing an extensive set of built-in tools and conventions to streamline the creation of robust and scalable web applications.

nextjs
Next.js

Next.js is a React-based web framework that enables server-side rendering, static site generation, and other powerful features for building modern web applications.

docker
Docker

A website that uses Docker for containerization to streamline development, testing, and deployment workflows. This includes features such as containerization of dependencies, automated builds and deployments, and container orchestration to ensure scalability and availability.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.