Whiskers is a production-grade, highly polished virtual pet simulator that blends gamification, artificial intelligence, and beautiful UI/UX design into a cohesive digital universe. Adopt a companionβfrom a cozy Panda to a cyberpunk Dragonβand manage their health, happiness, and energy.
Powered by Google's Gemini 1.5 Flash AI, your pet possesses a unique, dynamic personality that reacts emotionally to your actions. The entire application interface dynamically shifts its theme, color palette, and particle effects based on your chosen species, delivering a breathtaking and personalized experience.
- ** Immersive 3D Parallax Subway UI:** Experience a fully customized, edge-to-edge cinematic 3D train engine built purely with SVG math and Framer Motion. Watch glowing neon cyberpunk cities fly by in a beautifully layered parallax scene while your companion sits beside you!
- ** Dynamic Species Theme Engine:** The entire UI (colors, fonts, micro-animations, floating canvas particles) transforms completely based on your pet's species (e.g., Neon Purple for Cats, Bamboo Green for Pandas).
- ** AI Companion Chat:** Have real, context-aware conversations with your pet! The Gemini AI system prompt is dynamically injected with your pet's current mood, hunger levels, and innate personality.
- ** Gamified Progression System:** Earn XP, collect coins, and level up your pet. Features a daily streak system, unlockable rarity-tiered achievements, and an evolutionary growth cycle.
- ** Advanced Wellbeing Analytics:** Beautiful, glassmorphic charts built with Recharts track your pet's 7-day wellbeing, mood history, and your interaction frequency.
- ** Real-Time Sync & Offline Persistence:** Built with Firebase Firestore and Zustand to ensure lightning-fast UI updates, offline capability, and cross-device synchronization.
- ** PWA Ready:** Fully installable as a Progressive Web App (PWA) for a native-like app experience on both iOS and Android.
Whiskers was built using cutting-edge, modern web technologie:
- Next.js 15 - React framework using the App Router and Server Components.
- React 19 - For building the interactive user interface.
- TypeScript - For strict type-safety and robust code architecture.
- Tailwind CSS v4 - Utility-first CSS framework for rapid, responsive design.
- Custom CSS Variables - For the dynamic multi-theme engine and advanced glassmorphism effects.
- Lucide React - Beautiful, consistent SVG icons.
- Radix UI - Unstyled, accessible UI primitives (used for Toasts, Progress bars, etc.).
- Framer Motion - For complex page transitions, micro-interactions, and layout animations.
- GSAP - For high-performance JavaScript animations.
- HTML5 Canvas - Custom
ParticleCanvascomponent rendering species-specific floating emojis and particles.
- Zustand - Lightweight, fast global state management with
persistmiddleware for local storage caching. - Firebase -
- Firestore: NoSQL database with real-time
onSnapshotlisteners. - Authentication: Secure Google OAuth and Email/Password sign-in.
- Firestore: NoSQL database with real-time
- Google Generative AI SDK - Integration with the
gemini-1.5-flashmodel for intelligent pet conversations. - Recharts - Composable charting library used for the analytics dashboard with custom glassmorphic tooltips.
- Next-PWA - Zero-config PWA plugin for Next.js.
- ESLint & Prettier - Code linting and formatting.
Follow these instructions to get a copy of the project up and running on your local machine.
- Node.js (v18.17.0 or higher)
- npm, yarn, or pnpm
- A Firebase Project
- A Google Gemini API Key
-
Clone the repository
git clone https://github.com/a4kashhh/whiskers.git cd whiskers -
Install dependencies
npm install
-
Configure Environment Variables
- Copy the
.env.local.examplefile to.env.local:
cp .env.local.example .env.local
- Open
.env.localand add your Firebase configuration and Gemini API Key:
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.firebasestorage.app NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id GEMINI_API_KEY=your_gemini_api_key
- Copy the
-
Set up Firebase
- Go to your Firebase Console.
- Enable Authentication (Google & Email/Password providers).
- Enable Firestore Database. Start in test mode for local development, or configure security rules for production.
-
Run the Development Server
npm run dev
Open http://localhost:3000 with your browser to enter the universe!
src/
βββ app/ # Next.js 15 App Router pages & API Routes
β βββ (auth)/ # Protected authentication flows (Login/Signup)
β βββ (dashboard)/ # Main application shell (Feed, Play, Chat, Analytics)
β βββ api/chat/ # Gemini AI Route Handler
β βββ globals.css # Global styles and dynamic Theme Engine CSS tokens
βββ components/ # Reusable UI components
β βββ dashboard/ # Sidebar, Topbar, Activity Widgets
β βββ pet/ # Pet Avatar, Stat Meters, Progress Bars
β βββ theme/ # Canvas Particle Generators
β βββ ui/ # Radix primitives & Framer Motion Toasts
βββ lib/ # Utilities and configurations
β βββ firebase/ # Firebase initialization, Auth, and Firestore helpers
β βββ theme-engine/ # Species definition and color palette mapping
βββ stores/ # Zustand global state
β βββ useAuthStore.ts # User session management
β βββ useGameStore.ts # XP, Coins, Achievements (Local Persisted)
β βββ usePetStore.ts # Pet vitals with real-time Firestore sync
βββ types/ # Strict TypeScript interfaces
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
- Design inspiration drawn from modern glassmorphism and hyper-casual gaming UI.
- Emojis provided by Animated Fluent Emojis.
