DEV Community

Fiyinfoluwa Ojo
Fiyinfoluwa Ojo

Posted on

Capstone Day 1: Building the To-Do App Task Management API

The Capstone Project Begins

Days 26-30 are all about the capstone project :
a full To-Do App API built as a team.

Today I built the complete Task Management API
with authentication and full CRUD operations.

The Tech Stack

  • FastAPI - web framework
  • SQLAlchemy - ORM
  • SQLite - database
  • JWT - authentication
  • Pydantic - validation
  • CORS - frontend ready

The Data Models

class User(Base):
    id, email, password, created_at
Enter fullscreen mode Exit fullscreen mode
class Task(Base):
    id, title, description, completed, 
    user_id, created_at, updated_at
Enter fullscreen mode Exit fullscreen mode

Tasks are linked to users : every user
only sees their own tasks.

The API Endpoints

POST /auth/signup -> Register a new user
POST /auth/login -> Login and get JWT token
GET /tasks -> Get all tasks for logged-in user
POST /tasks -> Create a new task
PUT /tasks/:id -> Update or complete a task
DELETE /tasks/:id -> Delete a task permanently

Postman Tests

Signup & Login

signup

login

Create Task

create task

Get All Tasks

Get tasks

Mark Task as Completed

Mark Complete

Delete Task

Delete task

Lessons Learned

Building a real product feels different from
daily exercises. Every decision matters :
the field names, the response shapes, the
status codes because a frontend team is
depending on this API to be consistent and reliable.

Day 26 done. 4 more to go. 🔥

GDGoCBowen30dayChallenge

Top comments (0)