Loading repository data…
Loading repository data…
richardnguyen99 / repository
An open-source API repository for university courses
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
An open-source API repository for public universities.
This API is not affilitated with any universities. The data is collected based on public search engines with public information. Information may be incorrect, unofficial, or outdated. Please use with caution.
The data is a collection of information from universities' public information. If you couldn't find the information you need, or the information is incorrect, please send an email to richard@richardhnguyen.com for your request.
.
├── cursus # Core directory
│ ├── app.py # Main Flask application
│ ├── config.py # Configuration file
│ ├── __init__.py
│ ├── apis/ # API endpoints
│ ├── models/ # ORM models for database
│ ├── schema/ # Pydantic schemas-to-json for APIs
│ ├── static/ # Static files
│ ├── templates/ # HTML pages
│ ├── util/ # Utility functions
│ └── views/ # Flask views and blueprints
├── data/ # Initial data for development
├── migrations/ # Alembic migration folder
├── nginx/ # Nginx configuration (development)
├── sql/ # Backup SQL scripts
├── test/ # Test directory
├── docker-compose.yml # Docker compose to orchestrate docker containers
├── Dockerfile # Python Docker image for development
├── Dockerfile.prod # Python Docker image for production
├── manage.py # CLI script
└── pyproject.toml # Core Python configuration
python>=3.11)git clone https://github.com/richardnguyen99/cursus.git
.env fileYou need to create an .env file in order to start the application. The .env
will be used by Docker Compose to set up and boot up all the docker containers.
For example,
APP_SETTINGS="cursus.config.DevConfig"
POSTGRES_USER="postgres"
POSTGRES_PASSWORD="something-secret"
POSTGRES_DB="cursus"
PGPORT=7432
DATABASE_URL="postgresql://postgres:something-secret@172.26.0.2:7432/cursus"
PGADMIN_DEFAULT_EMAIL="richard@richardhnguyen.com"
PGADMIN_DEFAULT_PASSWORD="pgadmin"
PGADMIN_LISTEN_PORT=5050
Please check .env.example for more details.
DATABASE_URLmight be different depending on your docker network. You can check the IP Addres for thepostgrescontainer by runningdocker inspect <container_id> | grep IPAddress.
docker-compose up --build
Docker Compose will boot up everything for you. You can access the application with these following URLs:
http://locahost: The main application. NGINX will serve as the reverse proxy
for the application. Every request will be redirected to the application.http://localhost:5050: The Flask application.http://admin.localhost: The PGAdmin application.http://localhost:7432: The PostgreSQL database.First, you need to install alembic to run the migration. I recommend you to
install it in a virtual environment with your choice of package manager. After
activating the virtual environment, run:
python3 manage.py db upgrade
This will run the first migration to create the database schema for you.
This project is licensed under the terms of the MIT license.