{"id":25409641,"url":"https://github.com/mkornajcik/natours","last_synced_at":"2026-04-11T19:02:05.099Z","repository":{"id":277393699,"uuid":"925662596","full_name":"mkornajcik/natours","owner":"mkornajcik","description":"A full-featured tour booking API and website built with Node.js, Express, MongoDB, and JWT authentication, allowing users to book tours, leave reviews, and manage their accounts. Admins can manage tours, users, reviews, and bookings through a secure backend.","archived":false,"fork":false,"pushed_at":"2025-05-22T12:52:43.000Z","size":85509,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-03T14:35:59.705Z","etag":null,"topics":["authentication","authorization","crud","express","jwt","mongodb","mvc-architecture","nodejs","postman","rest-api","stripe"],"latest_commit_sha":null,"homepage":"https://appnatours.up.railway.app/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkornajcik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-01T12:34:32.000Z","updated_at":"2025-05-22T12:52:48.000Z","dependencies_parsed_at":"2025-02-13T18:41:08.016Z","dependency_job_id":null,"html_url":"https://github.com/mkornajcik/natours","commit_stats":null,"previous_names":["mkornajcik/natours"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mkornajcik/natours","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkornajcik%2Fnatours","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkornajcik%2Fnatours/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkornajcik%2Fnatours/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkornajcik%2Fnatours/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkornajcik","download_url":"https://codeload.github.com/mkornajcik/natours/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkornajcik%2Fnatours/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31691503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","authorization","crud","express","jwt","mongodb","mvc-architecture","nodejs","postman","rest-api","stripe"],"created_at":"2025-02-16T09:21:31.368Z","updated_at":"2026-04-11T19:02:05.053Z","avatar_url":"https://github.com/mkornajcik.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Natours: A Complete Node.js, Express, and MongoDB Application\n\nWelcome to **Natours**, a web application. This project serves as a practical implementation of a modern back-end stack, featuring both a RESTful API and a server-side rendered website.\n\n## 🚀 Live Demo\n\nThe application is deployed and available online!  \nVisit the live version here: [Natours App](https://appnatours.up.railway.app/) 🌍  \n\n## 📌 Table of Contents\n\n- [Project Overview](#-project-overview)\n- [Features](#-features)\n- [Technologies Used](#%EF%B8%8F-technologies-used)\n- [API Documentation](#-api-documentation)\n- [Getting Started](#%EF%B8%8F-getting-started)\n- [License](#-license)\n\n## 📖 Project Overview\n\nNatours is designed to provide users exploration and booking of tours. The application contains a wide range of functionalities, from user authentication to payment processing, all built using **Node.js, Express, and MongoDB**.\n\n## 🚀 Features\n\n✅ **User Authentication and Authorization**: Sign-up, login and logout.  \n✅ **RESTful API**: Advanced filtering, sorting, aliasing, and pagination.  \n✅ **Server-Side Rendering**: Dynamic HTML generation using **Pug** templates.  \n✅ **CRUD Operations**: Full management of **tours, users, reviews, and bookings**.  \n✅ **Secure Payment Processing**: Integration with **Stripe**.  \n✅ **File Uploads and Image Processing**: User profile pictures and tour images management with image resizing.  \n✅ **Email Notifications**: Automated emails for account verification and booking confirmations.  \n✅ **Security Best Practices**: Implementation of data sanitization, rate limiting, and protection against common vulnerabilities.  \n✅ **Error Handling**: Mechanisms for catching and managing errors across the application.  \n✅ **Deployment Ready**: Configured for deployment on platforms like **Railway**.  \n✅ **Advanced Data Handling**:\n  - Geospatial queries to find tours within a specified distance.\n  - Aggregation pipeline for complex data analysis.\n\n## 📷 Preview\n![Natours](https://github.com/user-attachments/assets/4e531955-ddb8-4342-bdce-2ee0ceacdc43)\n![Natours2](https://github.com/user-attachments/assets/126e1150-76d6-45eb-9b44-5c847533949d)\n![Natours3](https://github.com/user-attachments/assets/e2088b3c-c536-4011-aa4a-09cf057207ed)\n![Natours4](https://github.com/user-attachments/assets/c72237ac-70ae-4b2f-bb93-b5d9c9a72476)\n\n## 🛠️ Technologies Used\n\n- **Backend**: Node.js, Express.js\n- **Database**: MongoDB, Mongoose\n- **Templating Engine**: Pug\n- **Authentication**: JSON Web Tokens (JWT), bcrypt\n- **Payment Processing**: Stripe\n- **Email Services**: Nodemailer, SendGrid, Mailtrap\n- **File Uploads**: Multer, Sharp\n- **Geospatial Data**: Leaflet\n- **Bundling**: Parcel\n- **Deployment**: Railway\n\n## 📖 API Documentation\n\nThis project includes a comprehensive RESTful API for managing users, tours, bookings, and reviews.\n\n### 🔗 Full API Documentation  \nFor detailed request and response examples, visit the full API documentation:  \n[Postman Documentation](https://documenter.getpostman.com/view/35992979/2sAYQfDpCw)\n\n## 🏗️ Getting Started\n\n### 🔹 1. Clone the Repository\n```bash\ngit clone https://github.com/mkornajcik/natours.git\ncd natours\n```\n### 🔹 2. Install Dependencies\n```bash\nnpm install\n```\n### 🔹 3. Configure Environment Variables\n```bash\nNODE_ENV=development\nPORT=3000\nUSER=\u003cYour Name\u003e\n\nDATABASE_PASSWORD=\u003cYour MongoDB Password\u003e\nDATABASE=\u003cYour MongoDB Connection String\u003e\n\nJWT_SECRET=\u003cYour JWT Secret\u003e\nJWT_EXPIRES_IN=90d\nJWT_COOKIE_EXPIRES_IN=90\n\nEMAIL_USERNAME=\u003cYour Email Username\u003e\nEMAIL_PASSWORD=\u003cYour Email Password\u003e\nEMAIL_HOST=\u003cYour Email Host\u003e\nEMAIL_PORT=\u003cYour Email Port\u003e\n\nSENDGRID_USERNAME=\u003cYour Sendgrid Username\u003e\nSENDGRID_PASSWORD=\u003cYour Sendgrid Password\u003e\nSENDGRID_EMAIL_FROM=\u003cSendgrid Email From\u003e\n\nSTRIPE_SECRET_KEY=\u003cYour Stripe Secret Key\u003e\nSTRIPE_WEBHOOK_SECRET=\u003cYour Stripe Webhook Secret\u003e\n````\n### 🔹 4. Start the Application\n```bash\nnpm start\n```\nThe application will be accessible at http://localhost:3000\n\n## 📝 To-Do List\n\nHere are some possible improvements:\n\n### 🔐 API Enhancements\n- [ ] Restrict users to review only tours they have actually booked.\n- [ ] Implement nested booking routes: `/tours/:id/bookings` and `/users/:id/bookings`.\n- [ ] Improve tour dates:\n  - [ ] Add `participants` and `soldOut` fields to each tour date.\n  - [ ] Ensure bookings are made for a specific tour date.\n  - [ ] Prevent bookings if `participants \u003e maxGroupSize`.\n- [ ] Implement advanced authentication features:\n  - [ ] Email confirmation for new users.\n  - [ ] Refresh tokens to keep users logged in.\n  - [ ] Two-factor authentication.\n\n### 🌍 Website Enhancements\n- [x] Add a **sign-up form** similar to the login form. ✅\n- [ ] Allow users to **submit reviews** directly on the tour detail page if they have taken the tour.\n- [ ] Hide the **booking section** on the tour detail page for users who have already booked the tour.\n- [ ] Prevent duplicate bookings at the model level.\n- [ ] Implement a **\"Like Tour\"** feature and create a favorites page.\n- [ ] Add a **\"My Reviews\"** section to the user account page:\n  - [ ] Display all user reviews.\n  - [ ] Allow users to edit their reviews.\n- [ ] Admin Panel:\n  - [ ] Implement \"Manage\" pages for administrators to **CRUD** (Create, Read, Update, Delete) tours, users, reviews, and bookings.\n\n## 📝 License\n\nThis project is licensed under the **MIT License**. \n\nThis project is developed for educational purposes as part of the Udemy course _\"Node.js, Express, MongoDB \u0026 More: The Complete Bootcamp\"_ by **Jonas Schmedtmann**.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkornajcik%2Fnatours","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkornajcik%2Fnatours","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkornajcik%2Fnatours/lists"}