A full-stack web application for managing an English language center. The system provides course browsing, student registration, online payment, email confirmation, and user account management through a clean Flask-based architecture.
The English Center Management System is designed to simplify course enrollment and administration for an English training center.
The application allows visitors to browse available courses, create accounts, enroll in classes, complete online payments through PayOS, and receive confirmation emails after successful registration.
The project follows a modular architecture based on Flask, making it easy to maintain and extend.
- Register an account
- Login / Logout
- View profile
- Browse available courses
- View course details
- Register for courses
- Online payment using PayOS
- Receive registration confirmation emails
- Manage courses
- Manage student information
- Manage enrollments
- View payment information
- Monitor system activities
| Component | Technology |
|---|---|
| Backend | Python, Flask |
| ORM | SQLAlchemy |
| Database | MySQL |
| Authentication | Flask-Login |
| Email Service | Flask-Mail |
| Payment Gateway | PayOS |
| Frontend | HTML5, CSS3, JavaScript |
| Template Engine | Jinja2 |
The application follows a lightweight MVC-style architecture.
Client Browser
│
▼
Flask Routes
│
▼
Business Logic
│
▼
Database Access
│
▼
MySQL Database
Project layers:
- Presentation Layer
- Business Logic Layer
- Data Access Layer
English-Center
│
├── app/
│ ├── __init__.py
│ ├── dao.py
│ ├── index.py
│ ├── models.py
│ │
│ ├── routes/
│ │ └── routes.py
│ │
│ ├── services/
│ │ ├── email_service.py
│ │ └── payos_service.py
│ │
│ ├── static/
│ │ ├── css/
│ │ └── javascript/
│ │
│ └── templates/
│ ├── email/
│ └── layout/
│
├── engdb.sql
├── requirements.txt
├── LICENSE
└── README.md
Contains the entire application source code.
Initializes the Flask application.
Responsibilities include:
- Flask application configuration
- Database connection
- SQLAlchemy initialization
- Login Manager configuration
- Flask-Mail configuration
- Loading application modules
Defines all database models.
Responsibilities include:
- User model
- Course model
- Enrollment model
- Relationship mapping
- Database constraints
Implements the Data Access Layer.
Responsibilities include:
- Database queries
- CRUD operations
- Business data retrieval
- SQLAlchemy interaction
Separating database operations into DAO improves maintainability and keeps routing logic clean.
Contains all HTTP routes.
Responsibilities include:
- URL mapping
- Form handling
- User authentication
- Course registration
- Payment requests
- Rendering templates
Contains external business services.
Handles email functionality.
Features include:
- Sending registration confirmation emails
- Email template rendering
- SMTP integration
Handles communication with the PayOS payment gateway.
Responsibilities include:
- Payment request creation
- QR payment generation
- Payment verification
- Callback processing
Contains static resources.
Website stylesheets.
Client-side JavaScript functionality.
Contains all Jinja2 templates.
Main web pages:
- Home
- Login
- Register
- Profile
- Course Detail
- Payment
- Invoice
- Header
- Footer
- Base Layout
Email templates used for automated notifications.
The project includes a MySQL database script:
engdb.sql
The script creates all required tables together with sample data.
User authentication is implemented using Flask-Login.
Supported features include:
- User Login
- User Logout
- Session Management
- Protected Pages
The application integrates with PayOS.
Payment workflow:
- User selects a course.
- System creates a payment request.
- PayOS generates a QR Code.
- User completes payment.
- Callback verifies payment.
- Enrollment is confirmed.
After successful registration or payment, the system automatically sends a confirmation email using Flask-Mail.
Email templates are located in:
app/templates/email/
The frontend is built using:
- HTML5
- CSS3
- JavaScript
- Jinja2 Templates
Pages include:
- Home
- Login
- Register
- Profile
- Course Detail
- Payment
- Invoice
- Python 3.x
- MySQL
- Git
git clone <repository-url>
cd English-Centerpip install -r requirements.txtCreate a MySQL database and import:
engdb.sql
Modify the database configuration inside:
app/__init__.py
Example:
SQLALCHEMY_DATABASE_URI =
mysql+pymysql://username:password@localhost/engdbpython app/index.pyor
flask run- User Authentication
- Course Management
- Student Enrollment
- Payment Processing
- Email Notification
- User Profile Management
- Modular Flask architecture
- SQLAlchemy ORM
- MVC-inspired design
- PayOS payment integration
- Email automation
- Responsive HTML templates
- MySQL relational database
- Clean folder organization
- Admin Dashboard
- Teacher Management
- Attendance Tracking
- Course Scheduling
- JWT Authentication
- RESTful API
- Docker Deployment
- CI/CD Pipeline
- Unit Testing
- Selenium End-to-End Testing
This project is licensed under the MIT License.
Developed as an academic project for learning Flask web development and modern web application architecture.