Live at: worldvibe.app
A global emotional check-in platform where users submit one anonymous check-in daily, and we visualize the world's mood in real-time through an interactive 3D globe.
- π Privacy-First: Ephemeral tokens, region hashing, no personal identifiers
- π Interactive Globe: Real-time 3D visualization of global emotional data
- π¨ Emotion Avatars: Unique visual representations for each emotional state
- π Live Analytics: Real-time dashboard showing global mood trends
- π Daily Check-ins: One anonymous emotional check-in per user, per day
- π 8 Core Emotions: Joy, Love, Surprise, Sadness, Fear, Anger, Disgust, Neutral
- π± Responsive Design: Seamless experience across desktop and mobile
- β‘ Real-time Updates: WebSocket-powered live data streaming
# Install dependencies
npm install
# Start the app with SQLite
npm run dev:sqlite
This automatically creates a SQLite database, seeds sample data, and starts the dev server.
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your Supabase credentials
# Run development server
npm run dev
- Framework: Next.js 14.0.3 (App Router)
- Language: TypeScript
- Database: Supabase PostgreSQL (Production), SQLite (Development)
- ORM: Prisma
- Styling: Tailwind CSS
- Animations: Framer Motion
- 3D Visualization: react-globe.gl, Three.js
- Analytics: Vercel Analytics, Google Analytics
- Deployment: Vercel
- Real-time: WebSockets
worldvibe/
βββ src/
β βββ app/ # Next.js App Router pages
β β βββ api/ # API routes
β β βββ checkin/ # Check-in flow
β β βββ globe/ # Interactive globe view
β β βββ about/ # About page
β βββ components/ # React components
β β βββ layout/ # Header, footer, etc.
β β βββ ui/ # Reusable UI components
β β βββ visualization/ # Globe, charts, etc.
β β βββ notifications/ # Toast notifications
β βββ lib/ # Core libraries
β β βββ db/ # Database clients
β β βββ privacy/ # Privacy utilities
β β βββ realtime/ # WebSocket handling
β βββ services/ # Business logic
β β βββ check-in-service.ts
β β βββ analytics-service.ts
β β βββ region-service.ts
β βββ types/ # TypeScript types
βββ prisma/
β βββ schema.prisma # Database schema
βββ scripts/ # Utility scripts
βββ public/ # Static assets
npm run dev # Standard Next.js development
npm run dev:sqlite # Development with SQLite
npm run dev:safe # Development with DB checks
npm run dev:seed # Development with DB setup and seeding
npm run db:setup # Initialize database with schema
npm run db:check # Verify database connectivity
npm run db:test # Test database functionality
npm run lint # ESLint
npm run type-check # TypeScript check
npm run format # Prettier formatting
npm run test # Run unit tests
npm run build # Production build
npm run start # Start production server
The app is deployed on Vercel at worldvibe.app.
Required:
DATABASE_URL=postgresql://... # Supabase connection string
NEXT_PUBLIC_APP_URL=https://worldvibe.app # Production URL
Optional:
NEXT_PUBLIC_GA_MEASUREMENT_ID=G-XXXXXXXXXX # Google Analytics
Husky pre-push hook automatically runs ESLint and TypeScript checks before pushing to prevent deployment failures:
# Located in .husky/pre-push
npm run lint
npm run type-check
- Session pooler connection on port 5432
- 8 tables: check_ins, analytics, sessions, events, privacy_consents, rate_limits, realtime_stats, base_model
- Automatic connection pooling and health monitoring
- Local file-based database
- Same schema as PostgreSQL for compatibility
- Automatic seeding with sample data
See DATABASE_SETUP.md for detailed database documentation.
- 3D Earth visualization using react-globe.gl
- Real-time emotional data points from global check-ins
- Hover interactions showing location and emotion details
- Ambient lighting and atmosphere effects
- 8 core emotions with unique color schemes and avatars
- Joy (Yellow), Love (Pink), Surprise (Purple), Sadness (Blue)
- Fear (Dark Purple), Anger (Red), Disgust (Green), Neutral (Gray)
- Each emotion has a custom-designed avatar character
- Device fingerprinting without personal data
- Regional data anonymization (no exact coordinates)
- Automatic data retention policies
- No user accounts or authentication required
- Global emotion distribution
- Real-time check-in counts
- Geographic emotion mapping
- Trend analysis over time
- Content Security Policy (CSP) headers
- X-Frame-Options, X-XSS-Protection
- No personal identifiers stored
- Anonymous check-ins only
- Rate limiting on API endpoints
- Setup Guide: STARTUP.md
- Database Guide: DATABASE_SETUP.md
- Architecture Guide: CLAUDE.md
Pull requests welcome! Please ensure:
- ESLint and TypeScript checks pass
- Tests are updated/added for new features
- Follow existing code style and conventions
The pre-push hook will automatically validate your code before pushing.
Built with β€οΈ for understanding global emotions