Welcome to JetSetGo2, your ultimate travel companion!
JetSetGo2 is a web-based platform designed to simplify and enhance the process of planning your trips. Whether you're traveling for leisure, business, or adventure, JetSetGo offers a seamless experience by bringing all your travel needs to one place.
JetSetGo2 is your ultimate travel companion, created to transform the way you plan trips. It eliminates the hassle of manual planning and introduces a seamless, all-in-one platform that empowers you to manage every aspect of your journey effortlessly. Whether it’s personalized itineraries, smart budgeting, or real-time updates, JetSetGo2 ensures your travel experience is stress-free and unforgettable.
JetSetGo2 is currently under active development and is not yet recommended for production environments. While the core features are operational, a few exciting enhancements are still in progress:
-
Loyalty Level and Badge Updates:
- This feature, designed to reward our users, is still in the works and will be a game-changer once implemented.
-
Promo Code Creation by Admin:
- The groundwork for this feature is ready, but a missing navigation button is temporarily keeping this functionality out of reach. Stay tuned for its debut!
-
UI/UX Enhancements:
- The visual experience is evolving, and our team is dedicated to delivering a polished, intuitive interface in upcoming updates.
-
Performance and Scalability Optimizations:
- Efforts are ongoing to ensure JetSetGo2 is faster, smoother, and capable of handling a growing user base.
JetSetGo2 adheres to robust coding standards to ensure clarity, consistency, and collaboration across the development process:
- Tools Used:
- Prettier: Enforces automatic code formatting, making our code clean, readable, and uniform across the project.
- Style Guidelines:
- We follow the StandardJS code style guidelines for JavaScript, ensuring a widely recognized and reliable convention.
- In the backend, a blank line is always left between methods and routes, fostering better readability and logical organization.
- Why It Matters:
- Adopting a consistent code style reduces errors, enhances teamwork, and ensures that anyone can easily navigate the project without confusion. JetSetGo2’s code is written not just for the present but for future scalability and collaboration.
JetSetGo2 is powered by a modern MERN stack to ensure scalability, performance, and a seamless user experience:
- Frontend: React.js, Axios, Bootstrap CSS
- Backend: Node.js, Express.js
- Database: MongoDB
- Authentication: JSON Web Tokens (JWT)
- Payment Integration: Stripe API
- API Integration: Amadeus API for flight and hotel booking
- Mapping Service: OpenStreetMap for interactive maps and location-based services
JetSetGo2 delivers a comprehensive suite of features designed to revolutionize travel planning and management. Here’s what our platform offers:
- User Authentication: Secure registration and login system for multiple user roles, including tourists, tour guides, and advertisers.
- Password Recovery: Easily recover passwords using OTP verification for hassle-free account access.
- Role-Based Access: Distinct functionalities tailored for tourists, tour guides, advertisers, and tourism governance entities.
- Guest Access: Limited functionalities for non-registered users, allowing exploration of the platform.
- User Profiles: Manage personal details, travel history, and preferences for a tailored experience.
- Upload Documents: Upload required documents during the registration process for tour guides, advertisers, or sellers.
- Trip Planning Tools: Create and organize personalized itineraries and activities for a seamless travel experience.
- Activity Management: Schedule, view, and manage activities during trips with an intuitive interface.
- Interactive Maps: Visualize destinations and travel plans with integrated map support.
- Promotions and Discounts: Personalized promo codes and offers to enhance user engagement.
- Loyalty Rewards: Earn points for frequent travel activities and redeem them for discounts.
- Currency Selection: Choose the currency in which you want to view prices.
- Search and Filter: Advanced options to find destinations, services, and reviews quickly.
- Reviews and Recommendations: Access and contribute reviews for destinations and services.
- Social Integration: Share trips, reviews, and recommendations with other users.
- Bookmark Events: Save events to view later and request notifications when bookings open.
- Admin Management: Comprehensive admin tools for monitoring platform activity, managing users, and enforcing compliance.
- Promotional Tools: Options for advertisers to promote services and destinations effectively.
- Third-Party Integration: Seamless API integration for travel-related services, such as flight and hotel booking.
- Activity and Itinerary Management: Create, read, update, or delete activities and itineraries, along with necessary details.
- Responsive Design: Fully optimized for both mobile and desktop devices.
- Notifications: Timely alerts for upcoming trips, activities, bookings, and payment receipts.
- Feedback Collection: Built-in mechanism to gather user feedback for continuous improvement.
- Loyalty Badges: Earn badges based on activity and engagement levels.
- Secure Data Management: Robust security for personal and sensitive user data.
- Booking History: View and manage past trip and service bookings with ease.
- Sales Reports: Generate reports on sales, revenue, and tourist attendance for events or itineraries.
- Complaints and Resolutions: File, view, and manage complaints with status tracking and admin replies.
- Product Management: View available products, add them to wishlists or carts, and complete purchases.
- Product Ratings and Reviews: Rate and review products after purchase.
- Payment Options: Pay using a wallet, credit card (via Stripe), or cash on delivery.
- Order History: View current and past orders, including statuses and cancellations.
- Payment Options: Pay for activities, itineraries, or products using a wallet, credit card (via Stripe), or cash on delivery(for products).
- Payment Receipts: Receive detailed payment receipts via email for all transactions.
- Wallet Integration: View wallet balance updates after payments or cancellations.
- Loyalty Points: Redeem loyalty points to add cash to your wallet.
const createTourist = async (req, res) => {
// create a tourist after sign up
const {
Email,
UserName,
Password,
MobileNumber,
Nationality,
DateOfBirth,
Job,
} = req.body;
// Validation checks
if (
!Email ||
!UserName ||
!Password ||
!MobileNumber ||
!Nationality ||
!DateOfBirth ||
!Job
) {
return res.status(400).json({ error: "All fields are required." });
}
// Example: Validate Email format
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (!emailRegex.test(Email)) {
return res.status(400).json({ error: "Invalid email format." });
}
// Example: Validate MobileNumber (it should be a number and not less than 10 digits)
if (isNaN(MobileNumber) || MobileNumber.toString().length < 10) {
return res
.status(400)
.json({ error: "Mobile number must be at least 10 digits." });
}
// Example: Validate DateOfBirth (it should be a valid date)
const dob = new Date(DateOfBirth);
if (isNaN(dob.getTime())) {
return res.status(400).json({ error: "Invalid date of birth." });
}
try {
const tourist = await touristModel.create({
Email,
UserName,
Password,
MobileNumber,
Nationality,
DateOfBirth,
Job,
Admin_Acceptance: true,
});
res.status(200).json(tourist);
} catch (error) {
res.status(400).json({ error: error.message });
}
};
This component allows a user (tourist) to create an account by entering details like username, email, password, and more. The form data is sent to a backend API for processing, and the user is redirected to a login page upon successful signup.
const loginUser = async (req, res) => {
const { Email, Password } = req.body;
try {
let user = await SellerModel.findOne({ Email });
let AccountType = "Seller";
// If not found in Seller, search in Adver
if (!user) {
user = await AdverModel.findOne({ Email });
AccountType = "Advertiser";
}
// If not found in Adver, search in TourGuide
if (!user) {
user = await TourModel.findOne({ Email });
AccountType = "TourGuide";
}
if (!user) {
user = await TouristModel.findOne({ Email });
AccountType = "Tourist";
}
if (!user) {
user = await AdminModel.findOne({ Email });
AccountType = "Admin";
}
// If user is not found in any model
if (!user) {
return res.status(401).json({ message: "Invalid credentials" });
}
// Check if password matches
if (user.Password !== Password) {
return res.status(401).json({ message: "Invalid credentials" });
}
// Generate JWT token including AccountType
const token = jwt.sign(
{ userId: user._id, Email: user.Email, AccountType: AccountType }, // Include AccountType
process.env.JWT_SECRET, // Your secret key
{ expiresIn: "1h" } // Token expiration
);
res.json({
token,
userId: user._id,
Email: user.Email,
AccountType: AccountType,
profileCompleted: user.Profile_Completed || false, // Assuming the field 'profileCompleted' exists
adminAccept: user.Admin_Acceptance || false,
}); // Send token, AccountType, and profileCompleted back to client
} catch (error) {
console.error("Login error:", error);
res.status(500).json({ message: "Server error", error: error.message });
}
};
This functionality allows users (tourists, tour guides, advertisers, etc.) to securely log in to the platform by entering their credentials. The authentication token is stored locally to enable seamless access to protected routes and features.
Follow these steps to set up JetSetGo2 locally:
- Node.js (v14 or higher)
- MongoDB
- Git
- Clone Our Repository:
git clone https://github.com/Advanced-computer-lab-2024/JetSetGo2.git
- Install dependencies:
In the first terminal
cd backend
npm install
Another terminal
cd frontend
npm install
- Set environment variables:
Create a
.env
file in the root directory and add the necessary environment variables:
MONGO_URI = "mongodb+srv://marwanallam8:[email protected]/"
JWT_SECRET = 123@abc$in4
EMAIL_USER = [email protected]
EMAIL_PASSWORD = himy vxuv rfvz znqw
STRIPE_SECRET_KEY= sk_test_51QQBfPKbaBifWGn1fXWxcx0EP2pM8w3mbIuiCioPXVwWwaaLneXESzR68ZJkabcYsNAo9my2oXr20RuWu96jiXQX00sOLXsAlz
Webhook_secret_key = whsec_395bd0204bc24e6ff41dad457b0bf0ca6f1961c497f09b6197045c434bae761a
- Run the application:
In the first terminal
cd backend
nodemon server.js
In the second terminal
cd frontend
npm start
JetSetGo2 provides a comprehensive API for managing users, activities, itineraries, and more. Below is a list of available endpoints with their descriptions:
- POST
/home/tourist/addTourist
: Registers a new Toruist. - PUT
/home/tourist/updateTourist/:id
: Update tourist profile. - GET
/home/tourist/getTourist
: fetch all toursit. - GET
/home/tourist/getTourist/:id
: get tourist by id. - DELETE
/home/tourist/delete/:id
: delete tourist by id. - POST
/home/tourist/bookTransportation/:touristId/:transportationId
: tourist book transportation. - GET
/home/tourist/getBookedTransportations/:touristId
: get tourist booked transportation. - POST
/home/tourist/buyProduct/:touristId/:productId
: tourist buy product.
- GET
/Seller/readSeller/:id
: get exact seller with id. - PUT
/Seller/acceptSeller/:id
: accept this seller on the system. - PUT
/Seller/rejectSeller/:id
: reject this seller on the system. - DELETE
/Seller//deletMyAccount/:id
: accept this seller on the system.
- GET
/promo/get
: Fetches all available promo codes. - POST
/promo/create
: Creates a new promo code.
- POST
/otp/send-otp
: send email otp - POST
/otp/verify-otp
: verify otp
- POST
/product/get
: Fetches all available products. - GET
/product/add
: Add product. - PUT
/product/update/:id
: update specicific product. - DELETE
/product//delete/:id
: delete specific product. - PATCH
/product/archive/:id
: urchive product. - PATCH
/product/unarchive/:id
: unarchive product.
JetSetGo2 includes robust testing to ensure all functionalities work as expected.
- Postman: For manual API testing.
- GET http://localhost:8000/promo/get : Fetches a list of all available promo codes.
- POST http://localhost:8000/promo/create : Creates a new promo code with specified details.
- GET http://localhost:8000/product/get : Fetches a list of all available products.
- POST http://localhost:8000/otp/send-otp : Sends an OTP to the user’s email for verification purposes.
- GET http://localhost:8000/home/tourist/getTourist : Fetches the details of a all tourists.
- GET http://localhost:8000/Seller/get : Fetches a list of all registered sellers.
- GET http://localhost:8000/home/adver/get : Fetches a list of all registered advertisers.
- DELETE http://localhost:8000/home/adver/deletMyAccount/6732179d63fd1193bedb7fb6 : Deletes the account of the advertiser with the specified ID (6732179d63fd1193bedb7fb6).
- GET http://localhost:8000/activity/get : Fetches a list of all available activities.
- GET http://localhost:8000/itinerary/getIteneraries : Fetches a list of all available itineraries.
- GET http://localhost:8000/itinerary/getIten/6730f7fa9c4ed702d6174c4b : Fetches the details of the itinerary with the specified ID (6730f7fa9c4ed702d6174c4b).
- GET http://localhost:8000/TourGuide/get : Fetches a list of all registered tour guides.
- DELETE http://localhost:8000/TourGuide/deletMyAccount/6730f7a49c4ed702d6174c25 : Deletes the account of the tour guide with the specified ID (6730f7a49c4ed702d6174c25).
- GET http://localhost:8000/notifications/675abfc06b3edc76222c816a : Fetches notifications for the user with the specified ID (675abfc06b3edc76222c816a).
- PATCH http://localhost:8000/notifications/read/675adf4066c80c785d721c54 : Marks the notification with the specified ID (675adf4066c80c785d721c54) as read.
- GET http://localhost:8000/admin/total-users : Fetches the total number of registered users on the platform.
- GET http://localhost:8000/admin/monthly-users : Fetches the number of new users registered each month.
JetSetGo2 is a versatile platform designed for multiple user roles, including tourists, tour guides, advertisers, and sellers. Below is a guide on how each user type can interact with the platform.
- Registration:
- Sign up with your email, username, password, and personal details like nationality and date of birth.
- Search and Explore:
- Use the search bar to find itineraries, activities, and historical places.
- Apply filters (e.g., budget, date, ratings) and sort results to match your preferences.
- Booking:
- Book itineraries, activities, flight, hotels, transportation and events directly through the app.
- Use the integrated payment system (wallet, credit card, or Stripe) to complete transactions.
- Personalized Experience:
- Save events to bookmarks and set notifications for when bookings open.
- Manage your wallet, loyalty points, and rewards from your profile.
- Ratings and Reviews:
- Rate and review activities, tour guides, or itineraries you’ve experienced.
- Registration:
- Sign up as a tour guide by providing personal details and uploading necessary documents for verification.
- Profile Management:
- Update your profile with experience details and past work.
- Create and Manage Itineraries:
- Add new itineraries with detailed descriptions, activities, and pricing.
- Activate or deactivate itineraries and view feedback from tourists.
- Personalized Experience:
- Save events to bookmarks and set notifications for when bookings open.
- Manage your wallet, loyalty points, and rewards from your profile.
- Engage with Tourists:
- Respond to reviews and ratings for your itineraries.
- Registration:
- Register your company by providing details such as a website link, company profile, and uploaded documents.
- Promote Activities:
- Create and manage promotional events or activities.
- View insights and reports on the performance of your campaigns.
- Admin Features:
- Use tools to track the success of promotions and adjust pricing or availability as needed.
- Registration:
- Sign up as a seller with your company name, description, and required documentation.
- Manage Products:
- Add, update, or archive products in the in-app gift shop.
- Monitor sales performance and available stock.
- Engage with Customers:
- Respond to reviews and ratings for your products.
- Manage Users:
- Approve or reject registrations for tourists, tour guides, advertisers, and sellers based on uploaded documents.
- Delete accounts upon request or due to policy violations.
- Oversee Platform Activities:
- Manage promo codes, notifications, and flagged content.
- View user and sales reports for all activities.
- Access real-time notifications for bookings, updates, and reminders.
- Use interactive maps to explore itineraries and locations.
- Enjoy a fully responsive design, accessible on both desktop and mobile devices.
JetSetGo2 is an open-source project, and we welcome contributions to improve the platform. Whether you want to report a bug, suggest a feature, or enhance existing functionality, here’s how you can contribute:
JetSetGo2 encourages users and contributors to report bugs, suggest new features, or provide feedback. Follow these steps to report an issue:
- Go to the Issues Tab.
- Click on New Issue.
- Provide a clear and descriptive title.
- Add detailed information about the issue, including:
- Steps to reproduce (if it’s a bug).
- Expected vs. actual behavior.
- Screenshots or logs, if applicable.
- Submit the issue, and our team will review it promptly.
We appreciate your contributions to improving JetSetGo2!
- Open an issue titled “Feature Request: [Feature Name]”.
- Clearly explain your idea and how it can benefit users.
-
Fork the repository.
-
Create a new branch for your feature or bug fix:
git checkout -b feature-name
-
Make your changes and commit them:
git commit -m "Add feature: [Feature Name]"
-
Push your changes to your forked repository:
git push origin feature-name
JetSetGo2 was developed with the contributions of talented individuals and the use of various tools and resources. We’d like to acknowledge the following:
- Marwan Allam: Scrum Master, Developer and Contributor
- Mahmoud Omran: Developer and Contributor
- Omar bakr: Developer and Contributor
- Ahmed eltabbakh: Developer and Contributor
- Omar Tayel: Developer and Contributor
- Omar elhossary: Developer and Contributor
- Mario Sameh: Developer and Contributor
- Youssef ahmed: Developer and Contributor
- Mostafa Tarek: Developer and Contributor
- Mayar Mohamed: Developer and Contributor
- React.js: Frontend development
- Node.js: Backend development
- Express.js: Web server framework
- MongoDB: Database management
- Bootstrap CSS: Frontend styling
- OpenStreetMap: Maps integration
- Stripe API: Payment processing
- Amadeus API: Travel booking services
JetSetGo2 is licensed under the Apache 2.0 License. You are free to use, modify, and distribute this project under the terms of this license.
For any questions, feedback, or assistance, please reach out to us at
Thank you for choosing JetSetGo2 – now go pack your bags and let the adventures begin!