This repository contains a full-stack web application for "ChickNext's Ken," a conceptual Korean fried chicken restaurant. This project was developed as part of the ITDS242: Web Technologies Lab course at Mahidol University.
The application provides a user-facing website for browsing the menu and an admin dashboard for managing products and users, secured with Google reCAPTCHA.
- Home Page: Features a promotional carousel and highlights key menu items.
- Menu & Categories: Browse all products, filterable by categories (Chicken, Snacks, Drinks, Toppings).
- Search: A dedicated search page with advanced filters for price, promotion status, and type.
- Product Details: View detailed information for each menu item.
- About Us: A team page listing the project members and contact information.
- Secure Login: Admin login page is protected by Google reCAPTCHA and requires admin credentials.
- Session Management: Uses cookies to maintain admin login sessions.
- Product Management (CRUD): Full capabilities to add, view, update, and delete menu items (products).
- Admin Management (CRUD): Full capabilities to add, view, update, and delete admin accounts.
- Frontend: HTML, CSS, JavaScript
- Backend: Node.js, Express.js
- Database: MySQL
- Node.js Libraries:
expressmysql2body-parsercookie-parsercorsdotenvfsmulter(for image uploads)nodemon(for development)
- Web Services: Google reCAPTCHA v2
To run this project locally, please follow these steps.
Ensure the project directory is organized as follows:
- Import the
sec2_gr8_database.sqlfile into your MySQL server. This will create thechicknextdatabase and populate initial data. - Create a new user account in MySQL with the following credentials:
- Username:
itds242 - Host:
localhost - Password:
ict555!!!
- Username:
- Grant privileges to this new user:
- Go to User and Privileges.
- Select the
itds242user. - Go to the Schema Privileges tab.
- Click Add Entry.
- Select Selected schema and choose
chicknext. - Grant all Object Rights (SELECT, INSERT, UPDATE, DELETE, etc.).
- Navigate to the backend directory:
cd Project_Sec2_gr8/Sec2_gr8_ws_src/back - Initialize the project and install dependencies:
npm init # When prompted, set the entry point to: back.js npm install body-parser cookie-parser cors dotenv express fs multer mysql2 nodemon - Open the
package.jsonfile and in thescriptssection, add:"scripts": { "start": "nodemon back.js" }
- Start the backend server (leave this terminal running):
npm start
- Open a new terminal and navigate to the frontend directory:
cd Project_Sec2_gr8/Sec2_gr8_ws_src/front - Initialize the project and install dependencies (same as backend):
npm init # When prompted, set the entry point to: front.js npm install body-parser cookie-parser cors dotenv express fs multer mysql2 nodemon - Open the
package.jsonfile and in thescriptssection, add:"scripts": { "start": "nodemon front.js" }
- Start the frontend server (leave this terminal running):
npm start
Once both servers are running, you can access the website at: http://localhost:3030
- Thanyarat Wuthiroongreungsakul
- Kemisara Anankamongkol
- Chawanwit Khuanphatkul
- Sirathee Klinbua