Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
NGROK_DOMAIN=https://symphony-keenly-herald.ngrok-free.dev

NGROK_TOKEN=3Cwy9MUnWElVB4eB34WRGd8OBNC_2WMSBNw61bVyLjGu3YxsP
NGROK_DOMAIN=https://immorally-trio-amaretto.ngrok-free.dev
SEPAY_API_TOKEN=hanolu

BANK_ID=MB
BANK_ACCOUNT_NO=0168508418888
BANK_ACCOUNT_NAME=Hoang Ngoc Luyen
BANK_ACCOUNT_NAME=Hoang Ngoc Luyen
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: TicketHub CI Pipeline

on:
push:
branches: [ "main", "main_merge_2" ]
branches: [ "main", "main_merge_2", "final#1" ]
pull_request:
branches: [ "main" ]

Expand Down
41 changes: 36 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ Hệ thống bán vé sự kiện trực tuyến cho phép:
| MSSV | Họ tên | Vai trò |
|------|--------|---------|
| 2351050100 | Nguyễn Thanh Mẫn | Trưởng nhóm - Backend-Frontend, Admin Services, Docker, DevOps,CI GITHUB ACTION,Documents |
| 2351010012 | Trần Minh Ánh | Frontentend-Backend, Customers Services, Landing pages|
| 2351010120 | Hoàng Ngọc Luyến | Frontend-Backend,Documents,Orgainizer Services |
| 2351010012 | Trần Minh Ánh | Frontentend-Backend, Customers Services, Landing pages,Documents|
| 2351010120 | Hoàng Ngọc Luyến | Frontend-Backend,Documents,Orgainizer Services,Documents |

## Công nghệ sử dụng
| Thành phần | Công nghệ |
|-----------|-----------|
| Backend | Python - Flask (RESTful API) |
| Frontend | HTML/CSS/JS, Bootstrap 5, Swiper.js |
| Frontend | HTML/CSS/JS, Bootstrap 5 |
| Database | MySQL + SQLAlchemy ORM |
| Message Queue | RabbitMQ + Celery |
| Container | Docker + Docker Compose |
Expand All @@ -27,10 +27,15 @@ Hệ thống bán vé sự kiện trực tuyến cho phép:

## Kiến trúc
Hệ thống sử dụng kiến trúc **Layered + MVC**:
- **Presentation Layer:** Flask Routes + HTML Templates
- **Presentation Layer:** Flask Routes + Jinja2 Templates
- **Business Logic Layer:** Python Services
- **Data Access Layer:** SQLAlchemy Models
- **Mô tả:** Hệ thống TicketHub được xây dựng theo kiến trúc Layered 3 tầng kết hợp MVC, trong đó Presentation Layer (Flask Routes + Jinja2 Templates) làm nhiệm vụ tiếp nhận HTTP request và render giao diện, Business Logic Layer (Python Services + Controllers) xử lý toàn bộ nghiệp vụ như đăng nhập, đặt vé, thanh toán, duyệt sự kiện và thống kê doanh thu, còn Data Access Layer (SQLAlchemy ORM Models) định nghĩa các thực thể và thao tác trực tiếp với MySQL. Các tầng giao tiếp theo nguyên tắc một chiều từ trên xuống giúp code rõ ràng, dễ bảo trì và thuận tiện cho phân công công việc trong nhóm.


---

![C4 Container](docs/architecture/C4-Diagram/L3_Components.png)
## Trạng thái dự án

| Tuần | Nội dung |
Expand All @@ -48,7 +53,6 @@ Hệ thống sử dụng kiến trúc **Layered + MVC**:

---

![C4 Container](docs/architecture/C4-Diagram/L3_Components.png)

## Cài đặt và chạy

Expand All @@ -58,6 +62,33 @@ Hệ thống sử dụng kiến trúc **Layered + MVC**:

