Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jibilib - Idle Tycoon Game 🎮

A Next.js-based idle/incremental game where players solve math problems to earn money, buy businesses, invest in real estate, and build their empire!

🎯 Features

  • Math-Based Gameplay: Answer math questions to earn money
  • Business Management: Buy and upgrade various businesses (shops, factories, banks, airlines, etc.)
  • Real Estate Investment: Purchase properties, renovate them, and sell for profit
  • Idle Income: Earn passive income from businesses even when offline
  • Firebase Integration: Cloud-based data storage and authentication
  • Google Sign-In: Save progress across devices by signing in with Google
  • Anonymous Play: Start playing instantly without registration

🚀 Tech Stack

  • Framework: Next.js 15.5.9 (React 19)
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Backend: Firebase Realtime Database
  • Authentication: Firebase Auth (Anonymous + Google)
  • State Management: React Context + Hooks

📦 Installation

  1. Clone the repository:
git clone https://github.com/Farenhid/Jibigame.git
cd Jibigame
  1. Install dependencies:
npm install
  1. Create .env.local file in the root directory with your Firebase config:
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_auth_domain
NEXT_PUBLIC_FIREBASE_DATABASE_URL=your_database_url
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_storage_bucket
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=your_measurement_id
  1. Run the development server:
npm run dev
  1. Open http://localhost:3000 in your browser

🔧 Firebase Setup

  1. Create a Firebase project at Firebase Console
  2. Enable AuthenticationAnonymous and Google providers
  3. Enable Realtime Database
  4. Deploy security rules from database.rules.json
  5. Create a Web App and copy the config to .env.local

For detailed setup instructions, see:

  • FIREBASE_SETUP_INSTRUCTIONS.md
  • GOOGLE_SIGNIN_SETUP.md
  • DEPLOYMENT_CHECKLIST.md

🎮 How to Play

  1. Start as Guest: Game automatically signs you in anonymously
  2. Answer Math Questions: Click correct answers to earn money
  3. Buy Businesses: Invest in various businesses to generate passive income
  4. Upgrade Properties: Buy real estate, complete renovation tasks, and sell for profit
  5. Save Progress: Click "Save Progress" to link your Google account and sync across devices

📂 Project Structure

Jibilib Game/
├── src/
│   ├── app/                    # Next.js app directory
│   │   ├── layout.tsx         # Root layout with auth button
│   │   ├── page.tsx           # Main game page
│   │   └── globals.css        # Global styles
│   ├── components/            # Reusable UI components
│   │   ├── AuthButton.tsx     # Google Sign-In button
│   │   ├── BalanceCard.tsx    # Display user balance
│   │   ├── BottomNav.tsx      # Navigation bar
│   │   └── MoneyFly.tsx       # Earn money animation
│   ├── game/                  # Game logic
│   │   ├── GameProvider.tsx   # Global game state
│   │   ├── models.ts          # Game data models
│   │   ├── math.ts            # Math question generator
│   │   └── userStateStore.ts # Firebase DB operations
│   ├── screens/               # Game screens
│   │   ├── Business.tsx       # Business management
│   │   ├── Earnings.tsx       # Main earnings screen
│   │   ├── Profile.tsx        # User profile
│   │   └── RealEstate.tsx     # Real estate investments
│   ├── auth/                  # Authentication
│   │   └── firebaseAuth.ts    # Auth helpers
│   └── firebaseClient.ts      # Firebase initialization
├── database.rules.json        # Firebase security rules
├── firebase.json              # Firebase config
└── public/                    # Static assets

🔐 Security

  • Firebase Security Rules ensure users can only access their own data
  • Environment variables are gitignored
  • Anonymous authentication allows instant play
  • Google Sign-In enables cross-device sync

🎨 Game Features

Businesses

  • Online Shop
  • Physical Shop
  • Taxi Company
  • Shipping Company
  • Factory
  • Construction Company
  • Car Dealership
  • IT Company
  • Bank
  • Sports Club
  • Oil and Gas Company
  • Airlines

Real Estate

  • Sunny Apartment (Kansas City)
  • Downtown Loft (New York)
  • Beach House (Miami)

Each property has multiple renovation tasks that increase its market value.

📱 Progressive Web App

The game is configured as a PWA with:

  • Offline support
  • Mobile-responsive design
  • Touch-optimized controls
  • App-like experience

🚀 Deployment

Build for production:

npm run build
npm start

Deploy to Vercel:

vercel deploy

📄 License

This project is open source and available under the MIT License.

👨‍💻 Author

Farid Faraji

🙏 Acknowledgments

  • Next.js team for the amazing framework
  • Firebase for backend infrastructure
  • Tailwind CSS for styling utilities

Play now: Jibilib Game

About

Jibilib - Idle Tycoon Game with Firebase and Google Sign-In

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages