A modern travel planning application that helps you organize trips, discover destinations, and manage your travel itinerary with ease.
- Multi-city Itineraries: Plan trips with multiple destinations
- Activity Management: Add activities to each stop with costs and durations
- Date Scheduling: Set arrival/departure dates for each city
- Interactive Maps: Visualize your trip route with Leaflet maps
- Daily Schedule: View your trip day-by-day
- Activity Timing: Schedule specific times for activities
- City Tracking: See which city you're in on each day
- Cost Estimation: Automatic calculation of trip costs from activities
- Activity Breakdown: See cost breakdown by activity
- 25 Popular Destinations: Curated cities with 5 activities each
- City Search: Find destinations by name or country
- Destination Cards: Beautiful image galleries with city previews
- Public Trip Sharing: Share your itinerary with a unique link
- Trip Preview: Non-logged-in users can view shared trips
- Node.js 18+
- npm or yarn
-
Clone the repository
git clone <repository-url> cd GlobeTrotter/Backend
-
Install dependencies
npm install
-
Set up environment variables
Create a
.envfile in the Backend directory:DATABASE_URL="file:./prisma/dev.db" JWT_SECRET="your-secret-key-here"
-
Initialize the database
npx prisma db push
-
Seed the database (optional, adds 25 cities with activities)
npm run db:seed
-
Start the development server
npm run dev
-
Open your browser
Navigate to http://localhost:3000
After seeding, you can log in with:
- Email:
john@example.com - Password:
password123
Backend/
├── prisma/
│ ├── schema.prisma # Database schema
│ ├── seed.ts # Database seeding script
│ └── dev.db # SQLite database
├── src/
│ ├── app/
│ │ ├── (auth)/ # Login & Signup pages
│ │ ├── api/ # API routes
│ │ ├── dashboard/ # Main dashboard
│ │ ├── trips/ # Trip management pages
│ │ │ ├── [id]/ # Trip details, edit, calendar, budget
│ │ │ ├── new/ # Create new trip
│ │ │ └── map/ # Full map view
│ │ ├── share/ # Public trip sharing
│ │ └── explore/ # Discover destinations
│ ├── components/
│ │ ├── maps/ # Map components (Leaflet)
│ │ ├── trips/ # Trip-related components
│ │ └── ui/ # Reusable UI components
│ ├── db/ # Database query functions
│ ├── lib/ # Utilities & API client
│ └── types/ # TypeScript type definitions
└── public/ # Static assets
| Category | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript |
| Styling | Tailwind CSS |
| Database | SQLite with Prisma ORM |
| Authentication | JWT (jose) + HTTP-only cookies |
| Maps | Leaflet + React Leaflet |
| Carousel | Embla Carousel |
| Icons | Lucide React |
| Date Handling | date-fns |
| Endpoint | Method | Description |
|---|---|---|
/api/auth/signup |
POST | Create new account |
/api/auth/login |
POST | User login |
/api/auth/logout |
POST | User logout |
/api/auth/me |
GET | Get current user |
/api/trips |
GET | List user's trips |
/api/trips |
POST | Create new trip |
/api/trips/[id] |
GET | Get trip details |
/api/trips/[id] |
PUT | Update trip |
/api/trips/[id] |
DELETE | Delete trip |
/api/cities |
GET | List/search cities |
/api/activities |
GET | Get activities for a city |
- Welcome section with user greeting
- Upcoming trips carousel
- Popular destinations with search
- Interactive travel map
- Step-by-step trip creation
- City selection with map preview
- Activity selection per city
- Date and time scheduling
- Day-by-day itinerary
- City indicators per day
- Scheduled activities with times
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the ISC License.
Built with ❤️ for travelers everywhere