Website link - https://auto-sharing.vercel.app/
A full-stack ride-sharing application with a Go (Gofr) backend, SQLite database, and a modern JavaScript frontend. Users can create accounts, sign in with OTP, and book rides by selecting pickup and drop locations on a map.
-
User Registration & Sign-In
- Create account with first name, last name, email, phone, and password
- OTP-based sign-in for secure authentication
-
Ride Booking
- Select pickup and drop locations using Google Maps
- Store and use precise latitude and longitude for locations
- Specify pickup time (with AM/PM) and number of people
- Book rides and store all details in the database
-
Tech Stack
- Backend: Go (Gofr framework), SQLite
- Frontend: Vanilla JavaScript, Google Maps API, Tailwind CSS
- API: RESTful JSON endpoints
- Go 1.25+ installed
- Node.js and pnpm (for frontend)
- Google Maps API Key
- (Optional) DB Browser for SQLite for inspecting the database
-
Install dependencies:
cd backend go mod tidy
-
Run the backend server:
go run main.go
The server runs on
http://localhost:8000. -
Database:
- SQLite database file:
backend/users.db - Tables:
users,pickups,otps
- SQLite database file:
-
Install dependencies:
pnpm install
-
Set up Google Maps API key:
- See GOOGLE_MAPS_SETUP.md for instructions.
-
Start the frontend (if using a dev server):
pnpm start
Or open
index.htmldirectly in your browser.
AutoSharing/
backend/
db/
db.go # Database initialization and schema
handlers/
user.go # User account and sign-in handlers
pickup.go # Ride booking handlers
models/
users.go # User model
pickup.go # Pickup (ride) model
otp.go # OTP model
main.go # Entry point for backend server
users.db # SQLite database file
src/
createaccount.js # Create account page logic
signin.js # Sign-in and OTP logic
travel-form.js # Ride booking form and map integration
pickup.js # Pickup page logic
travel.js # Travel page logic
styles.css # Styles (Tailwind CSS)
index.html # Main HTML file
GOOGLE_MAPS_SETUP.md# Google Maps API setup instructions
package.json # Frontend dependencies
tailwind.config.js # Tailwind CSS config
POST /create-account— Create a new user accountPOST /signin— Request OTP for sign-inPOST /api/verify-signin— Verify OTP and sign inPOST /pickup— Book a ride (send pickup/drop locations, time, people)POST /rides/search— Search for available rides
- Create an account via the frontend.
- Sign in using your phone number and OTP.
- Book a ride by selecting locations on the map and submitting the form.
- Check the backend for success messages.
- Inspect the database (
pickupstable) to confirm your ride is stored.
MIT License
- Gofr.dev for backend framework
- Google Maps Platform for map integration