Django Nextjs Boilerplate screenshot

Django Nextjs Boilerplate

Author Avatar Theme by Akshat2602
Updated: 29 Jan 2024
88 Stars

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.

Categories

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

Installation

To get a local copy of this template up and running on your machine, follow these simple steps:

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.