neruvara-backend
Neruvara Backend API
#Women's Health Application Backend
##Tech Stack
- Framework: FastAPI 0.104+
- Language: Python 3.11+
- Database: PostgreSQL 15+
- Cache: Redis 7+
- Authentication: JWT + OAuth2
##Architecture
This backend follows Clean Architecture principles with clear separation of concerns:
app/
βββ api/ # API Layer (Controllers)
βββ core/ # Core utilities and configuration
βββ domain/ # Business Logic Layer (Entities, Use Cases)
βββ infrastructure/ # Infrastructure Layer (Database, External Services)
βββ services/ # Application Services
βββ tests/ # Test suite
##Development Setup
###Prerequisites
- Python 3.11+
- PostgreSQL 15+
- Redis 7+
###Installation
cd neruvara-backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
###Environment Configuration
cp .env.example .env
# Edit .env with your configuration
###Database Migration
alembic upgrade head
###Run Development Server
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
##API Documentation
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
##Testing
pytest
pytest --cov=app
##Code Quality
- Linting:
black
,isort
,flake8
- Type Checking:
mypy
- Security:
bandit
##Deployment
- Containerization: Docker + Docker Compose
- Orchestration: Kubernetes (production)
- CI/CD: GitHub Actions