This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
This is an example of how to list things you need to use the software and how to install them.
- Python 3 - Download instructions here
- Pip 3 (usually gets installed automatically with Python)
- MySQL Server - If you haven't already, download the package from here, then create a user account and note the username and password
If all the above are satisfied, you may proceed to the next section.
Follow these insturctions to setup your own instance of the app:
(PS: The instructions may look lenghty, but they;re simple and just explained in detail, so please don't click away. I would highly recommend you having a look at the codebase and trying the app for yourself.)
Find instructions for cloning/downloading this repo here, then unzip the repository
Or if you have git command line installed, clone using this command:
git clone https://github.com/lechithinh/UIT-AI-Trainer
Open terminal/cmd/powershell and change directory/folder to the cloned folder. Here are the instructions
The command for the same would be
cd Location\ To/UIT-AI-Trainer
After you cd into the repo folder, ensure you see the following cmd/terminal prompt
Something.../UIT-AI-Trainer $
If not, repeat the previous step.
After this, run the following command in cmd/terminal:
pip install -r requirements.txt
To create the database from the MySQL schema, either:
1: Copy-paste the contents of sql/hms.sql directly into the MySQL command line, or
2: Use the command to do it automatically (from cmd)
mysql -u <mysql-username> -p<mysql-password> < hms.sql
This will create and setup the database.
(Note: Don't include the "<>" angular brackets in the command, and replace the <mysql-username>
and <mysql-password>
with the credentials created, as discussed in the Prerequisites Section)
Start by renaming the .example.env
file just .env
, and then replacing the Your-Username
and Your-Password
values with the MySQL credentials.
In order to make the app's gui look good, you will have to install the Montserrat font. From the assets
folder, install all three fonts (with .ttf
format) by double clicking them.
Run main.py
file with python 3 and you should see the login window, if you have followed each step correctly.
The default username and password are username
and password
respectively.
Here are some things you may try with the app
To add new login credentials, you will have to create new users by directly adding records to the database in the login
table. Run the command to insert new login credentials:
INSERT INTO login (username, password) values ("your-username", "your-password");
(PS: This is the only part of the app that requires direct database interactions, since you can't add a signup page to an admin-based application without compromising on security, though our previous app versions had the feature, along with reset and forget password.)