This is a project i built for learning purposes, it uses FastApi to create a tutoring school backend system integrated with Google Calendar API.
Main idea is to create a ERP system to make it easier to manage tutoring school needs. Api is built on FastApi with Pydantic models for json serialization, async Sqlalchemy orm for database interaction, and Docker for easy deployment.
-
Log in
- Login/logout using google Oauth
-
Keep track of students and teachers
- Add, update and delete student and teacher data
- filter students and teachers based on email, phone, or last name, pagination via page and limit
-
Add new classes
- filter classes based on name, date or description, pagination via page and limit
- each class is registered on Google calendar
- set size of class,name,description, start and end times
- add atendees
- set optional recurring frequency
- delete and update events
-
Student reservations
- link student to new class, update Google calendar automaticaly
- remove student from class
- class size limit
- all atendees recive notifications via email/popup
-
Keep tracks of student invoices
- filter invoices by date of creation or payment status, pagination via page and limit
- get all invoices for student
- organize invoices in one place
- auto create invoice when class is booked
-
Keep track of teacher finances
- keep track of teacher work hours
- generate paychecks, with payment amount, work hours
- filter work hours by teacher id, start and end date of date range,pagination via page and limit
- filter paychecks by teacher id ,payment status,start and end date of date range,pagination via page and limit
- pay paychecks
- First go to your Google Calendar page
- Create new calendar, and copy calendar ID
- in .env.example you have fields for configuring CALENDAR_ID and TIME_ZONE
- delete .example part so you are left with .env file containing your data
- You need to create a Google Cloud project ,enable Calendar API and get OAuth credentials
Copy your OAuth json file contents to creds.json, remove .example extension
Code will automatically create token.json in same folder to store session token
- Api is dockerized with docker-compose, one command runs the Api server, Postgres server and PgAdmin
- Make sure to have Docker installed, if on Windows use Docker Desktop
- Navigate to your project directory and run command
docker compose up
- Verify the compose containers running with:
docker ps
- Thats it!
- School System Api is available on localhost:8000, PgAdmin is available on localhost:8080
- Postgres Database is externally available on localhost:5433, while for containers use db:5432
For running without docker, you can set .env USE_LOCAL_DB=True, which will instead use local sqlite database
Use uvicorn api.server:app --reload for running without Docker
- Visit localhost:8000/docs for interactive Swagger UI docs, or localhost:8000/redoc for ReDoc docs.
In development! :)