Skip to content

A boilerplate template to quickly spin up a django backend and nextjs 14 frontend with JWT authentication

License

Notifications You must be signed in to change notification settings

JonasTischer/django-next-template

Repository files navigation

Django Next.js Template

Jumpstart your full-stack development with Django, NextJS and JWT authentication!

Twitter follower count

Introduction · Installation · Tech Stack + Features · Author


Introduction

This template combines Django 5 for the backend and Next.js 14 for the frontend. It includes JWT authentication on the backend and Shadcn UI components for the frontend. This setup helps you start building full-stack web applications more quickly.

Installation

Clone & create this repo locally with the following command:

git clone https://github.com/JonasTischer/django-next-template.git
cd django-next-template

Backend Setup

  1. Navigate to the backend directory:

    cd backend
  2. Install dependencies using Poetry:

    poetry install
  3. Copy .env to .env.local and update the variables.

  4. Run migrations and start the Django server:

    poetry run python manage.py migrate
    poetry run python manage.py runserver

Frontend Setup

  1. Navigate to the frontend directory:

    cd frontend
  2. Install dependencies using Bun:

    bun install
  3. Start the development server:

    bun run dev

Tech Stack + Features

Backend (Django 5)

  • Django – High-level Python web framework
  • Django REST Framework – Powerful and flexible toolkit for building Web APIs
  • JWT Authentication – Secure, token-based user authentication
  • Poetry – Dependency management and packaging made easy for Python

Frontend (Next.js 14)

  • Next.js 14 – React framework for building performant apps with the best developer experience
  • TypeScript – Typed superset of JavaScript
  • Tailwind CSS – Utility-first CSS framework for rapid UI development
  • Shadcn UI – Re-usable components built using Radix UI and Tailwind CSS
  • Tanstack Query – Powerful asynchronous state management for TS/JS
  • React Hook Form – Performant, flexible and extensible forms with easy-to-use validation
  • Zod – TypeScript-first schema validation with static type inference

Development and Deployment

  • Docker – Containerization platform for easy deployment and scaling
  • PostgreSQL – Powerful, open-source object-relational database system

Roadmap

  • Complete deployment configuration
  • Fully containerize with Docker and PostgreSQL
  • Add comprehensive testing suite
  • Implement CI/CD pipeline

Author

Created by Jonas Tischer in 2024.

License

MIT License

About

A boilerplate template to quickly spin up a django backend and nextjs 14 frontend with JWT authentication

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published