{"id":19011200,"url":"https://github.com/sirsayed98/yallatourism","last_synced_at":"2025-06-14T11:33:14.594Z","repository":{"id":53150814,"uuid":"276432801","full_name":"sirSayed98/YallaTourism","owner":"sirSayed98","description":"Awesome website for tourism and booking tours. ","archived":false,"fork":false,"pushed_at":"2020-07-13T18:20:56.000Z","size":27729,"stargazers_count":14,"open_issues_count":1,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-22T23:33:56.891Z","etag":null,"topics":["api","authentication","backend","booking-system","frontend","node","pug","rest-api","sendgrid","stripe-payments"],"latest_commit_sha":null,"homepage":"https://yalla-tourism.herokuapp.com/","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/sirSayed98.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}},"created_at":"2020-07-01T16:48:19.000Z","updated_at":"2024-10-24T13:24:53.000Z","dependencies_parsed_at":"2022-09-13T18:42:46.905Z","dependency_job_id":null,"html_url":"https://github.com/sirSayed98/YallaTourism","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sirSayed98/YallaTourism","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sirSayed98%2FYallaTourism","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sirSayed98%2FYallaTourism/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sirSayed98%2FYallaTourism/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sirSayed98%2FYallaTourism/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sirSayed98","download_url":"https://codeload.github.com/sirSayed98/YallaTourism/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sirSayed98%2FYallaTourism/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259808984,"owners_count":22914747,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["api","authentication","backend","booking-system","frontend","node","pug","rest-api","sendgrid","stripe-payments"],"created_at":"2024-11-08T19:13:40.120Z","updated_at":"2025-06-14T11:33:14.574Z","avatar_url":"https://github.com/sirSayed98.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yalla-Tourism Backend API Features\n\nAll of the functionality below are fully implmented in this project.\n\n### Tours\n- List all bootcamps in the database\n   * Pagination\n   * Select specific fields in result\n   * Limit number of results\n   * Filter by fields\n- Search tours by distance from specific cordinate by miles or kilometers\n  \n- Get single Tour\n- Create new Tour\n  * Authenticated users only\n  * Must have the role \"Lead-Guide\" or \"admin\"\n  * Field validation via Mongoose\n- Upload a Coverphoto and 3 different photos for **Tours**\n  * Photo will be uploaded to local filesystem\n- Update **Tours**\n  * Admin and lead-guide only\n  * Validation on update\n- Delete **Tours**\n  * Admin and lead-guide only\n- Calculate **Top-Five-Tours** according to Best **rating** ,less **price**\n\n- Get **full statistics** (number of tours ,average rating ,avg price , min and max price , number of rates) about tours according to tour difficulty. \n\n- Calculate the average rating from the reviews for a tour\n\n- Record tour locations to use it in creating map in mabbox\n### Booking\n- Create Checkout Session using Stripe \n- Book Tour \n\n\n### Reviews\n- List all reviews for a tour\n- List all reviews in general\n  * Pagination, filtering, etc\n- Get a single review\n- Create a review\n  * Authenticated users only.\n  * Must have the role \"user\". \n- Update review\n  * Authenticated users and admin\n- Delete review\n  * Authenticated users and admin\n\n### Users \u0026 Authentication\n- Authentication will be ton using JWT/cookies\n  * JWT and cookie should expire in 30 days\n- User registration\n  * Register as a \"user\" or \"lead-guide\" or \"guide\"\n  * Once registered, a token will be sent along with a cookie (token = xxx) \n    * send welcome email using sendgrid \n  * Passwords must be hashed\n- User login\n  * User can login with email and password\n  * Plain text password will compare with stored hashed password\n- User logout\n\n- Get user\n  * Route to get the currently logged in user (via token)\n- Password reset (lost password)\n  * User can request to reset password\n  * The token will expire after 10 minutes\n- Update user info\n  * Authenticated user only\n  * Separate route to update password\n- User CRUD\n  * Admin only\n- Users can be made admin by protected route for admins only.\n\n## Security\n- Encrypt passwords and reset tokens\n- Prevent NoSQL injections\n- Add headers for security (helmet)\n- Prevent cross site scripting - XSS\n- Add a rate limit for requests of 100 requests per hour.\n- Protect against http param polution\n- Use cors to make API public .\n\n## Documentation\n- Use Postman to create documentation\n- Watch [API_Doc](https://documenter.getpostman.com/view/8810063/T17GgTbF?version=latest)\n\n\n## Deployment (Heroku)\n- Push to Github\n- Clone repo on to server\n- Watch project here [YallaTourism](https://yalla-tourism.herokuapp.com/)\n\n\n## Reusable code\n\n- NPM scripts for dev and production env\n- Config file for important constants\n- Error handling middleware\n- Authentication middleware for protecting routes and setting user roles\n- Use async/await (create middleware to clean up controller methods)\n- Create a database seeder to import and destroy data\n\n# Yalla-Tourism Front End Features\n\nUsing pug engine to render dynamic pages\n\n## Available features\n\n- Sign Up\n- Login\n- Get Available tours\n- Get tour details\n- Book Tour using stripe\n- Account overview\n- Update user setting\n- Change password\n- Upload photo for account\n\n\n## Usage\n\nRename **config/config.env** to **config/.env** and update the values/settings to your own.\n\n## Install Dependencies\n\n```\nnpm install\n```\n\n## Run App\n\n```\n# Run in dev mode\nnpm run server\nnpm run watch:js\n\n# Run in production\nnpm run build:js\n```\n# Screenshots\n![Cap1](https://user-images.githubusercontent.com/47485363/87338763-f4e0a600-c545-11ea-8ee8-6ff9d04210f0.PNG)\n![Cap2](https://user-images.githubusercontent.com/47485363/87338777-f9a55a00-c545-11ea-9d22-4ba4bd54be89.PNG)\n![Cap3](https://user-images.githubusercontent.com/47485363/87338781-fc07b400-c545-11ea-9f52-5d4218d1e480.PNG)\n![Cap4](https://user-images.githubusercontent.com/47485363/87338794-ff02a480-c545-11ea-9560-449642267a4c.PNG)\n![Cap5](https://user-images.githubusercontent.com/47485363/87338806-032ec200-c546-11ea-8db4-efe68d89f837.PNG)\n![Cap6](https://user-images.githubusercontent.com/47485363/87338821-075adf80-c546-11ea-8e00-84de946c61db.PNG)\n![Cap7](https://user-images.githubusercontent.com/47485363/87338842-0de95700-c546-11ea-874e-405e632b17e6.PNG)\n![Cap8](https://user-images.githubusercontent.com/47485363/87338855-12157480-c546-11ea-9cba-21dc3abd5987.PNG)\n![Cap9](https://user-images.githubusercontent.com/47485363/87338877-1b064600-c546-11ea-826c-a1dfc396bab8.PNG)\n![Capt10](https://user-images.githubusercontent.com/47485363/87338887-1f326380-c546-11ea-8e58-5b9053165742.PNG)\n![Cap11](https://user-images.githubusercontent.com/47485363/87338900-2194bd80-c546-11ea-9f09-59498dce9432.PNG)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsirsayed98%2Fyallatourism","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsirsayed98%2Fyallatourism","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsirsayed98%2Fyallatourism/lists"}