AppAcademy is a comprehensive Management Solution for Dance Schools. Our mission is to provide a modern and efficient solution to dance schools, allowing them to manage all aspects related to their students, teachers, classes and registrations in an agile and organized manner.
This project focuses on a backend solution, through the implementation of a database capable of managing the registrations of new students, teachers, classes, discounts, and dance sessions. The project is loaded with some example data that you can initialize to see how it works, or skip it and enter the information you consider necessary.
Follow the instructions to start the application
Clone this repo
git clone https://github.com/kamilodev/AppAcademy.git
Go to the project directory and create your virtual environment
cd AppAcademy
python -m venv venv
Installing dependencies according to your environment manager
pip install -r requirements.txt
pipenv install
Rename the .env.example file to .env and edit the environment variables with the actual data of your local or remote MySQL database connection.
The variable named MYSQL_ADDON_DB is the name of the database you will use for the project, set the name equal to the name that appears in lines 1 and 2 of the app_academy_db.sql file. If you do not want to change the default name which is app_academy_db, set this variable with this name.
Open your Database Manager and connect to a local or remote server. At this point you don't need to have the database created, just test the connection and it is correct, note that the database field is empty for now.
![MySQL Connection](/kamilodev/AppAcademy/raw/main/assets/connection.jpg)
Once you have connected correctly, you must open the query editor, open the file app_academy_db.sql, copy all its content, paste it inside the editor, and execute all the queries, this will create the database, tables, and initial data.
Remember that this is the same process to do it in a Cloud database.
![Run Queries](/kamilodev/AppAcademy/raw/main/assets/run_query.jpg)
Great! You now have a working database
![Database Working](/kamilodev/AppAcademy/raw/main/assets/database.jpg)
Now it is time to set up our FastAPI server.
Open a terminal and activate your virtual environment, then run the following command:
uvicorn App:app --reload
If everything went well, you should see the following message:
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
Open your browser and go to the following address:
http://127.0.0.1:8000/docs
If your ip address is different, replace it with the one that appears in the terminal, and add /docs to the end
You should see the following page, here, you will can interact with all endpoints, read, write, update, or delete info
![FastAPI Docs](/kamilodev/AppAcademy/raw/main/assets/fastapi.jpg)
-
Backend application with MySQL and FastAPI.
-
Complete CRUD system for categories, students, teachers, classes, enrollments, courses, levels, users, and discounts.
-
Teachers can belong to one or several classes, in one or several levels.
-
Discounts are offered if there are two or more classes belonging to the same pack, if the student enrolls in more than one of the same teacher's courses, or if a family member also enrolls in the academy.
-
Each student can have only one enrollment, but be enrolled in as many classes and levels as he/she wants.
-
Each student has a status as active or inactive, so, if you no longer take classes you will be inactive, but your data will remain in the database of the academy in case you want to resume your classes someday.
Carol |
David |
Berta |
Kamilo |