This is a simple student management system that allows you to add, delete, update and view students.
It is a web application that uses MySQL to store the student data.
The application is deployed on Azure and can be accessed at the following URL:
When login credentials are requested, use the following (case-sensitive):
- Username: HDDS2401
- Password: 2024
The software is developed using the following approach:
-
Programming Language: Python
- Reason: Python is a versatile and widely-used language, especially suitable for web development and data manipulation. It has a rich ecosystem of libraries and frameworks that facilitate rapid development.
-
Framework: Sanic
- Reason: Sanic is an asynchronous web framework for Python that is designed for quick HTTP responses. It is suitable for building high-performance web applications.
-
Template Engine: Jinja2
- Reason: Jinja2 is a fast, expressive, and extensible templating engine for Python. It allows for the separation of HTML presentation from Python code, making the codebase cleaner and more maintainable.
-
ORM: SQLAlchemy with aiomysql
- Reason: SQLAlchemy is a powerful and flexible ORM that supports asynchronous operations with aiomysql. This combination allows for efficient database interactions in an asynchronous environment.
-
Cloud Service Model: Infrastructure as a Service (IaaS)
- Reason: IaaS provides the most control over the infrastructure, allowing for custom configurations and optimizations. It is suitable for applications that require specific setups or have high performance and scalability needs.
-
Database: MySQL
- Reason: MySQL is a reliable and widely-used relational database management system. It is well-supported and integrates seamlessly with SQLAlchemy and aiomysql for asynchronous operations.
This approach ensures a robust, scalable, and maintainable web application that leverages modern asynchronous programming techniques for high performance.
The student management system provides the following features:
- Add a new student
- Delete an existing student
- Update student information
- View all students
- Ubuntu 20.04 LTS (or newer)
- Python 3.9+
- MySQL (In this case, Azure Database for MySQL is used)
To install and run the student management system, follow these steps:
-
Create an Azure Database for MySQL server:
- Go to the Azure portal and create a new Azure Database for MySQL server.
- Select
Quick Create -
- Note down the
username,passwordfor later use. -
- Wait for deployment complete.
- Once deployed, note down the
serve namefor later use. -
- Go to
Settings->Server parameters, setrequire_secure_transporttoOFF. When done, pressSave. -
- Go to
Settings->Databases, add a new database namedsmy_db. -
- Go to
Settings->Networking, allow internet access from all networks (+ Add 0.0.0.0 - 255.255.255.255). When done, clickSave. -
-
Create an Azure Virtual Machine:
- Go to the Azure portal and create a new Azure Virtual Machine.
- Choose
Ubuntu 20.04 LTSas the operating system and Size asStandard_B1s. -
- On networking, open port
80for HTTP traffic and port443for HTTPS traffic. (Default22SSH port is already opened) - Enter your own
usernameandpasswordfor the virtual machine. -
- Choose disk size
64GB. -
- Once deployed, note down the
Public IP addressof the virtual machine. -
-
Connect to the Virtual Machine:
- Use SSH to connect to the virtual machine using the public IP address.
- Use the following command:
ssh username@public-ip-address
- Enter the password when prompted.
- Update the package list and upgrade the installed packages:
sudo apt update && sudo apt upgrade -y - Install the necessary packages:
sudo apt install git python3 python3-venv python3-pip -y
-
Clone the Repository:
- Follow the project setup instructions below.
Inside the virtual machine, follow these steps:
Clone this repository:
git clone https://github.com/01101sam/HDDS2401_Student_Managment_System student-management-system
cd student-management-systemCreate a virtual environment:
python3 -m venv venv
source venv/bin/activateInstall the dependencies:
pip install -r requirements.txtUpdate the database connection details in the .env file:
cp .env.example .env
nano .env
# or vim .envReplace the placeholders with your Azure Database for MySQL connection details.
Run the application:
sudo venv/bin/python app.pyThe application should now be running on the virtual machine. You can access it by navigating to the public IP address