Codveda Project/
├── backend/
│ ├── core/
│ │ ├── __init__.py
│ │ ├── asgi.py
│ │ ├── settings.py
│ │ ├── test_settings.py
│ │ ├── urls.py
│ │ └── wsgi.py
│ ├── tasks/
│ │ ├── migrations/
│ │ │ ├── __init__.py
│ │ │ └── 0001_initial.py
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── models.py
│ │ ├── serializers.py
│ │ ├── urls.py
│ │ └── views.py
│ ├── users/
│ │ ├── migrations/
│ │ │ └── __init__.py
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── models.py
│ │ ├── serializers.py
│ │ ├── urls.py
│ │ └── views.py
│ ├── .env.example
│ ├── manage.py
│ └── requirements.txt
├── frontend/
│ ├── public/
│ │ └── index.html
│ ├── src/
│ │ ├── components/
│ │ │ ├── Navbar.js
│ │ │ ├── TaskForm.js
│ │ │ └── TaskItem.js
│ │ ├── pages/
│ │ │ ├── About.js
│ │ │ ├── Contact.js
│ │ │ ├── Dashboard.js
│ │ │ ├── Home.js
│ │ │ ├── Login.js
│ │ │ └── Register.js
│ │ ├── services/
│ │ │ └── api.js
│ │ ├── App.js
│ │ ├── index.js
│ │ └── styles.css
│ └── package.json
├── .gitignore
└── README.md
- Django + DRF backend with JWT authentication using
djangorestframework-simplejwt. - Registration endpoint:
POST /api/register - Login endpoint:
POST /api/login - Task CRUD endpoints (protected):
GET /api/tasksPOST /api/tasksPUT /api/tasks/{id}DELETE /api/tasks/{id}
- Task endpoints use a DRF
ModelViewSetand automatically scope tasks to the logged-in user.
Register:
curl -X POST http://127.0.0.1:8000/api/register \
-H "Content-Type: application/json" \
-d '{"username":"isaac","email":"isaac@example.com","password":"securePass123"}'Login:
curl -X POST http://127.0.0.1:8000/api/login \
-H "Content-Type: application/json" \
-d '{"username":"isaac","password":"securePass123"}'Create task:
curl -X POST http://127.0.0.1:8000/api/tasks \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"title":"Finish internship project","description":"Implement backend and frontend","completed":false}'Get tasks:
curl -X GET http://127.0.0.1:8000/api/tasks \
-H "Authorization: Bearer <ACCESS_TOKEN>"Update task:
curl -X PUT http://127.0.0.1:8000/api/tasks/1 \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"title":"Finish internship project","description":"Submitted","completed":true}'Delete task:
curl -X DELETE http://127.0.0.1:8000/api/tasks/1 \
-H "Authorization: Bearer <ACCESS_TOKEN>"- React app with React Router and Axios.
- Pages: Home, About, Contact, Login, Register, Dashboard.
- Components: Navbar, TaskForm, TaskItem.
- JWT tokens stored in
localStorage. - Axios interceptor adds
Authorizationheader and handles refresh token flow.
idusernameemailpassword(hashed)
iduser(foreign key -> user)titledescriptioncompletedcreated_at
cd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# Create PostgreSQL DB and update .env values if needed
python manage.py migrate
python manage.py runservercd frontend
npm install
npm startFrontend default URL: http://localhost:3000
Backend default URL: http://127.0.0.1:8000