GemiSpace
The ultimate Gen Z social media app built with Next.js 15 and Firebase ✨
GemiSpace is a modern, responsive social media platform designed specifically for Gen Z users, featuring real-time chat, meme generation, content sharing, and AI-powered features. Built with the latest web technologies for optimal performance and user experience.
🚀 Features Overview
🔐 Authentication System
- Firebase Auth Integration: Secure user authentication with email/password and Google OAuth
- Playful Auth UI: Gen Z-friendly login/signup pages with engaging error messages
- Protected Routes: Automatic route protection with seamless redirects
- Profile Management: User profiles with avatars, display names, and social stats
📱 Core Social Features
- Gemi Feed: Main timeline displaying “Gemies” (posts with images/videos)
- Real-time Interactions: Like (“slay”) posts, comment, and share with optimistic UI updates
- Content Creation: Post images, videos, and text with rich media support
- User Discovery: Browse and connect with other users
- Social Stats: Track likes received, connections, and engagement
💬 GemiChat - Real-time Messaging
- Live Chat System: Real-time messaging powered by Firebase Firestore
- Connection Management: Add friends and manage chat connections
- Typing Indicators: “typing like a menace” status for active conversations
- Thread Management: Organize conversations with persistent chat threads
- Mobile-Optimized: Responsive chat interface for all devices
🎨 Meme Generator
- Template Library: Famous meme templates (Distracted Boyfriend, Drake, etc.)
- Drag & Drop Interface: Interactive text placement with touch/mouse support
- Impact-Style Fonts: Classic meme typography
- Export Features: Download memes with “Made on GemiSpace” watermark
- Template Categories: Organized meme templates for easy browsing
🌙 Dynamic Theming
- Multiple Themes: Baby Pink, Ocean Blue, Sunshine Yellow, Midnight Purple, Forest Green
- System Integration: Automatic theme switching based on system preferences
- Night Mode Nudge: Playful bedtime reminders with system time detection
- Compact Theme Selector: Easy theme switching with emoji indicators
- Persistent Preferences: Theme choices saved across sessions
🤖 AI-Powered Features
- Gen Z Slang Suggestions: AI-powered content enhancement using Google Gemini
- Smart Content Analysis: Contextual slang recommendations
- Server-Side Processing: Secure AI processing with Genkit framework
- Optional Integration: AI features can be enabled/disabled as needed
📱 Mobile-First Design
- Responsive Layout: Optimized for mobile, tablet, and desktop
- Touch-Friendly: Gesture-based interactions and swipe navigation
- Progressive Web App: PWA-ready with offline capabilities
- Mobile Navigation: Collapsible sidebar with burger menu
- Adaptive UI: Layout adjusts seamlessly across screen sizes
🛠️ Technical Stack
Frontend
- Next.js 15: Latest React framework with App Router and Server Components
- TypeScript: Full type safety and modern JavaScript features
- Tailwind CSS: Utility-first styling with custom theme system
- Radix UI: Accessible component primitives for consistent UI
- Lucide Icons: Modern, customizable icon set
- React Hook Form: Form management with validation
Backend & Database
- Firebase Firestore: NoSQL real-time database for posts, chats, and user data
- Firebase Auth: Authentication service with multiple providers
- Firebase Storage: Media file storage for images and videos
- Cloud Functions: Serverless functions for complex operations
- Firestore Security Rules: Database-level security and validation
AI & Machine Learning
- Google Genkit: AI framework for integrating language models
- Google Gemini: Large language model for content generation
- Server Actions: Secure AI processing on the server side
- Type-Safe APIs: Strongly typed AI integration with Zod schemas
- Firebase Emulator: Local development environment
- ESLint & Prettier: Code quality and formatting
- Turbopack: Fast build system for development
- TypeScript Compiler: Static type checking
- Hot Reload: Instant development feedback
📁 Project Structure
src/
├── app/ # Next.js App Router pages
│ ├── (auth)/ # Authentication pages (login, signup)
│ ├── (main)/ # Main app pages (feed, chat, profile, etc.)
│ │ ├── feed/ # Main content feed
│ │ ├── chat/ # Real-time messaging
│ │ ├── meme-generator/ # Meme creation tool
│ │ ├── profile/ # User profiles
│ │ ├── explore/ # Content discovery
│ │ ├── bookmarks/ # Saved content
│ │ └── settings/ # App settings
│ └── auth-test/ # Firebase connection testing
├── components/ # Reusable React components
│ ├── ui/ # Base UI components (buttons, cards, etc.)
│ ├── AuthEnforcer.tsx # Route protection component
│ ├── NavigationSidebar.tsx # Main navigation
│ ├── GemiPost.tsx # Individual post component
│ ├── MemeGenerator.tsx # Meme creation interface
│ └── ChatThread.tsx # Chat conversation UI
├── contexts/ # React Context providers
│ ├── AuthContext.tsx # Authentication state
│ ├── ChatContext.tsx # Chat functionality
│ └── ThemeContext.tsx # Theme management
├── hooks/ # Custom React hooks
│ ├── use-gemies.ts # Post data management
│ ├── use-comments.ts # Comment functionality
│ └── use-mobile.tsx # Mobile responsive helpers
├── lib/ # Utility libraries
│ ├── firebase.ts # Firebase configuration
│ ├── firebase-services.ts # Database operations
│ ├── themes.ts # Theme definitions
│ ├── utils.ts # General utilities
│ └── actions.ts # Server actions
└── ai/ # AI integration (server-only)
├── genkit.ts # AI framework setup
└── flows/ # AI processing flows
└── gen-z-slang-suggestion.ts
🚀 Getting Started
Prerequisites
- Node.js 18+ and npm
- Firebase Project with Firestore, Auth, and Storage enabled
- Google Cloud API Key (optional, for AI features)
1. Clone and Install
git clone https://github.com/youngcoder45/gemispace.git
cd gemispace
npm install
2. Firebase Setup
- Create a new Firebase project at console.firebase.google.com
- Enable Authentication → Sign-in methods:
- ✅ Email/Password
- ✅ Google (add
http://localhost:9002 to authorized domains)
- Enable Firestore Database in production mode
- Enable Storage for media uploads
- Copy your Firebase config from Project Settings → General → Web App
3. Environment Configuration
Copy-Item .env.local.example .env.local
Edit .env.local with your Firebase configuration:
# Firebase Configuration (Required)
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key_here
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
# Optional: Firebase Emulator (Development)
NEXT_PUBLIC_USE_FIREBASE_EMULATOR=true
# Optional: AI Features
GEMINI_API_KEY=your_gemini_api_key
GOOGLE_API_KEY=your_google_api_key
# Optional: Firebase Performance
NEXT_PUBLIC_FIREBASE_LOG_LEVEL=warn
NEXT_PUBLIC_FIRESTORE_FORCE_LONG_POLLING=false
4. Development Server
npm run dev
🎉 App runs at http://localhost:9002
5. Optional: Firebase Emulator (Recommended)
For local development without using cloud resources:
# Install Firebase CLI globally
npm i -g firebase-tools
# Start emulators (separate terminal)
firebase emulators:start --only firestore,auth
# Update .env.local
NEXT_PUBLIC_USE_FIREBASE_EMULATOR=true
# Restart dev server
npm run dev
🔧 Available Scripts
npm run dev - Start development server with Turbopack
npm run build - Build production application
npm run start - Start production server
npm run lint - Run ESLint code analysis
npm run typecheck - Run TypeScript type checking
npm run genkit:dev - Start AI development server
npm run genkit:watch - Start AI server with file watching
🎨 Theme System
GemiSpace features a comprehensive theming system with 5+ built-in themes:
Available Themes
- 🌸 Baby Pink - Soft and sweet pink vibes (default)
- 🌊 Ocean Blue - Calming ocean depths
- ☀️ Sunshine Yellow - Bright and energetic
- 🌙 Midnight Purple - Dark mode with purple accents
- 🌲 Forest Green - Natural earth tones
Theme Features
- System Integration: Automatically respects user’s system theme preference
- Persistent Storage: Theme choices saved in localStorage
- Smooth Transitions: Animated theme switching
- Component Coverage: All UI components support theming
- Night Mode: Special handling for dark themes with bedtime reminders
📱 Page Structure & Features
Authentication Pages (/login, /signup)
- Clean, Gen Z-friendly authentication forms
- Social login with Google OAuth
- Form validation with helpful error messages
- Automatic redirection after successful authentication
Main Feed (/feed)
- Infinite scroll timeline of user posts
- Real-time like/comment interactions
- Content filtering and discovery
- Pull-to-refresh functionality
Real-time Chat (/chat)
- Sidebar: Connection list with search functionality
- Chat Interface: Message bubbles with timestamps
- Thread Management: Persistent conversation history
- Mobile Responsive: Collapsible layout for mobile devices
- Status Indicators: Online status and typing indicators
Meme Generator (/meme-generator)
- Template Selection: Grid of popular meme templates
- Text Editor: Add draggable text overlays
- Font Styling: Impact font with customizable size
- Export Options: Download as image with watermark
- Mobile Touch: Touch-friendly drag interactions
User Profile (/profile)
- Profile Information: Avatar, bio, social stats
- Post History: Grid view of user’s posts
- Edit Profile: Update personal information
- Settings Access: Quick link to app settings
Settings (/settings)
- Theme Selector: Choose from available themes
- Account Management: Profile editing and preferences
- Privacy Controls: Content visibility settings
- Gen Z Labels: Playful setting descriptions (“i’m out bye 👋” for logout)
🔒 Security & Privacy
Authentication Security
- Firebase Auth: Industry-standard authentication service
- JWT Tokens: Secure session management
- Route Protection: Automatic authentication checks
- CSRF Protection: Built-in request validation
Database Security
- Firestore Rules: Server-side data validation
- User Isolation: Users can only access their own data
- Input Sanitization: All user input is validated
- Real-time Security: Live rule enforcement
Privacy Features
- Data Minimization: Only necessary data is collected
- User Control: Users control their content visibility
- Secure Storage: Media files stored in Firebase Storage
- GDPR Compliance: Data handling follows privacy regulations
🚀 Deployment
Vercel Deployment (Recommended)
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel --prod
Firebase Hosting
# Build the app
npm run build
# Deploy to Firebase
firebase deploy
Environment Variables for Production
Ensure all required environment variables are set in your hosting platform:
- Firebase configuration
- AI API keys (if using AI features)
- Any custom environment settings
🤝 Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit changes:
git commit -m 'Add amazing feature'
- Push to branch:
git push origin feature/amazing-feature
- Open a Pull Request
Development Guidelines
- Follow TypeScript best practices
- Use Tailwind CSS for styling
- Add proper error handling
- Write descriptive commit messages
- Test on multiple devices/screen sizes
📄 License
This project is licensed under the MIT License. See the LICENSE file for details.
🙏 Acknowledgments
- Firebase Team for the excellent backend services
- Vercel Team for Next.js and deployment platform
- Radix UI for accessible component primitives
- Tailwind CSS for the utility-first CSS framework
- Google for Gemini AI integration
- Open Source Community for inspiration and tools
Made with 💖 for Gen Z by Gen Z
GemiSpace - Where your thoughts become viral content ✨
评论