Skip to content

eladgunders/fastapi-todos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

93 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€

FastAPI Todos

FastAPI πŸš€ β€’ PostgreSQL 🐘 β€’ SQLAlchemy πŸ’  β€’ FastAPIUsers πŸ‘₯

Introduction 🧚

FastAPI Todos is an exceptional resource for individuals seeking to learn FastAPI or develop a front end for a todo-list app. Its powerful feature set, combined with the speed and simplicity of FastAPI, empowers developers to create robust and user-friendly applications efficiently. With flexible database support, comprehensive documentation, and a customizable codebase, FastAPI Todos streamlines the development process and enables you to deliver high-quality todo-list apps with ease.

API πŸŒŽβ€Š

Click here for the full documentation.

API docs

Technologies Used πŸ“±

This project combines the following:

  • FastAPI for the fast speed web-server and data validation at runtime.
  • PostgreSQL as the database management system (DBMS).
  • SQLAlchemy as the object relational mapper (ORM).
  • FastAPIUsers for registration and authentication system.
  • Docker for containerizing the application.
  • Docker Compose for running the project locally in a containerized environment.

... and some more stuff.

Running Locally 🏑

Setting up the project πŸ‘·

Clone the repository and navigate to its directory:

$ git clone https://github.com/eladgunders/fastapi-todos.git
$ cd fastapi-todos

Setting up environment variables βš™οΈ

To properly configure the application, you'll need to define the following environment variables in the web-variables.env file:

  • CORS_ORIGINS: a comma-separated list of allowed origins for Cross-Origin Resource Sharing (CORS).
  • FRONT_END_BASE_URL: the base URL of your frontend application.
  • SMTP_HOST: the hostname or IP address of the SMTP server that will be used for sending emails.
  • SMTP_PORT: the port number of the SMTP server. Usually, this is 587.
  • SMTP_USER: the username for authenticating with the SMTP server.
  • SMTP_PASSWORD: the password for authenticating with the SMTP server.
  • EMAILS_FROM_EMAIL: the email address that will appear as the sender of all system-generated emails.
  • EMAILS_FROM_NAME: the name that will appear as the sender of all system-generated emails.

Running the application with Docker Compose 🐳

To run the application locally, you will need to have Docker and Docker Compose installed on your machine.

Once you have Docker and Docker Compose installed, you can use the following command to start the application:

$ docker compose up

If everything is working correctly, you should see output in your terminal indicating that the application is running.

You can then access the application from http://localhost:8000.

You can also play with the interactive API documentation (Swagger) by visiting http://localhost:8000/docs on your web browser.

License πŸ“œ

This project is under the MIT license.