This project is a new version of a previous project that used Python and stored data in a CSV file for Tuk Tuk Tour of 15th Photo Phnom Penh Festival.
- User registration with name, email, phone number, and event selection
- QR code generation containing a unique user ID
- Admin QR code scanner for verification
- Two event days with a maximum of 200 tickets each
- MySQL database integration to store user and event details
- Express.js backend and React frontend
- Frontend: React
- Backend: Express.js (Node.js)
- Database: MySQL
Column | Type | Description |
---|---|---|
id | INT (PK) | Unique user ID |
name | VARCHAR(100) | User's full name |
VARCHAR(100) | User's email | |
phone | VARCHAR(20) | User's phone number |
used | TINYINT(1) | Whether the ticket has been used (0 = No, 1 = Yes) |
eventId | INT (FK) | Associated event ID |
Column | Type | Description |
---|---|---|
id | INT (PK) | Unique event ID |
name | VARCHAR(100) | Event name (e.g., Day 1, Day 2) |
ticket | INT | Number of remaining tickets |
Column | Type | Description |
---|---|---|
id | INT (PK) | Unique admin ID |
username | VARCHAR(100) | Admin username |
password | VARCHAR(100) | Admin password |
-
Clone the repository:
git clone https://github.com/SeaHuyty/2ndYear-Term2-Database-Project.git cd 2ndYear-Term2-Database-Project
-
Install Libraries and Dependency
-
Backend:
cd backend npm install
-
Frontend:
cd frontend npm install
-
-
Start the backend:
node server.js
-
Start the frontend:
npm run dev
- User Registration: Fill out the form and select an event day.
- QR Code Generation: A unique QR code will be displayed after successful registration.
- Scanning & Verification: The admin scans the QR code, and the system verifies if it is valid and unused.
This project is licensed under the MIT License.