### Chạy với Docker Compose
```bash
-Lưu ý: Thiết lập môi trường trước khi chạy Docker Compose
git clone https://github.com/mantks0803/EventTicketing_A3.git
cd EventTicketing_A3
docker-compose up -d --build
docker exec -it tickethub_backend python models.py (Create tables)
Get-Content database/migrations/init.sql | docker exec -i tickethub_db mysql -uroot -pyour_password event4 (Insert sample data if needed)
Power-Shell : type database\migrations\init.sql | docker exec -i tickethub_db mysql -uroot -p08032005 event4
```
### Cấu trúc thư mục
- .github/workflows (Github CI)
- backend/ (routes, services, models, tasks)
- frontend/ (css, js, templates)
- database/ (migrations)
- docs/ (adrs, api, architecture, sequence)
- tests/
- useCases/
- docker-compose.yml
### Truy cập
- http://localhost:8000 - Trang chủ
- http://localhost:8000/admin - Admin Dashboard
- http://localhost:8000/organizer - Organizer Dashboard
- http://localhost:15672 - RabbitMQ Management

### Demo
demo
### Tài liệu
- [ADRs](docs/adrs/)
- [API Documents](docs/api/)
- Toàn bộ API được mô tả chi tiết theo chuẩn OpenAPI 3.0.3 trong file (docs/api/openapi.yaml) . Có thể xem bằng cách import file openapi.yaml vào https://editor.swagger.io/.

6 changes: 3 additions & 3 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.10-slim
FROM python:3.11-slim
WORKDIR /app
COPY src/requirements.txt .
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY src/ .
COPY src/ /app/
CMD ["python", "app.py"]
65 changes: 65 additions & 0 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
amqp==5.3.1
attrs==26.1.0
billiard==4.2.4
blinker==1.9.0
celery==5.6.3
celery-types==0.26.0
certifi==2026.2.25
cffi==2.0.0
click==8.3.1
click-didyoumean==0.3.1
click-plugins==1.1.1.2
click-repl==0.3.0
cloudinary==1.44.1
colorama==0.4.6
cryptography==46.0.7
dnspython==2.8.0
et_xmlfile==2.0.0
eventlet==0.41.0
flasgger==0.9.7.1
Flask==3.1.3
flask-cors==6.0.2
Flask-JWT-Extended==4.7.1
Flask-SQLAlchemy==3.1.1
greenlet==3.3.2
iniconfig==2.3.0
itsdangerous==2.2.0
Jinja2==3.1.6
jsonschema==4.26.0
jsonschema-specifications==2025.9.1
kombu==5.6.2
MarkupSafe==3.0.3
mistune==3.2.0
numpy==2.4.4
openpyxl==3.1.5
packaging==26.0
pandas==3.0.2
pandas-stubs==3.0.0.260204
pika==1.3.2
pluggy==1.6.0
prompt_toolkit==3.0.52
pycparser==3.0
Pygments==2.20.0
PyJWT==2.12.1
PyMySQL==1.1.2
pytest==9.0.3
python-dateutil==2.9.0.post0
python-dotenv==1.0.0
python3-pika==0.9.14
PyYAML==6.0.3
redis==7.4.0
referencing==0.37.0
reindent==3.5.1
rpds-py==0.30.0
setuptools==82.0.1
six==1.17.0
SQLAlchemy==2.0.48
tasks-py==1.0.3
typing_extensions==4.15.0
tzdata==2026.1
tzlocal==5.3.1
urllib3==2.6.3
utils==1.0.2
vine==5.1.0
wcwidth==0.6.0
Werkzeug==3.1.6
2 changes: 1 addition & 1 deletion backend/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
app = create_app()

if __name__ == '__main__':
app.run(debug=True, port=8000)
app.run(host='0.0.0.0', port=8000, debug=True)
1 change: 0 additions & 1 deletion data-testing/add_is_payout_complete.sql

This file was deleted.

Loading
Loading