🗓️ Spring 2024
Title: A Sustainability Project
Objective: Develop a multi-user, web-based application using PHP and MySQL to help reduce waste from expired products in markets by making it easier to sell products nearing their expiration date at a lower price.
Team Size: 4 students (from any sections)
Deadline: 19 May 2024, Sunday, 23:59
Demonstration: 21st of May, Tuesday. Each team will demonstrate their project on a laptop at the instructor's office. Any member who doesn’t attend the meeting will not be graded. The team should reserve an appropriate time slot from the course’s Moodle page.
Submission: All project source codes, assets, and database exports should be uploaded to Moodle by one team member by the deadline (19th of May).
- 🔐 Registration: A market can register with email, market name, password, city, district, and address.
- ✏️ Update Information: A market can update/edit its information.
- 🆕 Add Product: A market user can add a new product nearing its expiration date into its inventory, including title, stock, normal price, discounted price, expiration date, and an image showing the expiration date.
- 🗑️ Delete/Edit Product: A market user can delete and edit a product.
⚠️ Mark Expired Products: On login, expired products in the list are marked.
- 🔐 Registration: A consumer can register with an email address, fullname, city, district, and address.
- ✏️ Update Information: A consumer can update their information.
- 🔍 Search Products: Consumers can search products with keywords, filtering by city and district, excluding expired products, and paginating results with a page size of 4.
- 🛒 Shopping Cart: Consumers can add products to a session-based shopping cart, update the cart, and view the grand total.
- 💳 Purchase Products: The "Purchase" button in the shopping cart page empties the cart and removes the products from the system.
- 📝 Form Validation: All forms are validated and offer sticky-form functionality.
- 🛡️ Security: Protection against SQL injection, XSS, and CSRF attacks.
- 🎨 User Interface: The system has a decent user interface using HTML templates, third-party jQuery plugins, and/or Bootstrap-like CSS frameworks.
- 📊 Meaningful Data: Use meaningful data for the demonstration.
- 📈 Meaningful Data: Sufficient amount of meaningful data for the demonstration (no garbage test data).
- ⏳ Late Submission: 20 points penalty for late submission. Submission will be closed on 20th of May, 23:59.
- ❌ Cheating: Strictly prohibited, resulting in a zero grade for all team members.
- Each team member is responsible for a particular part of the project.
- The demonstration will involve questions to all team members about the project to assess grades based on individual contributions.
- Clone the repository.
- Set up the database using the provided SQL scripts.
- Configure the database connection settings in the PHP files.
- Run the application on a local server (e.g., XAMPP, WAMP).
- Register: Users can register as either a Market or Consumer.
- Login: Users & Market can login using their email and password.
- Market User:
- Add products nearing their expiration date.
- Edit and delete products.
- View a list of expired products.
- Consumer User:
- Search for products by keyword.
- Add products to a session-based shopping cart.
- Update the shopping cart (delete, change the amount).
- Purchase products, which empties the cart and removes the products from the system.
- Arman Yılmazkurt: Responsible for Fullstack Development, Security, Database Product Management
- Ece Gülyüz: Responsible for Frontend Development, User Interface Design
- Agil Gumukov: Responsible for Fullstack Development, User Interface Design, Product List Addition
- Onurcan Genç: Responsible for Backend Development, User Authentication, Security, Service Management, SMTP Deployment
- Date: 21st of May, Tuesday
- Location: Instructor's office
- Reservation: Reserve a time slot on the course’s Moodle page
- Upload all project source codes, assets, and database exports to Moodle by 19th of May, 23:59.
- Hosting: Infinityfree
- Domain: Metunic
- Backend: PHP, PHP Composer
- Email Services: SMTP
- Frontend: Bootstrap
- Send Verification Code: Users receive a verification code via email upon registration.
- Validate Verification Code: Users must enter the verification code to complete the registration process.
- Add to Cart: Users can add products to the cart.
- Update Quantities: Users can update product quantities in the cart.
- Remove Items: Users can remove items from the cart.
- Proceed to Payment: Users can proceed to the payment page, clearing the cart upon submission.
- Clear Cart: Users can clear all items from the cart.
- Add Products: Users can use an AI assistant to add products to their cart based on natural language input.
- Voice Recognition: The AI assistant can process voice commands to add products to the cart using the Web Speech API.
- CSRF Protection: Generate and validate CSRF tokens to protect forms from cross-site request forgery.
- SQL Injection Prevention: Use prepared statements to prevent SQL injection attacks.
- XSS Protection: Sanitize user inputs to prevent cross-site scripting (XSS) attacks.
- Responsive Design: Ensure the application is usable on various devices, including desktops, tablets, and smartphones.
- User-Friendly Interface: Implement a clean, intuitive interface with easy navigation.
- Sticky Forms: Maintain form data during validation to enhance user experience.