SafarSathi is your hassle-free online tour booking REST-API. It offers user-friendly features like secure registration, profile management, and effortless tour exploration. With a location-based search and secure payment processing, it's the go-to platform for travelers. Admins enjoy a powerful dashboard for seamless management.
Step 1 : Install npm packages
npm install
Step 2 : Create a config.env
file with following variables
PORT=8000
USER={{YourUsername}}
DATABASE_PASSWORD={{YourDatabasePassword}}
DATABASE={{YourMongoDBConnectionURL}}
DATABASE_LOCAL={{YourLocalMongoDBConnectionURL}}
JWT_SECRET={{YourJWTSecretKey}}
JWT_EXPIRES_IN=90d
JWT_COOKIE_EXPIRES=90
EMAIL_USERNAME={{YourEmailUsername}}
EMAIL_PASSWORD={{YourEmailPassword}}
EMAIL_HOST={{YourEmailHost}}
EMAIL_PORT={{YourEmailPort}}
EMAIL_FROM={{YourEmailFrom}}
NODE_ENV=production
STRIPE_SECRET_KEY={{YourStripeSecretKey}}
Step 3 : Must have VS-Code Extentions
1. Prettier-Code formatter
2. ESLint
Step 4 : Finally
Run on *DEVELOPMENT : npm run dev
Run on *PRODUCTION : npm start
// Output :
API URL: {{PROTOCOL}}://{{HOST}}:{{PORT}}/api/v1/
e.g.
*PROTOCOL = http
*HOST = 127.0.0.1
*PORT = 8000
*API URL = http://127.0.0.1:8000/api/v1/
- Secure User Registration and Authentication
- User and Admin Login/Logout
- Profile Updates and Image Upload
- Forgotten Password Recovery
- Password Reset
- Get Password Reset Emails
- Welcome Email upon Signup
- Browse and Retrieve All Tours with Pagination
- Filter Tours Based on Preferences
- Search Tours with Ease
- Sort Tours for Convenience
- Discover Tours in Specific Location Radius
- Get Tour Statistics
- Monthly Plan Access
- Write and Read Tour Reviews
- Booking Creation with Secure Payment Processing (via Stripe)
- Admin Dashboard for Full Control
- CRUD Operations for Tours, Users, Reviews, and Bookings
SafarSathi is your trusted companion for planning and booking tours effortlessly. We understand the importance of security and user-friendliness, which is why we offer features like forgotten password recovery, password reset, and email notifications to keep your data safe and your experience smooth. Whether you're an adventurous traveler or a meticulous tour organizer, our API provides the tools you need to create, manage, and enjoy memorable journeys. Unlock the world of travel possibilities with SafarSathi today!
An Interactive API Documentation Covering All Routes with Detailed Request and Response Examples.
- Click "Run in Postman" inside the docs.
- Import Collection inside your workspace.
- Inside Environments tab create new Environment, name it as "SafarSathi".
- Inside the Environment create new Variables-
"URL" ~ "https://safar-sathi-booktoursonline.onrender.com"
"jwt" ~ "No-Initaial-Value-Required" - Now your Environment is ready to use.
- Before trying any Route select the Environment "SafarSathi".
- ✅ Now you are ready to Exprerience the API.
Copyright (c) 2023 Arpit Jana