This is the monorepo for some of the backend services of InNoHassle ecosystem, all of them are FastAPI ASGI applications.
- Clubs service - Innopolis University student clubs management system to view clubs, add new clubs, and edit their descriptions and logos.
- Forms - managing Yandex Forms links and generating signed prefilled URLs for authenticated users.
- Guard - gating access to Google Spreadsheets by requiring InNoHassle Accounts authentication before adding users.
- Maps - hosting Innopolis University maps to view them on innohassle.ru.
- Room booking - view and manage room bookings at innohassle.ru via integration with Microsoft Outlook.
- Schedule - aggregate university schedules, personalize favorites, and export ICS calendars at innohassle.ru/schedule.
- Schedule Assistant - build and manage academic schedules, validate placement issues.
- Student Affairs - omnidesk authentication via SSO for Student Affairs department to issue tickets.
- Table Tennis - leaderboard and queue for the Innopolis University table tennis club.
- When2Meet - meeting availability planner for the InNoHassle ecosystem.
- Python 3.14 & uv
- FastAPI
- Database and ORM: MongoDB & Beanie; PostgreSQL & SQLAlchemy
- File storage: MinIO
- Formatting and linting: Ruff, prek
- Type checking: ty
- Testing: pytest
- CI/CD: Docker, Docker Compose, GitHub Actions
We are open to contributions of any kind. You can help us with code, bugs, design, documentation, media, new ideas, etc. If you are interested in contributing, please read our contribution guide.
-
Install dependencies:
uv sync
-
Install prek hooks:
uv run prek install --overwrite --prepare-hooks -t pre-commit -t commit-msg
-
Run infra:
docker compose up --wait mongodb minio
-
Create
settings.yamlin monorepo and set up accounts API JWT token:uv run scripts/prepare.py
-
Start development server (and read logs in the terminal):
For VSCode
In the left menu of the IDE go to "Run and Debug" tab, choose the service name and click play button to start the API. After that, open the URL from console in your browser to view Swagger.Set up VSCode plugins
Go to Extensions and install the following plugins (recommendations in .vscode/extensions.json):
- Python (by Microsoft)
- Ruff (by Charlie Marsh)
- ty (by astral-sh)
Also, if you will use ty typechecker, you should disable others in VSCode settings:
{ "python.languageServer": "None", "python.analysis.typeCheckingMode": "off", "cursorpyright.disableLanguageServices": true, "cursorpyright.analysis.typeCheckingMode": "off", "basedpyright.disableLanguageServices": true, "basedpyright.analysis.typeCheckingMode": "off", "pyright.disableLanguageServices": true, "pyright.analysis.typeCheckingMode": "off" }For PyCharm
In the top-right corner of the IDE choose the service name and click green play button to start the API ([see docs](https://www.jetbrains.com/help/pycharm/run-debug-configuration.html#createExplicitly)). After that, open the URL from console in your browser to view Swagger.Set up PyCharm plugins
- Ruff (plugin).
It will lint and format your code. Make sure to enable
Use ruff formatoption in plugin settings. - Pydantic (plugin). It will fix PyCharm issues with type-hinting.
- Conventional commits (plugin). It will help you to write conventional commits.
Using console
For room booking service:
uv run -m src.room_booking --reload
It will be available at http://localhost:8008
For maps service:
uv run -m src.maps --reload
It will be available at http://localhost:8009
For guard service:
uv run -m src.guard --reload
It will be available at http://localhost:8013
For clubs service:
uv run -m src.clubs --reload
It will be available at http://localhost:8014
For student affairs service:
uv run -m src.student_affairs --reload
It will be available at http://localhost:8015
For forms service:
uv run -m src.forms --reload
It will be available at http://localhost:8017
For when2meet service:
uv run -m src.when2meet --reload
It will be available at http://localhost:8020
For table tennis service:
uv run -m src.tabletennis --reload
It will be available at http://localhost:8023
For schedule service:
uv run -m src.schedule --reload
It will be available at http://localhost:8024
Important
For endpoints requiring authorization click "Authorize" button in Swagger UI
Tip
Edit settings.yaml according to your needs, you can view schema in
settings.schema.yaml
Testing guidelines, infrastructure details, and common pytest commands are documented in TESTING.md.
Firstly, start the test infrastructure:
docker compose -f docker-compose.test.yaml up --waitIt will setup mongodb and minio services, note that they will be stopped after 1 hour of inactivity.
Then, run the tests:
uv run -m pytestIn output you will see failing tests, timings, coverage, etc.
To rerun only failed tests, you can use:
uv run -m pytest --lfTo work on several branches in parallel without stashing or switching in the main checkout, see WORKTREE.md.
- Run
uv sync --upgradeto update uv.lock file and install the latest versions of the dependencies. - Run
uv tree --outdated --depth=1will show what package versions are installed and what are the latest versions. - Run
uv run prek auto-updateto update prek hooks.
Also, Dependabot will help you to keep your dependencies up-to-date, see dependabot.yaml.
Requires mongodb running (docker compose up --wait mongodb).
- Dump (f.e. /clubs database):
docker compose exec mongodb sh -c 'mongodump "mongodb://$MONGO_INITDB_ROOT_USERNAME:$MONGO_INITDB_ROOT_PASSWORD@127.0.0.1:27017/clubs?authSource=admin" --db=clubs --out=dump/' docker compose cp mongodb:/dump/clubs ./clubs_dump
- Restore (f.e. /clubs database):
docker compose exec mongodb sh -c 'mongorestore "mongodb://$MONGO_INITDB_ROOT_USERNAME:$MONGO_INITDB_ROOT_PASSWORD@127.0.0.1:27017/clubs?authSource=admin" --drop dump/clubs' docker compose cp ./clubs_dump mongodb:/dump/clubs
If you need to scaffold a new service, use the NEW_SERVICE.md guide.