Oviya Health Backend
This directory contains the FastAPI backend for the Oviya Health application.
File Structure
. ├── backend/ │ ├── init.py # Makes Python treat this as a module │ ├── crud.py # (Create, Read, Update, Delete) Database logic │ ├── database.py # SQLAlchemy engine, session, and Base │ ├── main.py # FastAPI app, API endpoints │ ├── models.py # SQLAlchemy ORM models (database tables) │ └── schemas.py # Pydantic models (API data shapes) │ ├── requirements.txt # Python package dependencies └── oviyadb.db # (Will be created) Your SQLite database file
How to Run
Install Dependencies: Make sure you have Python 3.8+ installed.
pip install -r requirements.txt
Run the Server: From the same directory as this README.md file, run the following command:
uvicorn backend.main:app --reload
uvicorn is the server that runs your app.
backend.main:app tells it to look inside the backend directory, find the main.py file, and load the variable named app.
--reload makes the server auto-restart when you save changes to the code.
Access the API: The server will be running at http://127.0.0.1:8000. You can access the auto-generated documentation at http://127.0.0.1:8000/docs.