Skip to content

prajishk/Patient_Management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Radiant Smiles — Backend (Patient_Management)

Backend CI

Integration Tests

This repository contains the Radiant Smiles project. This README focuses on running the backend locally for development.

Running with Docker Compose (recommended)

  • Make sure Docker Desktop is installed and running.
  • Open a terminal in the backend folder and run:
cd "app/backend"
docker-compose up --build

This starts two services:

  • mongodb-local — MongoDB on port 27017
  • radiant-backend — FastAPI app on port 8000

Open the API docs at: http://127.0.0.1:8000/docs

Stop and remove containers:

docker-compose down -v

Running locally without Docker

  1. Create and activate a virtual environment (PowerShell):
cd "app/backend"
python -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -r requirements.txt
  1. Copy .env.example to .env and set MONGO_URL and DB_NAME.

  2. Start the app:

uvicorn server:app --reload --host 127.0.0.1 --port 8000

Health check

A simple PowerShell health-check script is available at app/backend/health_check.ps1 (may require enabling script execution).

CI

A GitHub Actions workflow has been added at .github/workflows/backend-ci.yml that builds the backend image and runs a smoke test. See that file for details.

Integration tests (manual)

An integration workflow is available to run the full stack (MongoDB + backend) using Docker Compose. It's configured as a manual workflow dispatch to avoid running on every push.

How to run

  1. Open the repository on GitHub and go to Actions -> "Integration Tests".
  2. Click "Run workflow" and choose the branch (main) to run the integration tests.

What it does

  • Starts MongoDB and the backend with docker compose on the runner.
  • Waits for /docs, runs app/backend/seed_db.py to populate sample data, then runs app/backend/smoke_test.py.
  • Captures compose logs and uploads them as an artifact named integration-logs.

Notes

  • This workflow runs on a GitHub runner using Docker; no local Docker Desktop is required.
  • Use the manual dispatch when you want to run a full-stack integration test (e.g., before a release or after big changes).

Notes

  • The Compose setup bind-mounts the backend folder into the container so code changes are picked up by uvicorn --reload.
  • If you plan to run the project from inside OneDrive, be aware that file syncing can sometimes interfere with tooling — moving the workspace to a non-synced folder can avoid unpredictable file locks.

If you want, I can also:

  • Add curl examples or a small Postman collection for common endpoints.
  • Add a compose override for production vs development.

Patient_Management

To schedule appointments for patients

About

To schedule appointments for patients

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages