This fullstack TODO application demonstrates modern web development practices by combining FastAPI for the backend and Next.js (App Router) for the frontend. The project features user authentication, database persistence, and a responsive UI, all containerized with Docker for easy deployment. The application allows users to create, read, update, and delete tasks, providing a seamless experience across devices.
- π Secure Authentication - JWT-based user authentication system
- π± Responsive Design - Mobile-friendly interface built with TailwindCSS
- π Real-time Updates - Instant UI updates when tasks are modified
- ποΈ Data Persistence - PostgreSQL database with SQLAlchemy ORM
- π³ Containerization - Easy setup with Docker and Docker Compose
- π Database Migrations - Managed with Alembic for version control
- π API Documentation - Auto-generated with Swagger UI (FastAPI)
- FastAPI - High-performance Python web framework
- SQLAlchemy - SQL toolkit and ORM
- Alembic - Database migration tool
- PostgreSQL - Relational database
- Python-jose - JWT token handling
- Passlib & Bcrypt - Password hashing
- Next.js - React framework with App Router
- TailwindCSS - Utility-first CSS framework
- TypeScript - Static typing for JavaScript
- Fetch API - For data fetching
- Docker - Containerization
- Docker Compose - Multi-container orchestration
-
Clone the repository
git clone https://github.com/lucasfdcampos/fullstack-todoapp.git cd fullstack-todo-app -
Start the application
./start.sh
This command will build the Docker images and start the containers for both the backend and frontend.
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000/docs (Swagger UI)
-
Stop the application
./stop.sh
backend/
βββ alembic/ # Database migrations
β βββ versions/ # Migration versions
βββ app/
β βββ api/v1/ # API routes (auth, todos, user)
β βββ core/ # Security configurations
β βββ crud/ # Database operations (CRUD)
β βββ db/ # Database connection and session
β βββ models/ # SQLAlchemy models
β βββ schemas/ # Pydantic schemas
β βββ main.py # API entry point
βββ alembic.ini # Alembic configuration
βββ Dockerfile # Backend container configuration
βββ requirements.txt # Python dependencies
frontend/
βββ src/
βββ app/
β βββ api/ # Internal API routes (auth, todos)
β βββ register/ # Registration page
β βββ todos/ # Main application page
βββ components/ # Reusable UI components
βββ types/ # TypeScript type definitions
- Run the backend server
docker-compose up backend
- Initialize Alembic
docker-compose run backend alembic init alembic
- Create a new migration
docker-compose run backend alembic revision --autogenerate -m "migration_name" - Run migrations
docker-compose run backend alembic upgrade head
- Install dependencies
npm install
- Initialize TailwindCSS
npx tailwindcss init -p
- Run development server
npm run dev
- Run the frontend server
docker-compose up frontend
- Build the frontend
docker-compose run frontend npm run build
- The backend structure was designed with scalability in mind, following best practices from FastAPI documentation.
- The frontend UI was developed with assistance from v0.dev, accelerating the component creation process.
- The authentication system uses JWT tokens with secure password hashing via bcrypt. CORS is properly configured to allow secure communication between frontend and backend.
This project is licensed under the MIT License - see the LICENSE file for details
