https://github.com/arvind-4/django-nextjs
A Simple Django backend deployed along side with a Nextjs frontend and Tailwind!
https://github.com/arvind-4/django-nextjs
django nextjs tailwindcss vercel
Last synced: about 2 months ago
JSON representation
A Simple Django backend deployed along side with a Nextjs frontend and Tailwind!
- Host: GitHub
- URL: https://github.com/arvind-4/django-nextjs
- Owner: arvind-4
- License: mit
- Created: 2024-03-07T13:50:33.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-16T12:29:31.000Z (about 2 years ago)
- Last Synced: 2025-06-10T00:37:22.417Z (12 months ago)
- Topics: django, nextjs, tailwindcss, vercel
- Language: Python
- Homepage: https://django-and-nextjs.vercel.app
- Size: 84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Django with Next.js
A Simple Django backend deployed along side with a Nextjs frontend.
## Stack
- [Nextjs](https://reactjs.org/) - The React Framework for the Web.
- [Django](https://www.djangoproject.com/) - Django makes it easier to build better web apps more quickly and with less code.
- [Tailwind css](https://vitejs.dev/) - Rapidly build modern websites without ever leaving your HTML.
- [Typescript](https://www.typescriptlang.org/) - JavaScript with syntax for types.
## Deployed Routes:
- [Home Route](https://django-and-nextjs.vercel.app/) - "/"
- [Date Route](https://django-and-nextjs.vercel.app/api/date/) - "/api/date/"
- [Django Template](https://django-and-nextjs.vercel.app/api/sample/) - "/api/sample/"
- [Hello](https://django-and-nextjs.vercel.app/api/hello/) - "/api/hello/"
- [About Page](https://django-and-nextjs.vercel.app/about/) - "/about/"
## Project structure
```
$PROJECT_ROOT
│
├── backend,api # django files
│
├── src, public # nextjs files
│
├── templates # django templates
│
├── static # django static files
```
---
### Get the Code
#### For Backend
- Clone Repo
```bash
mkdir django-nextjs
cd django-nextjs
git clone https://github.com/Arvind-4/django-nextjs.git .
```
- Create Virtual Environment for Python
```bash
python3.10 -m pip install virtualenv
python3.10 -m virtualenv .
```
- Activate Virtual Environment
```bash
source bin/activate
```
- Install Dependencies (Via **pip**)
```bash
pip install -r requirements.txt
```
- Install Dependencies (Via **Poetry**)
```bash
pip install poetry
poetry install
```
- Make Migrations
```bash
python manage.py makemigrations
python manage.py migrate
```
- Run Server
```bash
python manage.py runserver
```
#### For Frontend
- Install Dependencies
```bash
pnpm i
```
- Run Frontend
```bash
pnpm dev
```