Backend project built with FastAPI in Python, using a clean modular architecture and connected to SQL Server. Designed to be maintainable, scalable, and ready for production.
- 🐍 Python 3.13
- ⚡ FastAPI
- 🛢️ SQLAlchemy + Alembic
- 🧮 SQL Server (via
pyodbc
) - 🔐 Pydantic v2
- 🔄 JWT Authentication (coming soon)
- 🧪 Uvicorn (development server)
app/
├── main.py # App entry point
├── config.py # Environment & DB settings
├── database.py # DB connection setup
├── models/ # SQLAlchemy models
├── schemas/ # Pydantic schemas (validation)
├── repositories/ # Data access layer
├── services/ # Business logic
├── routers/ # FastAPI route definitions
└── utils/ # JWT, security, and helpers
-
Clone the repository:
git clone https://github.com/your_user/fastapi-project.git
-
Create and activate a virtual environment:
python -m venv env env\Scripts\activate # Windows
-
Install dependencies:
pip install -r requirements.txt
-
Create your
.env
file:database_hostname=localhost database_port=1433 database_username=your_user database_password=your_password database_name=FastApiDB secret_key=YourSuperSecretKey algorithm=HS256 access_token_expire_minutes=30
-
Run Alembic migrations:
alembic upgrade head
-
Launch the server:
uvicorn app.main:app --reload
/
— Health check- 🔐 Auth & CRUD endpoints coming soon...
- JWT Authentication
- Role-based Permissions
- Unit & Integration Testing
- CI/CD & Production Deployment