Hey there! Welcome to NaviGo - a ride-hailing app that's like Uber or Ola, but built by you! This guide will walk you through everything, even if you're completely new to coding. Don't worry, we've got your back! ๐
NaviGo is a complete ride-hailing application where:
- Users can book rides by entering pickup and destination locations
- Captains (drivers) can register with their vehicle details and accept rides
- The app calculates fares based on distance
- Everything is secure with password protection and authentication
Think of it as your own mini Uber! ๐
- A beautiful landing page where users can sign up
- User dashboard to book rides (Auto, Moto, or Car)
- Captain dashboard to manage rides and vehicle info
- Secure login system for both users and captains
- Real-time fare calculation
Before we start, you'll need these tools installed on your computer:
- What is it? Think of it as the engine that runs JavaScript code on your computer
- How to get it: Go to nodejs.org and download the LTS version
- How to check if you have it: Open PowerShell and type
node --version - You should see something like
v20.x.xorv18.x.x
- What is it? A cloud database that stores all your users, rides, and captain information
- Why cloud? No installation needed! Everything runs online for free
- How to get it: Follow the setup guide below (super easy!)
- We recommend VS Code - download from code.visualstudio.com
- It's free, friendly, and makes coding easier!
- Chrome, Firefox, or Edge - any modern browser works!
Let's get NaviGo running on your computer! Take it slow, follow each step, and you'll be fine.
- Download the
navigo-fullstack.zipfile - Right-click on it and select "Extract All..."
- Extract to a location you'll remember (like
C:\Users\YourName\) - You'll now have a folder called
navigo
Don't worry - this sounds complicated but it's actually super simple!
- Go to mongodb.com/cloud/atlas/register
- Sign up with your email (it's completely FREE!)
- Verify your email
- Click "Build a Database"
- Choose the FREE option (M0 - it says "FREE FOREVER")
- Choose a cloud provider and region closest to you
- Name your cluster (or keep the default name)
- Click "Create" and wait 2-3 minutes while it sets up
- You'll see a popup asking to create a user
- Username: Choose something simple (like your name)
- Password: Create a strong password and SAVE IT SOMEWHERE! You'll need this
- Click "Create User"
- Scroll down to "Where would you like to connect from?"
- Click "Add My Current IP Address" first
- Then click "Add a Different IP Address"
- Enter
0.0.0.0/0(this allows access from anywhere) - Click "Add Entry"
- Click "Finish and Close"
- Click "Connect" on your cluster
- Choose "Drivers"
- Select "Node.js" as driver and version "6.7 or later"
- Copy the connection string that looks like:
mongodb+srv://username:<password>@cluster0.xxxxx.mongodb.net/ - IMPORTANT: Replace
<password>with your actual password - Add
/navigoat the end before the?
Your final string should look like:
mongodb+srv://yourname:yourpassword@cluster0.xxxxx.mongodb.net/navigo?retryWrites=true&w=majority
The backend is the behind-the-scenes magic that handles logins, bookings, etc.
- Press
Windows Key + X - Click "Windows PowerShell" or "Terminal"
cd "C:\Users\YourName\navigo\backend"Replace YourName with your actual Windows username.
npm installThis will download all the tools our app needs. It might take 2-3 minutes. โ
-
Open the backend folder in File Explorer
-
Find the file named
.env -
Right-click โ Open with Notepad
-
You'll see:
PORT=3000 MONGO_URI=mongodb://localhost:27017/navigo JWT_SECRET=your_secret_key_change_in_production GOOGLE_MAPS_API_KEY=your_google_maps_api_key
-
Replace the
MONGO_URIline with your MongoDB Atlas connection string from Step 2.5:PORT=3000 MONGO_URI=mongodb+srv://yourname:yourpassword@cluster0.xxxxx.mongodb.net/navigo?retryWrites=true&w=majority JWT_SECRET=navigo_secret_2026 GOOGLE_MAPS_API_KEY=AIzaSyDummy_Key_For_Testing
-
Save the file (Ctrl + S)
npm startYou should see:
Server running on port 3000
MongoDB Connected
๐ Congratulations! Your backend is running! Leave this window open.
The frontend is the beautiful interface users interact with.
- Press
Windows Key + Xagain - Click "Windows PowerShell" or "Terminal"
- Don't close the first one!
cd "C:\Users\YourName\navigo\frontend"npm installAgain, this will take a couple of minutes.
npm startYour browser will automatically open to http://localhost:3001! ๐
If it doesn't open automatically, just type that URL into your browser.
-
Sign Up:
- Click "Get a Ride" on the homepage
- Fill in your details (first name, last name, email, password)
- Click "Sign Up"
-
Book a Ride:
- Enter your pickup location (e.g., "Times Square, New York")
- Enter your destination (e.g., "Central Park, New York")
- Click "Get Fare Estimates"
- Choose between Auto ๐บ, Moto ๐๏ธ, or Car ๐
- Click on your choice to book!
- You'll get an OTP (One-Time Password) for your ride
-
Sign Up:
- Click "Become a Captain" on the homepage
- Fill in your details AND vehicle information:
- Vehicle color (e.g., "Black")
- Plate number (e.g., "ABC123")
- Capacity (e.g., "4" for 4 seats)
- Vehicle type (Car, Motorcycle, or Auto)
- Click "Sign Up as Captain"
-
View Dashboard:
- See your vehicle details
- Wait for ride requests (coming soon!)
- Track your earnings
Don't panic! Here are solutions to common issues:
Solution: You need to install Node.js
- Go to nodejs.org
- Download and install the LTS version
- Restart PowerShell and try again
Solution: Check your connection string
- Make sure you replaced
<password>with your actual password - If your password has special characters like
@,#,$, you need to encode them:@becomes%40#becomes%23$becomes%24
- Make sure you added
/navigobefore the? - Check if you whitelisted
0.0.0.0/0in MongoDB Atlas Network Access
Solution: Another program is using that port
- Close any other apps using port 3000
- Or change the PORT in
.envto 3001
Solution:
- Make sure backend is running first
- Try deleting
node_modulesfolder and runnpm installagain - Check if port 3001 is available
Solution:
- Make sure both backend (port 3000) and frontend (port 3001) are running
- Clear your browser cache (Ctrl + Shift + Delete)
Since this is a learning project:
- NEVER share your
.envfile - it contains sensitive passwords - Use strong passwords when you deploy this publicly
- The Google Maps API key is optional - the app works without it for testing
- In production, change
JWT_SECRETto something more secure
navigo/
โโโ backend/ # Server-side code
โ โโโ controllers/ # Business logic (what happens when you book a ride)
โ โโโ models/ # Database structure (how we store users, rides)
โ โโโ routes/ # URL paths (/users/login, /rides/create, etc.)
โ โโโ middleware/ # Security checks (is user logged in?)
โ โโโ server.js # Main backend file (starts everything)
โ โโโ .env # Secret configuration (passwords, keys)
โ
โโโ frontend/ # Client-side code (what you see)
โโโ src/
โ โโโ components/ # Reusable UI pieces
โ โโโ pages/ # Different screens (Home, Login, Dashboard)
โ โโโ context/ # Shared data (user info across pages)
โ โโโ App.jsx # Main React component
โโโ public/ # Static files (images, HTML)
Want to understand the code better? Check these out:
- JavaScript Basics: javascript.info
- React Tutorial: react.dev/learn
- Node.js Guide: nodejs.dev/learn
- MongoDB Tutorial: mongodb.com/docs/manual/tutorial
-
Add Google Maps Integration:
- Get a free API key from Google Cloud Console
- Enable "Maps JavaScript API" and "Directions API"
- Add the key to your
.envfile
-
Deploy Online:
- Deploy backend to Render.com (FREE)
- Deploy frontend to Vercel.com (FREE)
- Share your app with the world!
-
Add More Features:
- Real-time tracking
- Ride history
- Ratings and reviews
- Payment integration
- Chat between user and captain
Remember: The only way to learn coding is by doing it. Don't be afraid to break things - that's how we learn!
Happy Coding! ๐