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.
Click here for the full documentation.
This project combines the following:
FastAPIfor the fast speed web-server and data validation at runtime.PostgreSQLas the database management system (DBMS).SQLAlchemyas the object relational mapper (ORM).FastAPIUsersfor registration and authentication system.Dockerfor containerizing the application.Docker Composefor running the project locally in a containerized environment.
... and some more stuff.
Clone the repository and navigate to its directory:
$ git clone https://github.com/eladgunders/fastapi-todos.git
$ cd fastapi-todos
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.
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.
This project is under the MIT license.
