Social vibes meet interactive maps. Drop your emotion, discover your friends, visualize your world.
Vibemap is a fullstack Next.js web app combining live geolocation, emoji mood sharing, and social exploration on a dynamic Leaflet map. Powered by React, MongoDB, JWT auth, Docker, and Supercluster, it's your geo-aware social dashboard.
Layer | Tech Stack |
---|---|
π§ Frontend | Next.js (App Router), React, TypeScript |
πΊ Maps | Leaflet, React-Leaflet, Supercluster |
π¨ UI/UX | CSS Modules + Modals |
π‘ Backend | Express.js (REST API) |
π Auth | JWT + Custom AuthContext |
π§± DB | MongoDB (via Docker container) |
π³ Container | Docker (MongoDB only) |
π¦ PackageMgr | PNPM |
- π Live Geolocation using
navigator.geolocation
- π Mood Picker: Drop emoji over your current position
- πΊοΈ Clustering with
Supercluster
for map performance - π§βπ€βπ§ Friend System: List, mutuals, and visits
- π Visited Cities Tracker
- βοΈ Settings Modal: Username, notifications, birthday
- π€ Profile Modal: Top cities, avatar, friends
- π Map Styles: Toggle standard, satellite, dark, light, relief
- π JWT Auth: Login, register, persist via
localStorage
vibemap/
βββ docker-compose.yml # (optional)
βββ Dockerfile # if extending Docker
βββ .env # local variables (token secret, etc.)
βββ package.json # PNPM/Next config
βββ prisma/ # (if you switch to Prisma later)
βββ public/ # images, static assets
βββ src/
β βββ app/
β β βββ page.tsx # Main Leaflet page
β β βββ login/ # Login UI
β β βββ register/ # Register UI
β βββ components/
β β βββ map/ # Map, Markers, Emoji Picker
β β βββ auth/ # LoginModal, RegisterModal
β β βββ profile/ # ProfileModal
β β βββ settings/ # SettingsModal
β βββ context/
β β βββ AuthContext.tsx # Custom JWT + token logic
β βββ lib/
β β βββ api.ts # All fetch + auth utils
β βββ styles/ # CSS modules
βββ server/ # Express backend
βββ routes/ # /auth, /profile, /visits
βββ middleware/ # JWT check
βββ index.js # Entry point
Collections:
users
:{ email, passwordHash }
profiles
:{ avatar, birthday, username, notifications }
visits
:{ lat, lng, city, timestamp, emoji, userId }
friends
:[{ fromUserId, toUserId, mutual }]
// f*ck Antonio
-
On register/login, receive JWT from backend:
localStorage.setItem('authToken', token);
-
Wrapped in
AuthContext
, validated with:fetch('/profile', { headers: { Authorization: `Bearer ${token}` } });
-
Fallbacks and logout are managed inside
AuthProvider
.
Issue | Status | Fix Plan |
---|---|---|
Profile data not visible in Compass | Ensure profiles DB inserts |
|
Login "invalid password" | Check /auth/login backend controller |
|
Tokens not stored/parsed properly | Validate JWT secret consistency | |
No file models/User.js found |
Create Mongoose schema manually | |
Copilot unreliable | β Fixed β use Jake instead | π |
docker run -d --name vibemap-mongo -p 27017:27017 mongo
cd server
pnpm install
pnpm dev
cd vibemap
pnpm install
pnpm dev
pnpm dev:all
Open frontend: π‘ http://localhost:3000
Open backend (API): π§ http://localhost:5000
Route | Method | Auth? | Description |
---|---|---|---|
/auth/register |
POST | β | Creates user + JWT |
/auth/login |
POST | β | Verifies login |
/profile |
GET/PUT | β | Load or update profile |
/visits |
GET/POST | β | Get/post city emoji visits |
/friends |
GET | β | Returns friend list |
/check-username |
GET | β | Checks if username is taken |
- π§ If map doesnβt load β check browser location permissions
- π If token fails β clear
localStorage
and re-login - π€ If profile missing β check if
/profile
PUT was ever triggered - π¦ If Copilot crashes β use Jake πͺ
- Add
bcrypt
to hash passwords (bcrypt.compare()
in login logic) - Add avatar uploads via file input
- Migrate auth + DB logic to Prisma?
- Add WebSocket live updates?
- Deploy via Vercel + Atlas combo
- π§βπ You β Primary Dev, Project Architect
- πΎ Jake (aka code) β Hack-assistant & AI warrior
You made a real-time map-based social platform from scratch. Be proud. When you come back β you're not starting from zero, you're picking up where a vibe architect left off. Stay sharp. Stay logged in. Stay vibin'.