{"id":24091007,"url":"https://github.com/gsinghjay/fastapi-fullstack-cicd","last_synced_at":"2026-05-05T14:13:09.173Z","repository":{"id":270922491,"uuid":"911862719","full_name":"gsinghjay/fastapi-fullstack-cicd","owner":"gsinghjay","description":"Template for FastAPI + SQLAlchemy + PostgreSQL with CI/CD and Semantic Versioning","archived":false,"fork":false,"pushed_at":"2025-01-04T03:45:25.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-04T04:19:41.727Z","etag":null,"topics":["alembic","cicd","fastapi","fastapi-template","postgresql","python","semantic-release","sqlalchemy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gsinghjay.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"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":"2025-01-04T03:37:48.000Z","updated_at":"2025-01-04T04:08:13.000Z","dependencies_parsed_at":"2025-01-04T04:29:49.373Z","dependency_job_id":null,"html_url":"https://github.com/gsinghjay/fastapi-fullstack-cicd","commit_stats":null,"previous_names":["gsinghjay/fastapi-fullstack-cicd"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsinghjay%2Ffastapi-fullstack-cicd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsinghjay%2Ffastapi-fullstack-cicd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsinghjay%2Ffastapi-fullstack-cicd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsinghjay%2Ffastapi-fullstack-cicd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gsinghjay","download_url":"https://codeload.github.com/gsinghjay/fastapi-fullstack-cicd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240993352,"owners_count":19890416,"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":["alembic","cicd","fastapi","fastapi-template","postgresql","python","semantic-release","sqlalchemy"],"created_at":"2025-01-10T06:55:38.294Z","updated_at":"2026-05-05T14:13:04.130Z","avatar_url":"https://github.com/gsinghjay.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastAPI Full Stack Application with CI/CD Template\n\nA modern FastAPI template built with best practices, async SQL support, and comprehensive testing.\n\n## 🚀 Features\n\n- FastAPI framework with async support\n- Poetry for dependency management\n- SQLAlchemy with async support\n- Alembic for database migrations\n- Comprehensive testing setup with pytest\n- Code quality tools (Ruff, Black, MyPy)\n- Semantic versioning and automated releases\n- JWT Authentication\n- CORS middleware configured\n- Environment-based configuration\n- Type hints and validation with Pydantic\n- Exception handling\n- Async database operations\n- Dependency injection pattern\n- Prometheus metrics\n- Structured logging with structlog\n\n## 📋 Prerequisites\n\n- Python 3.11+\n- Poetry for dependency management\n- SQLite (default) or other supported databases\n\n## 🛠️ Quick Start\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/gsinghjay/fastapi-fullstack-cicd\ncd fastapi-fullstack-cicd\n```\n\n2. Install dependencies:\n```bash\npoetry install\n```\n\n3. Create a `.env` file in the root directory:\n```env\nAPP_NAME=\"FastAPI App\"\nDEBUG=False\nAPI_V1_STR=\"/api/v1\"\nDATABASE_URL=\"sqlite+aiosqlite:///./app.db\"\nSECRET_KEY=\"your-secret-key-here\"  # Change this!\nACCESS_TOKEN_EXPIRE_MINUTES=30\nBACKEND_CORS_ORIGINS=[\"http://localhost:3000\",\"http://localhost:8000\"]\n```\n\n4. Run database migrations:\n```bash\npoetry run alembic upgrade head\n```\n\n5. Start the development server:\n```bash\npoetry run uvicorn app.main:app --reload\n```\n\nThe API will be available at:\n- API: `http://localhost:8000`\n- Swagger UI: `http://localhost:8000/docs`\n- ReDoc: `http://localhost:8000/redoc`\n\n## 📦 Project Structure\n\n```\nfastapi-app/\n├── app/\n│   ├── __init__.py          # Package initializer with version\n│   ├── main.py              # FastAPI application creation and configuration\n│   ├── core/                # Core functionality\n│   │   ├── __init__.py\n│   │   ├── config.py        # Configuration management\n│   │   ├── security.py      # Security utilities (JWT, passwords)\n│   │   └── exceptions.py    # Global exception handlers\n│   ├── api/                 # API endpoints\n│   │   ├── __init__.py\n│   │   ├── deps.py          # Dependency injection\n│   │   └── v1/              # API version 1\n│   │       ├── __init__.py\n│   │       ├── router.py    # Main API router\n│   │       └── endpoints/   # API endpoints by resource\n│   │           ├── __init__.py\n│   │           ├── health.py\n│   │           └── users.py\n│   ├── models/               # SQLAlchemy models\n│   │   ├── __init__.py\n│   │   └── user.py\n│   ├── schemas/              # Pydantic models\n│   │   ├── __init__.py\n│   │   └── user.py\n│   └── crud/                 # Database operations\n│       ├── __init__.py\n│       └── user.py\n├── tests/                    # Test suite\n│   ├── __init__.py\n│   ├── conftest.py           # Test configuration and fixtures\n│   └── api/\n│       └── v1/\n│           ├── test_health.py\n│           └── test_users.py\n├── alembic/                  # Database migrations\n│   ├── versions/\n│   ├── env.py\n│   └── script.py.mako\n├── .github/                  # GitHub specific configuration\n│   └── workflows/            # GitHub Actions workflows\n│       └── release.yml       # Automated release workflow\n├── alembic.ini               # Alembic configuration\n├── .env                      # Environment variables\n├── .gitignore                # Git ignore rules\n├── pyproject.toml            # Project dependencies and configuration\n├── .pre-commit-config.yaml   # Pre-commit hooks configuration\n└── README.md                 # Project documentation\n```\n\n## 🔄 Semantic Release\n\nThis project uses Python Semantic Release for versioning. Commit messages must follow the Angular Convention:\n\n```\n\u003ctype\u003e(scope): \u003cdescription\u003e\n\n[optional body]\n\n[optional footer(s)]\n```\n\n## 🔒 Security Features\n\n- Password hashing with bcrypt\n- JWT token authentication\n- CORS protection\n- Environment-based configuration\n- Security headers middleware\n- SQL injection protection\n- Input validation with Pydantic\n\n## 📚 Documentation\n\n- [FastAPI Documentation](https://fastapi.tiangolo.com/)\n- [SQLAlchemy Documentation](https://docs.sqlalchemy.org/)\n- [Alembic Documentation](https://alembic.sqlalchemy.org/)\n- [Poetry Documentation](https://python-poetry.org/docs/)\n- [Pydantic Documentation](https://docs.pydantic.dev/)\n\n## 🤝 Contributing\n\nPlease see our [Contributing Guide](CONTRIBUTING.md) for details on:\n- Development setup\n- Coding standards\n- Testing guidelines\n- Pre-commit hooks\n- CI/CD pipeline\n- Pull request process\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsinghjay%2Ffastapi-fullstack-cicd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgsinghjay%2Ffastapi-fullstack-cicd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsinghjay%2Ffastapi-fullstack-cicd/lists"}