Welcome to fingDB! This project is the centralized database for LibrecourseUY projects.
fingDB is a database API that stores and serves common information used by different LibrecourseUY projects (like Fingcomms and Fingmap).
Basically, it's the "brain" that holds data shared between the various LibrecourseUY applications.
- Language: Python
- Framework: FastAPI
- Database: PostgreSQL (in production)
- ORM: SQLAlchemy
- Dependency Management: uv
- Python 3.11 or higher
- PostgreSQL (optional, for local development)
-
Clone the repository and enter the folder:
cd fingdb -
Install dependencies with uv:
uv sync
-
Configure environment variables:
- Copy
.env.exampleto.env - Edit
.envwith your database configuration
- Copy
-
Run database migrations:
uv run alembic upgrade head
-
Start the development server:
uv run uvicorn app.main:app --reload
-
Visit
http://localhost:8000/docsto see the API documentation
If you prefer using Docker:
docker build -t fingdb .
docker run -p 8000:8000 fingdbfingdb/
├── app/ # Main application code
│ ├── main.py # Entry point
│ └── ... # API modules
├── migrations/ # Database migrations
├── pyproject.toml # Project configuration
└── uv.lock # Dependency lockfile
fingDB includes an interactive graph visualization that shows the prerequisite relationships between courses. This is particularly useful for students to understand:
- Which courses must be completed before taking another course
- The ideal sequence of courses throughout their career
- How different courses relate to each other
To access the graph:
- Run the server:
uv run uvicorn app.main:app --reload - Visit:
http://localhost:8000/graph
For a detailed technical explanation of how the graph rendering works, see graph.md.
Want to add data or improve the API? Great!
Check out our contribution guide in CONTRIBUTING.md.
Once the server is running, you can view the automatic documentation at:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
MIT License - see LICENSE