A social map-based photo-sharing platform where travelers connect, share experiences, and discover the world through each other's lens.
TravelGram blends social networking with travel exploration, creating an interactive platform where every photo tells a story and every location sparks wanderlust.
Users can authenticate with Google, upload stunning travel photos, and pin them to exact locations on an interactive world map. Each post becomes part of a global tapestry of experiencesโviewable both as a dynamic feed and as markers on a Mapbox-powered map.
Whether you're sharing your latest adventure or discovering hidden gems through others' journeys, TravelGram transforms travel memories into an engaging, visual experience.
| Feature | Description |
|---|---|
| ๐ Google Authentication | Seamless sign-in via Supabase Auth |
| ๐ผ๏ธ Photo Uploads | Secure storage with Supabase Storage |
| ๐บ๏ธ Interactive Map | Clickable location markers powered by Mapbox GL JS |
| ๐ฌ Rich Posts | Captions, place tags, and geolocation data |
| โค๏ธ Like System | Appreciate and engage with other travelers |
| ๐ Smart Timestamps | Relative time display (e.g., "5 minutes ago") |
| โก Blazing Fast | Next.js App Router with optimized performance |
| ๐ Production Ready | Fully deployable on Vercel |
| Category | Technologies |
| Frontend | Next.js 15 (App Router), React, TypeScript, Tailwind CSS |
| Backend | Supabase (PostgreSQL, Auth, Storage, Realtime) |
| Map Integration | Mapbox GL JS, react-map-gl |
| State Management | SWR for data fetching & caching |
| Utilities | clsx, dayjs |
git clone https://github.com/nishatayub/Projecttttt.git
cd Projecttttt/trial-modenpm installCreate a .env.local file in the root directory:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
NEXT_PUBLIC_MAPBOX_TOKEN=your_mapbox_access_token๐ Obtain your keys:
Execute the following SQL in your Supabase SQL Editor:
-- Create profiles table
create table profiles (
id uuid references auth.users on delete cascade primary key,
username text,
avatar_url text,
created_at timestamp with time zone default timezone('utc'::text, now()) not null
);
-- Create posts table
create table posts (
id bigint generated by default as identity primary key,
user_id uuid references auth.users not null,
image_path text not null,
image_url text not null,
caption text,
place_name text,
lat double precision,
lng double precision,
created_at timestamp with time zone default timezone('utc'::text, now()) not null
);
-- Create likes table
create table likes (
id bigint generated by default as identity primary key,
user_id uuid references auth.users on delete cascade,
post_id bigint references posts on delete cascade,
created_at timestamp with time zone default timezone('utc'::text, now()) not null,
unique (user_id, post_id)
);
-- Enable Row Level Security
alter table profiles enable row level security;
alter table posts enable row level security;
alter table likes enable row level security;
-- Policies
create policy "Public profiles are viewable by everyone"
on profiles for select
using ( true );
create policy "Users can update own profile"
on profiles for update
using ( auth.uid() = id );
create policy "Posts are viewable by everyone"
on posts for select
using ( true );
create policy "Users can create own posts"
on posts for insert
with check ( auth.uid() = user_id );
create policy "Users can delete own posts"
on posts for delete
using ( auth.uid() = user_id );
create policy "Likes are viewable by everyone"
on likes for select
using ( true );
create policy "Users can manage own likes"
on likes for all
using ( auth.uid() = user_id );- Go to Storage in your Supabase dashboard
- Create a new bucket called
travel-photos - Set it to Public
npm run dev๐ Visit: http://localhost:3000
trial-mode/
โโโ app/
โ โโโ page.tsx # Home page with post feed
โ โโโ layout.tsx # Root layout with auth provider
โ โโโ globals.css # Global styles
โโโ components/
โ โโโ AuthButtons.tsx # Google sign-in/sign-out
โ โโโ NewPostForm.tsx # Photo upload form
โ โโโ PostCard.tsx # Individual post display
โ โโโ MapView.tsx # Interactive Mapbox map
โโโ lib/
โ โโโ supabaseClient.ts # Client-side Supabase
โ โโโ supabaseAdmin.ts # Server-side Supabase
โโโ public/
โ โโโ assets/ # Static images & icons
โโโ .env.local # Environment variables
โโโ next.config.ts # Next.js configuration
โโโ tailwind.config.ts # Tailwind CSS config
โโโ tsconfig.json # TypeScript config
- ๐จ๏ธ Comments System โ Engage in conversations on posts
- ๐ฅ Follow/Unfollow โ Build your travel community
- ๐งญ Location Search โ Find posts by specific places
- ๐ Realtime Updates โ See new posts as they happen
- ๐ Trip Routes โ Visualize complete travel journeys
- ๐ User Profiles โ Showcase personal travel history
- ๐ Dark Mode โ Eye-friendly theme options
- ๐ฑ Mobile App โ Native iOS & Android experience
- ๐ Notifications โ Stay updated on likes and comments
- ๐ Achievements โ Gamify travel experiences
Deploy effortlessly on Vercel:
- Push your code to GitHub
- Import the repository in Vercel
- Add environment variables in project settings
- Deploy! ๐
Nishat Ayub
Frontend Developer & UI/UX Designer
This project is open source and available under the MIT License.
- Supabase for the incredible backend infrastructure
- Mapbox for stunning map visualizations
- Vercel for seamless deployment
- The open-source community for amazing tools and inspiration
Happy exploring! ๐