Welcome to TravelTrek, a modern web application built with Next.js and Supabase that helps you plan, collaborate, and share your travel itineraries seamlessly. Whether you're looking to map out your next adventure or plan a trip with friends, TravelTrek has got you covered! 🗺️💼
This project allows users to create detailed trips, manage activities, share itineraries, and even upload destination photos—all in one place.
- Trip Management: Easily create, update, and delete trips. 🗂️
- Activity Management: Add, remove, and reorder activities in your trip. 🎯
- Collaborative Planning: Invite friends to collaborate on trips and share your itineraries. 👥
- Photo Uploads: Share photos of your travel destinations and activities. 📸
- Interactive Maps: View your destinations on an interactive map. 🗺️
- User Authentication: Secure login and signup functionality with Supabase. 🔐
- Next.js: A React framework for building fast, user-friendly applications.
- Supabase: An open-source backend-as-a-service that powers the database, authentication, and storage.
- TypeScript: For better code quality and developer experience.
- Tailwind CSS (optional): For styling your app (if applicable).
- Mapbox (optional): For rendering interactive maps.
Here’s an overview of the directory structure for TravelTrek:
└── src/
├── app/
│ ├── actions/
│ ├── api/
│ ├── dashboard/
│ ├── destination/
│ ├── error/
│ ├── faq/
│ ├── favicon.ico
│ ├── globals.css
│ ├── layout.tsx
│ ├── login/
│ ├── page.tsx
│ └── signup/
├── components/
│ ├── destination/
│ ├── layout/
│ ├── map/
│ ├── trip/
│ ├── tripItem/
│ └── ui/
├── context/
│ └── trip-context.tsx
├── lib/
│ ├── destinations/
│ ├── helpers/
│ ├── supabase/
│ ├── types.ts
│ └── utils.ts
└── middleware.ts
-
src/app/actions/
: Contains the action files responsible for CRUD operations related to trips and activities.- Files like
create-trip-action.ts
andupdate-activity-order-action.ts
handle the core logic of managing trip-related data.
- Files like
-
src/app/api/
: The API routes that handle requests such as fetching trips, uploading photos, and handling user authentication.- Example:
src/app/api/collab-requests/route.tsx
handles collaboration-related requests.
- Example:
-
src/app/dashboard/
: Contains the layout and pages related to the user dashboard, where users can view and manage their trips and collaborations. -
src/app/layout.tsx
: The main layout of the app, containing shared elements like the header, footer, and navigation. -
src/components/
: Contains all React components used throughout the app.- For example,
destination/interactive-map-section.tsx
displays an interactive map for each trip's destinations.
- For example,
-
src/lib/supabase/
: Contains files to handle interactions with Supabase, including database queries and authentication. -
src/context/trip-context.tsx
: The context provider to manage the global state of the trip data across your app. -
src/middleware.ts
: Custom middleware for handling authentication and other pre/post request operations.
- Node.js (>= 14.x)
- Yarn (or npm)
- Supabase Account - You'll need a Supabase project for database and authentication.
- Mapbox API Key (optional, if using maps)
git clone https://github.com/yourusername/traveltrek.git
cd traveltrek
Using Yarn:
yarn install
Or using npm:
npm install
Create a .env.local
file in the root of the project and add the following:
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
MAPBOX_API_KEY=your-mapbox-api-key (optional)
Make sure to replace the placeholders with your actual Supabase and Mapbox credentials.
yarn dev
Or using npm:
npm run dev
Visit http://localhost:3000 to view your app.
- Add, update, or delete trips via the Dashboard.
- View trip details and activities with a clean, intuitive UI.
- Invite others to join your trip planning.
- Share itineraries and activity plans in real-time.
- Use the interactive map to visualize your travel destinations.
- Add and modify trip destinations easily on the map.
- Sign up and log in with Supabase authentication.
- Secure user sessions with token-based authentication.
We welcome contributions! Please feel free to fork the repository, submit issues, and create pull requests.
- Fork the repository
- Create a new branch (
git checkout -b feature-branch
) - Make your changes
- Commit your changes (
git commit -am 'Add new feature'
) - Push to your fork (
git push origin feature-branch
) - Submit a pull request
Please ensure to follow the project's code style and conventions when submitting changes.
This project is licensed under the MIT License - see the LICENSE file for details.
- Your Name - @subodha656@-creator
Feel free to reach out for any queries, suggestions, or collaborations!
- Email: subodha656@gmail.com
- GitHub: https://github.com/subodha656-creator
Happy Travels! 🌍