This project serves as an exercise, showcasing the implementation of a web application using the latest version of FastAPI. It incorporates essential tools such as Alembic for migrations and SQLModel as the Object-Relational Mapping (ORM), seamlessly integrated with Pydantic V2 and SQLAlchemy V2.0.
-
Set Environment Variables:
Create an .env file in the
backend/app
folder and replicate the content from .env.example. Customize it based on your specific configuration. -
Run the Project:
Execute the following command to build and run the project:
docker compose up -d --build
-
Explore Swagger Docs:
Visit http://localhost:8000/ to access the automatic interactive API documentation.
Execute the following command to run tests:
scripts/dev.sh
This project draws inspiration from the following resources:
- FastAPI Tutorial
- SQLModel Tutorial
- Full Stack FastAPI and PostgreSQL - Base Project Generator
- Async configuration for FastAPI and SQLModel
- Minimal async FastAPI + PostgreSQL template
- Implement JWT authentication.
- Create registration and password-reset email templates.
- Implement validation for registration and password-reset via token.
- Introduce BaseUUIDModel.
- Implement Alembic migrations.
- Integrate Celery for asynchronous email sending tasks.
- Implement Asynchronous Database Management.
- Implement async testing.
- Implement Docker Compose.
- Implement a sample one-to-many relationship.
- Establish a sample one-to-one relationship.
- Create a sample many-to-many relationship.
- Implement Pagination.
- Enable functionality to upload images and store them using Minio.
- Incorporate a sample React frontend.