Academic Project | Faculty of Information Technology (BIT) | University of Moratuwa Student: Achintha Bandara | Registration No: E2320235
Silver Path is a full-stack MERN (MongoDB, Express, React, Node.js) web application built to promote local tourism in the Rideegama region, Sri Lanka.
It provides a centralized platform for discovering and managing tourist destinations within a 25 km radius. Users can explore locations, view detailed information, and plan efficient one-day visits.
- Centralized Information: Provide reliable and up-to-date tourist data
- Interactive Map β Leaflet.js map with category markers and 25 km radius overlay
- Efficient Planning: Enable users to explore destinations within a 25 km radius
- Real Road Routing β OSRM integration for actual driving directions
- Itinerary Support: Assist in one-day visit planning
- Content Management: Allow admins to manage destinations securely
The application follows MVC (Model-View-Controller) architecture:
- Frontend: React.js SPA with Tailwind CSS
- Backend: Node.js + Express.js REST API
- Database: MongoDB Atlas
- Authentication: JWT-based admin authentication
- Media: Cloudinary for image storage
User/Admin β React Frontend (Vite) β Express.js REST API β MongoDB Atlas ββ Cloudinary (images) ββ OSRM (road routing)
- Browse and explore tourist destinations
- Search and filter by category
- View detailed information including description, facilities, and travel tips
- Interactive map using Leaflet
- One-day visit planning
- Secret URL key protection (hidden admin login page)
- Secure login using JWT authentication
- Add, update, and delete destinations with full CRUD
- Upload and manage destination images
- Geospatial validation within a 25 km radius
- Responsive design for mobile and desktop
- Dynamic data fetching and filtering
| Layer | Technology |
|---|---|
| Frontend | React 18, React Router DOM, Tailwind CSS, DaisyUI |
| UI Libraries | React Icons, React Hot Toast, SweetAlert2 |
| Maps | Leaflet.js, React-Leaflet, OpenStreetMap, OSRM |
| Backend | Node.js v18+, Express.js |
| Database | MongoDB Atlas, Mongoose ODM |
| Authentication | JWT (24h expiry), bcrypt.js (cost factor 10) |
| Media Storage | Cloudinary, Multer, multer-storage-cloudinary |
| Security | express-rate-limit, Admin access key middleware |
| Build Tool | Vite |
- Node.js v18 or higher
- MongoDB Atlas account
- Cloudinary account
git clone https://github.com/Achintha-Dev/silver-path.git
cd SilverPathCreate a .env file inside the /server directory:
PORT=5000
MONGO_URI=your_mongodb_atlas_connection_string
JWT_SECRET=your_jwt_secret_key
ADMIN_ACCESS_KEY=your_admin_secret_key
NODE_ENV=development
CLIENT_URL=http://localhost:5173
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secretYou can use .env.example as a template.
cd server
npm install
npm run devServer runs on: http://localhost:5000
cd server
node src/config/seedAdmin.jsThis creates the default admin account.
cd client
npm install
npm run devFrontend runs on: http://localhost:5173
- URL: http://localhost:5173/admin/login?key=YOUR_ADMIN_ACCESS_KEY
- Email: admin@silverpath.com
- Password: Admin@12345
β οΈ The admin login page is intentionally hidden. Visiting/admin/loginwithout the correct?key=parameter redirects to the home page for security.
silver-path/
βββ client/ # React frontend (Vite)
β βββ src/
β β βββ assets/ # Static assets (video background)
β β βββ components/
β β β βββ admin/ # Admin components (Layout, GlassySelect)
β β β βββ user/ # Tourist components
β β β βββ destinations/ # Destination list components
β β β βββ map/ # Map components
β β β βββ planner/ # Planner + tab components
β β βββ hooks/ # Custom hooks (usePlannerStorage, useUserLocation)
β β βββ pages/
β β β βββ admin/ # Admin pages
β β β βββ user/ # Tourist pages
β β βββ utils/ # API client, distance calculations
β βββ package.json
β βββ vite.config.js
β
βββ server/ # Express.js backend
β βββ src/
β β βββ config/ # DB connection, Cloudinary config, seedAdmin
β β βββ controllers/ # Route handlers
β β βββ middleware/ # Auth, admin access, rate limiter
β β βββ models/ # Mongoose schemas (Destination, Admin)
β β βββ routes/ # API routes
β βββ server.js # Entry point
β βββ package.json
β
βββ screenshots/ # Project screenshots
βββ README.md
βββ .env.example
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/destinations |
Get all destinations (with filters) |
| GET | /api/destinations/:id |
Get single destination |
| GET | /api/destinations/:id/rating |
Get destination rating |
| POST | /api/destinations/:id/rate |
Rate a destination |
| GET | /api/auth/verify-access |
Verify admin secret key |
| POST | /api/auth/login |
Admin login |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/destinations |
Create destination |
| PUT | /api/destinations/:id |
Update destination |
| DELETE | /api/destinations/:id |
Delete destination |
| POST | /api/destinations/:id/images |
Add images |
| POST | /api/destinations/:id/images/delete |
Delete single image |
| GET | /api/auth/me |
Get current admin |
| POST | /api/auth/logout |
Logout |
Functional testing was performed using Postman for API endpoints and manual browser testing across Chrome, Firefox, Edge, and Safari.
Test coverage includes:
- All CRUD operations for destinations
- Image upload and deletion (Cloudinary sync)
- Admin authentication and JWT validation
- Secret key protection and rate limiting
- Category and distance filtering
- Visit planner route optimization
- Star rating system
- Responsive layout on mobile devices
| Field | Details |
|---|---|
| Name | Achintha Bandara |
| Registration No | E2320235 |
| GitHub | https://github.com/Achintha-Dev |
| Degree Program | Bachelor of Information Technology (BIT) |
| University | University of Moratuwa, Sri Lanka |
| Module | ITE2953 - Programming Group Project 25S1 |
-- coming soon.















