A comprehensive real-time pizza delivery tracking system built with Node.js, Express, MongoDB, EJS, and Socket.IO. It features a customer and admin dashboard, order tracking, and real-time updates. The app also integrates Nodemailer for sending email notifications.
- Push the project to GitHub.
- deploy https://sujoy-pizza.onrender.com
- Real-Time Order Tracking: Track pizza delivery in real-time using Google Maps and Socket.IO.
- Customer Dashboard: Place orders, view order history, and track delivery status.
- Admin Dashboard: Manage orders, update status, and view order details.
- Nodemailer Integration: Send order confirmation and status update emails to customers.
- User Authentication: Secure login and registration for customers and admin.
- Responsive Design: Works seamlessly across devices.
- Frontend: HTML, CSS, Bootstrap, EJS
- Backend: Node.js, Express, MongoDB, Socket.IO
- Email: Nodemailer
- Deployment:Render (All)
- Node.js and npm installed
- MongoDB database
-
Clone the repository:
git clone https://github.com/sujoyghoshal/RealTime-Pizza-Tracker.git cd RealTime-Pizza-Tracker
-
Install dependencies:
npm install
-
Set up environment variables: Create a
.env
file in the root directory and add your configuration:PORT=3000 COOKIE_SECRET='Your secret KEY' MONGO_URI=<your_mongodb_connection_string> EMAIL_USER=<your_email_address> EMAIL_PASS=<your_email_password> [email protected] GMAIL_PASS=cxspuzwlfoebftuz
-
Run the app:
npm start
-
Access the application:
- Frontend:
http://localhost:3000
- Admin Panel:
http://localhost:3000/admin
- Frontend:
Nodemailer is used to send order confirmation and status updates to customers.
-
Install Nodemailer:
npm install nodemailer
-
Configure Nodemailer in
mailer.js
:const nodemailer = require('nodemailer'); const transporter = nodemailer.createTransport({ service: 'gmail', auth: { user: process.env.EMAIL_USER, pass: process.env.EMAIL_PASS } }); module.exports = transporter;
-
Send email notifications:
const transporter = nodemailer.createTransport({ service: "gmail", secure: true, port: 465, auth: { user: process.env.GMAIL_USER, pass: process.env.GMAIL_PASS } }); const mailOptions = { from: process.env.GMAIL_USER, to: req.user.email, subject: "Order Confirmation", text: `Hello ${req.user.name}, your order has been confirmed! Order ID: ${order._id}` };
Contributions, issues, and feature requests are welcome! Feel free to check issues page.
This project is licensed under the MIT License.
- Author: Sujoy Ghoshal
- Email: [email protected]