This monorepo contains a Django REST API backend and a Next.js (React) frontend.
Setup (with Pipenv):
- Go to the backend directory:
cd backend - Install dependencies (creates virtualenv automatically):
pipenv install --dev
- Activate the environment:
pipenv shell
- Run migrations:
python manage.py makemigrations api python manage.py migrate
- Run the server:
python manage.py runserver
Notes:
- All dependencies are managed in
backend/Pipfile. - Add
'rest_framework','corsheaders','drf_yasg', and'django_extensions'toINSTALLED_APPSinbackend/settings.py. - Configure CORS in
settings.pyas needed. - API endpoints are served from
/api/. - Swagger UI available at
/swagger/.
Setup:
- Go to the frontend directory:
cd frontend - Install dependencies:
npm install
- Start the development server:
The app will be available at http://localhost:3000.
npm run dev
Features:
- Uses Next.js with React 19 and TypeScript
- API requests are made to the Django backend (see
.envforNEXT_PUBLIC_API_URL) - Includes react-hot-toast for notifications
- Tailwind CSS and DaisyUI for styling
Environment Variables:
- Set
NEXT_PUBLIC_API_URLinfrontend/.envto match your backend URL (default:http://localhost:8000/)
backend/- Django project root (with Pipfile)backend/api/- Django app for API endpointsfrontend/- Next.js React frontend
- Start the Django backend:
source env/bin/activate python3 backend/manage.py runserver - In a new terminal, start the React frontend:
cd frontend npm run dev