Skip to content

lucasfdcampos/fullstack-todoapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

30 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Fullstack TODO App

FastAPI & Next.js Task Manager

GitHub issues GitHub license GitHub last commit

FastAPI Next.js PostgreSQL Docker TailwindCSS Notion

πŸ“ Overview

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.

Print do Aplicativo de Gerenciamento de Tarefas

✨ Key Features

  • πŸ” 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)

🧱 Technology Stack

Backend

  • 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

Frontend

  • Next.js - React framework with App Router
  • TailwindCSS - Utility-first CSS framework
  • TypeScript - Static typing for JavaScript
  • Fetch API - For data fetching

DevOps

  • Docker - Containerization
  • Docker Compose - Multi-container orchestration

πŸš€ Getting Started

Prerequisites

Quick Start

  1. Clone the repository

    git clone https://github.com/lucasfdcampos/fullstack-todoapp.git
    cd fullstack-todo-app
  2. Start the application

    ./start.sh

    This command will build the Docker images and start the containers for both the backend and frontend.

  3. Access the application

  4. Stop the application

    ./stop.sh

Run in Insomnia

Run in Insomnia}

πŸ—οΈ Project Structure

Backend Architecture

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 Architecture

frontend/
└── src/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ api/            # Internal API routes (auth, todos)
β”‚   β”œβ”€β”€ register/       # Registration page
β”‚   └── todos/          # Main application page
β”œβ”€β”€ components/         # Reusable UI components
└── types/              # TypeScript type definitions

πŸ› οΈ Development

Backend Development commands

  • 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

Frontend Development commands

  • 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

πŸ“ Development Notes

  • 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.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details

About

A modern task management application built with FastAPI and Next.js

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors