Gantabya
Started at KU HackFest 2024 · Team project · Full stack · by Abhiyan Khanal
A travel companion for group trips and treks in Nepal. People publish trails with a start, a destination and checkpoints, browse them on a map, organise trips and talk to the people on a trip in a live chat room.
Visit live siteSource on GitHubWatch the demo video
Features
- Interactive map with clustered trails and driving routes drawn through checkpoints
- Trail creator with checkpoints, price, difficulty and photo uploads
- Trip events with participants and a real-time chat room per event
- Accounts with protected pages, so only signed-in users can publish trails
Where it came from
Gantabya started as a 48-hour entry at KU HackFest 2024: a hyperlocal platform for hikers and trekkers in Nepal, built around trails, checkpoints and chat. It has since grown into a deployed full-stack app.
Trails and the map
- The map uses Mapbox GL through react-map-gl. Trail markers are clustered with Supercluster so the map stays readable when there are many trails.
- Selecting a trail asks the Mapbox Directions API for a route from the start, through every checkpoint, to the destination and draws it on the map. Start and end coordinates are reverse-geocoded into place names.
- A sidebar searches places with a geocoder and filters trails with a price slider.
Adding a trail
Publishing a trail is a three-step form: details (title, description, price, difficulty), images (drag and drop with per-file progress bars), then locations (start, destination and any number of described checkpoints picked on the map).
Events and real-time chat
Trips are modelled as events with dates, a location and a list of participants. Every event has its own Socket.IO room. Messages are saved to PostgreSQL as they are sent and loaded when someone joins, so the history survives a refresh.
Backend
- Node.js 20 and Express 4 with ES modules, split into routes, controllers and middleware.
- Registration and login with bcrypt (cost 12) and 1-day JWTs; an auth middleware guards protected routes, and the frontend wraps pages in a Protected component.
- PostgreSQL schema for users, trails, events and messages. Coordinates and checkpoints are stored as JSONB and participants as an array; messages have an index on event and time.
- Image uploads through Multer, limited to 1 MB and JPEG or PNG only, served back as absolute URLs.
- A CORS allow-list, a /health endpoint that checks the database, and a Dockerfile on node:20-alpine.
Migration and deployment
The backend started on MongoDB and was later moved to PostgreSQL behind a mapper layer, so the existing React frontend kept working unchanged, and the ngrok tunnel used during development was dropped. The React and Vite frontend is deployed on Netlify with a single-page-app redirect rule, and the API runs on its own server behind a domain.
Tech stack
More projects by Abhiyan Khanal
- Janakpur Fish House: Client project · Web · Live at janakpurfishhouse.com
- CogniCare: Nov 2024 · Team of five · Mobile + backend
- कानुन साथी (Kanun Sathi): Jan 2026 · Team of four · AI / full stack
- Evolutionary Creatures: Jun – Aug 2024 · Team of two · C++ simulation
- Hamro Bus: Oct 2024 · Team project · Web, built in a few days
- DDA Drug Registration Portal: Jan 2026, revamped Nov 2026 · Team of four · Full stack