A production-ready backend API for a modern Travel Planning, Travel Buddy Matching, and Meetup Platform.
TourHobe enables users to create travel plans, find compatible travel buddies, manage trip participation, leave reviews, and subscribe to premium features using secure online payments.
This backend is built with scalability, security, and real-world production practices in mind.
🔗 GitHub Repository:
https://github.com/abujaforhadi/TourHobe-server
🚀 Live Server URL:
https://tourhobe25.vercel.app
Built using Node.js, Express.js, TypeScript, Prisma ORM, and PostgreSQL, this API supports:
- Travel plan creation and management
- Travel buddy matching based on smart criteria
- Participant join request workflow
- Review and rating system
- User dashboards
- Real subscription payments via SSLCommerz
- Admin-level system management
- Secure JWT-based authentication
- Password hashing using bcrypt
- Cookie-based session handling
- Role-based access control (
USER,ADMIN)
-
Create, update, and delete travel plans
-
Public / Private visibility control
-
Date and budget validation logic
-
Join request system for participants
-
Host can accept / reject / cancel join requests
-
User dashboard showing:
- Hosted trips
- Joined trips
- Upcoming trips
Automatically suggests matching travel plans based on:
- Same destination
- Overlapping travel dates
- Same travel type
- Public visibility
Matching results are shown directly on the user dashboard.
- Users can review trip hosts after completion
- Prevents duplicate reviews
- Admin can monitor and remove suspicious reviews
Supports real subscription payments using SSLCommerz (Sandbox).
- Monthly subscription
- Yearly subscription
- Verified badge upgrade
- SSLCommerz sandbox integration
- Success / fail / cancel redirects
- IPN (Instant Payment Notification) validation
- Automatic premium activation after payment
- User & Admin transaction history
- Manage all travel plans
- Moderate reviews
- Manage subscriptions & transactions
- Manage users and premium status
| Category | Technology |
|---|---|
| Runtime | Node.js |
| Language | TypeScript |
| Framework | Express.js |
| Database | PostgreSQL |
| ORM | Prisma |
| Validation | Zod |
| Authentication | JWT + Cookies |
| Payments | SSLCommerz |
| Deployment | Vercel / Render |
| Endpoint | Method | Description |
|---|---|---|
/api/auth/register |
POST | Register new user |
/api/auth/login |
POST | User login |
/api/auth/me |
GET | Logged-in user profile |
| Endpoint | Method | Description |
|---|---|---|
/api/travel-plans |
POST | Create travel plan |
/api/travel-plans/:id |
GET | Get travel plan |
/api/travel-plans/:id |
PATCH | Update travel plan |
/api/travel-plans/:id |
DELETE | Delete travel plan |
/api/travel-plans/:id/join |
POST | Request to join |
/api/travel-plans/hosted |
GET | User hosted plans |
/api/travel-plans/joined |
GET | User joined plans |
| Endpoint | Method | Description |
|---|---|---|
/api/reviews/user/:id |
GET | Get reviews for a host |
/api/reviews |
POST | Add a review |
/api/admin/reviews |
GET | Admin: all reviews |
/api/admin/reviews/:id |
DELETE | Admin: delete review |
| Endpoint | Method | Description |
|---|---|---|
/api/dashboard/user |
GET | User dashboard (matches, trips) |
| Endpoint | Method | Description |
|---|---|---|
/api/payments/init-subscription |
POST | Start payment |
/api/payments/success |
GET/POST | Success callback |
/api/payments/fail |
GET/POST | Fail callback |
/api/payments/cancel |
GET/POST | Cancel callback |
/api/payments/validate-payment |
POST | IPN validation |
/api/payments/status/:transactionId |
GET | Payment status |
/api/payments/my-transactions |
GET | User transactions |
/api/payments/admin/transactions |
GET | Admin transactions |
- Node.js v20+
- PostgreSQL database (Local / Docker / Railway / NeonDB)
- npm or yarn
- SSLCommerz Sandbox credentials
(Optional)
npm install -g prismagit clone https://github.com/abujaforhadi/TourHobe-server
cd TourHobe-server
npm installDATABASE_URL="postgresql://user:password@localhost:5432/dbname"
PORT=5000
JWT_SECRET=your_secret
JWT_EXPIRES_IN=7d
COOKIE_NAME=token
SALT_ROUNDS=12
# SSLCommerz Sandbox
SSL_STORE_ID=your_store_id
SSL_STORE_PASS=your_store_password
SSL_PAYMENT_API=https://sandbox.sslcommerz.com/gwprocess/v4/api.php
SSL_VALIDATION_API=https://sandbox.sslcommerz.com/validator/api/validationserverAPI.php
# Backend Redirect URLs
SSL_SUCCESS_BACKEND_URL=https://your-backend.com/api/payments/success
SSL_FAIL_BACKEND_URL=https://your-backend.com/api/payments/fail
SSL_CANCEL_BACKEND_URL=https://your-backend.com/api/payments/cancel
SSL_IPN_URL=https://your-backend.com/api/payments/validate-payment
# Frontend Redirect URLs
SSL_SUCCESS_FRONTEND_URL=https://your-frontend.com/payment-success
SSL_FAIL_FRONTEND_URL=https://your-frontend.com/payment-fail
SSL_CANCEL_FRONTEND_URL=https://your-frontend.com/payment-cancel
# Pricing
PRICE_MONTHLY=299
PRICE_YEARLY=2999
PRICE_VERIFIED_BADGE=199npx prisma migrate devnpm run dev- Prisma Client is generated before build
- Railway / Vercel compatible
- Strict TypeScript friendly
- Modular service-controller architecture
- Ready for scaling and feature expansion
If you want, next I can:
- Write a professional LinkedIn project post
- Add API versioning
- Create Swagger/OpenAPI docs
- Add rate limiting & security headers