Skip to content

docare-apps/docare-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docare API

Docare API is a FastAPI-based backend service for managing medical appointments.

📁 Project Structure

|-- alembic/                 # Alembic folder for database migrations
|   |-- env.py               # Alembic configuration and database connection setup
|   |-- versions/            # Stores migration scripts generated by Alembic
|
|-- app/                     # Main application folder
|   |-- api/                 # API-related modules (routes and dependencies)
|   |   |-- routes/          # FastAPI route definitions (e.g., auth, users, appointments)
|   |   |-- dependencies.py  # Common dependencies (e.g., database sessions, authentication)
|   |-- core/                # Core settings and security-related utilities
|   |   |-- config.py        # Application configuration and environment variables
|   |   |-- security.py      # Security utilities (e.g., password hashing, JWT token generation)
|   |-- database/            # Database connection and session management
|   |   |-- session.py       # SQLAlchemy session factory for database interactions
|   |-- models/              # SQLAlchemy ORM models representing database tables
|   |   |-- base.py          # Base class for models (metadata and declarative base)
|   |-- schemas/             # Pydantic schemas for data validation and serialization
|   |-- services/            # Business logic and service functions for different modules
|   |-- tests/               # Unit and integration tests
|   |   |-- conftest.py      # Test configuration and fixture setup
|   |-- main.py              # Entry point for FastAPI application
|
|-- .env                     # Environment variables for sensitive configurations
|-- .env.example             # Example environment file
|-- .gitignore               # Specifies files and directories to be ignored by Git
|-- alembic.ini              # Alembic configuration file
|-- pytest.ini               # Configuration for running tests with pytest
|-- main.db                  # SQLite database file
|-- README.md                # Documentation file for the project
|-- requirements.txt         # List of Python dependencies
|-- run.py                   # Script to start the FastAPI server

🔧 Setup and Installation

1️⃣ Clone the repository

git clone https://github.com/docare-apps/docare-api.git
cd docare-api

2️⃣ Create a virtual environment

python -m venv venv
source venv/bin/activate  # On macOS/Linux
venv\Scripts\activate  # On Windows

3️⃣ Install dependencies

pip install -r requirements.txt

4️⃣ Configure environment variables

Create a .env file in the root directory

5️⃣ Apply database migrations

alembic upgrade head

6️⃣ Run the API server

python run.py

🧪 Running Tests

pytest

Made with ❤️ by the Docare Team.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •