{"id":26685677,"url":"https://github.com/nrjadkry/fastapi_boilerplate","last_synced_at":"2025-04-12T15:50:23.473Z","repository":{"id":217235630,"uuid":"743174558","full_name":"nrjadkry/fastapi_boilerplate","owner":"nrjadkry","description":"A minimalist and efficient FastAPI boilerplate to kickstart your web application development. This template provides a clean project structure with integrated features like FastAPI, database connectivity (SQLAlchemy), authentication, testing setup, logging, and Docker support. Get started quickly with a solid foundation for your FastAPI projects.","archived":false,"fork":false,"pushed_at":"2024-05-19T15:14:56.000Z","size":27,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T10:17:15.467Z","etag":null,"topics":["boilerplate","docker","fastapi","python","sqlalchemy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nrjadkry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-14T15:01:43.000Z","updated_at":"2024-07-25T05:49:22.000Z","dependencies_parsed_at":"2024-01-27T12:05:57.707Z","dependency_job_id":null,"html_url":"https://github.com/nrjadkry/fastapi_boilerplate","commit_stats":null,"previous_names":["nrjadkry/fastapi_boilerplate"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrjadkry%2Ffastapi_boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrjadkry%2Ffastapi_boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrjadkry%2Ffastapi_boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrjadkry%2Ffastapi_boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nrjadkry","download_url":"https://codeload.github.com/nrjadkry/fastapi_boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248591871,"owners_count":21130136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boilerplate","docker","fastapi","python","sqlalchemy"],"created_at":"2025-03-26T10:17:18.939Z","updated_at":"2025-04-12T15:50:23.451Z","avatar_url":"https://github.com/nrjadkry.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastAPI Boilerplate with PostgreSQL and Docker\n\nThis is a boilerplate project for building web applications using FastAPI framework with PostgreSQL as the database backend, all orchestrated with Docker environment.\n\n## Features\n\n- **FastAPI**: FastAPI is a modern, fast (high-performance) web framework for building APIs with Python 3.7+ based on standard Python type hints.\n- **PostgreSQL**: PostgreSQL is a powerful, open-source object-relational database system known for its reliability, robustness, and performance.\n- **Pydantic**: Pydantic is used for data validation and settings management, enabling easy serialization and validation of data structures.\n- **SQLAlchemy**: SQLAlchemy is a SQL toolkit and Object-Relational Mapping (ORM) library for Python, providing a full suite of well-known enterprise-level persistence patterns.\n- **Alembic**: Alembic is a lightweight database migration tool for usage with SQLAlchemy, allowing for easy schema migrations.\n- **Docker Compose**: Docker Compose is used for orchestrating the FastAPI application and PostgreSQL database within Docker containers.\n\n## Prerequisites\n\nBefore getting started, ensure you have the following installed on your system:\n\n- Docker\n- Docker Compose\n\n## Installation\n\n1. Clone this repository:\n\n    ```bash\n    git clone git@github.com:nrjadkry/fastapi_boilerplate.git\n    ```\n\n2. Navigate into the project directory:\n\n    ```bash\n    cd fastapi-postgres-boilerplate\n    ```\n\n3. Create a `.env` file in the project root using the `env_sample.txt` provided.\n\n   `cp env_sample.txt .env`\n\n4. Create a docker-compose file. Update it according to your choice\n\n   `cp docker-compose.local.yml docker-compose.yml`\n\n\n5. Start the application and PostgreSQL database containers using Docker Compose:\n\n    ```bash\n    docker-compose up -d\n    ```\n\n## Usage\n\nOnce Docker containers are up and running, the FastAPI application will be available at `http://localhost:8001`.\n\n## Project Structure\n\n- **app**: Contains the main application code.\n    - **api**: API routers and endpoints.\n    - **core**: Core application modules and configurations.\n    - **db**: Database related code including SQLAlchemy models and database connection setup.\n    - **schemas**: Pydantic models for request/response payloads.\n- **alembic**: Contains database migration scripts managed by Alembic.\n- **tests**: Unit and integration tests.\n- **docker-compose.yml**: Docker Compose configuration file for orchestrating the FastAPI application and PostgreSQL database.\n\n## Contributing\n\nContributions are welcome! Please fork this repository and submit a pull request with your changes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnrjadkry%2Ffastapi_boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnrjadkry%2Ffastapi_boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnrjadkry%2Ffastapi_boilerplate/lists"}