Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

PrathamCare Backend

PrathamCare is a production-grade backend system for Health Centre & Supply Chain Intelligence. Built with modern technologies focusing on scalability, maintainability, and clean architecture principles.

🚀 Tech Stack

  • Python 3.11+
  • FastAPI: High-performance web framework for APIs.
  • uv: Extremely fast Python package and project manager.
  • Clean Architecture: Domain, Application, Infrastructure, and API layers to ensure business logic is isolated and fully testable.

📁 Architecture Overview

This project follows Clean / Hexagonal Architecture (Ports & Adapters) — structuring code by layers:

  • Domain Layer (src/prathamcare/domain): Core business entities, value objects, pure business rules, and interface definitions (ports). No external dependencies.
  • Application Layer (src/prathamcare/application): Use-cases and orchestration. Links the domain layer with infrastructure adapters.
  • Infrastructure Layer (src/prathamcare/infrastructure): Concrete adapters for persistence (Firestore/BigQuery), AI (Gemini/Speech), forecasting (Prophet), and external services.
  • API Layer (src/prathamcare/api): Controllers, HTTP/WebSocket routing, request validation, and middlewares.
  • Core (src/prathamcare/core): Cross-cutting concerns like dependency injection, configuration, logging, and security.

🛠️ Quick Start

1. Prerequisites

  • Install uv (Python packaging tool).

2. Setup Project

# Clone the repository and navigate to the backend folder
cd PrathamCare-Backend

# The project is managed by uv. To sync dependencies:
uv sync

# To run the development server
uv run fastapi dev src/prathamcare/api/server.py

3. Adding Dependencies

To add any package, use uv add:

uv add <package_name>

🧪 Testing

The codebase structure is designed for complete testability via mockable adapters:

  • Unit Tests: Test domain rules and application use cases with zero external network calls.
  • Integration Tests: Tests with actual infrastructure (e.g., Firestore emulator).
# Run tests using pytest
uv run pytest

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages