A student billing management system built using the Flask web framework.
Category | Tech used |
---|---|
Client | HTML (Jinja template engine), CSS, Vanilla JS |
Server | Flask (Python web framework) |
Database | MariaDB |
ORM Tool | SQL Alchemy |
Database Management Tool | phpMyAdmin |
Server Stack | XAMPP |
Development Server | Werkzeug |
Development OS | Windows 11 |
Payment Provider | Stripe |
Mailer | Flask-Mail |
- Python (>=3.6)
- Poetry (Python package manager)
- XAMPP
- Start the Apache and MySQL servers from the XAMPP Control Panel.
- Navigate to the MySQL Admin phpMyAdmin
- Create a new database
- Name the database sbms
- Sign in to your Google account here
- Go to the "Security" tab
- Scroll down to the "How you sign in to Google" section
- Click the "2-Step Verification"
- If you have not turned the "2-Step Verification" on, scroll down and click the "Get Started" button below.
- Follow the process for enabling the "2-Step Verification"
- After enabling the "2-Step Verification", scroll down to the "App Passwords" section and click the right arrow next to it.
- Type in the app name (without quotes) "sbms" and click Create
- A dialog box will pop up with the app password. Copy the app password and paste it somewhere else first (i.e. IDE, Notepad). Remove the spaces in between after pasting the password.
- Click "Done" after copying the password.
- Create a new Stripe account here. Leave the country as it is.
- Check your email for activation instructions.
- Login to your Stripe account and navigate here to view your API keys.
- Click the "Publishable" and "Secret" keys to copy them and paste them somewhere else.
Install Poetry via Windows PowerShell (not via CMD)
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
Clone the project.
git clone https://github.com/nobrelli/Student-Billing-System.git sbms
Go to the project directory.
cd sbms
Go to the server directory.
cd server
Edit the config.py under server/system
directory.
- Type in your email address to
MAIL_USERNAME
- Copy the app password you have stored earlier and paste it into
MAIL_USERNAME
- Copy the Stripe publishable key you have stored earlier and paste it into
STRIPE_PUBLIC_KEY
- Copy the Stripe secret key you have stored earlier and paste it into
STRIPE_SECRET_KEY
...
# MAILER
MAIL_SERVER = 'smtp.gmail.com'
MAIL_PORT = 465
MAIL_USERNAME = ''
MAIL_PASSWORD = ''
MAIL_USE_TLS = False
MAIL_USE_SSL = True
STRIPE_PUBLIC_KEY = ''
STRIPE_SECRET_KEY = ''
...
Create and activate the virtual environment.
poetry shell
Install the dependencies.
poetry install
Run the Flask development server.
flask run
or
poetry run python run.py
Hold Ctrl
and click the link to view the application. NOTE: Port number may differ. Mine, in this case, is 5000
- Navigate again to phpMyAdmin
- Click the admin table
- In the admin table view, go to the SQL tab
- Paste the code below into the SQL editor.
INSERT INTO `admins` (`entry_date`, `admin_id`, `password`, `full`) VALUES
(NOW(), '111-111-1111', '$2b$12$A2.lIOpGNqu33UqfCtId2ODf.AC23LJA7dYmEBPH.JrA3IK3NTgf6', 1);
- Click Go at the bottom.
- Go back to the web app
- For admins, the url endpoint is
/admin/login
. For students, the url endpoint is/student/login
. - Enter the admin's ID
111-111-1111
and password54321
- Loading the student's billing tab requires internet connection to load the Stripe's interface.