Skip to content

devantaris/Biome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌿 Biome

Build your own world, one focus session at a time.

License: MIT React Electron Firebase TypeScript Vite


What is Biome?

Biome is a world-building productivity app for desktop and mobile. Stay focused during your work sessions to earn trees, flowers, and rare items β€” then manually place them wherever you want to grow your own living ecosystem.

Unlike apps that just plant a generic tree and move on, Biome gives you full creative control. Your world is yours to design.

Inspired by the idea that deep work should leave a tangible, beautiful trace in your life.


✨ Features

🌍 Your World, Your Rules

  • Complete a focus session β†’ earn a plant or item in your Inventory
  • Open My Biome β†’ select an item β†’ place it exactly where you want on the grid
  • Territory Expansion β€” fill all tiles with living items and your world grows 1.75Γ— in size

⏱️ Focus Timer

  • Pomodoro-style timer with customizable durations (5–120 minutes)
  • 5 ambient soundscapes: Rain, Forest, Ocean, Cafe, Fireplace
  • Give up a session β†’ a withered shrub drops as a penalty (placed automatically)
  • Item rarity system: Common β†’ Rare β†’ Epic β†’ Legendary

πŸ“… Daily Planner + Timeline

  • Add tasks by day with categories (Work, Study, Health, Creative, Code...)
  • Calendar heatmap (GitHub-style) showing focus history for the whole month
  • Navigate between days with the date strip β€” past days are read-only

πŸ”₯ Streaks & Progression

  • XP system with levels (Forest Ranger β†’ Ancient Guardian)
  • Daily streak tracking with streak freeze mechanic
  • 30+ achievements to unlock across all features
  • Weekly and monthly challenges

πŸ† Real-Time Leaderboard

  • Live global rankings powered by Firebase Firestore
  • Compete on weekly focus minutes
  • Shows streak, level, and forest size for all players

☁️ Cross-Device Sync (Google Auth)

  • Sign in with Google β€” your biome syncs across desktop + phone
  • Auto-saves every 3 seconds to Firestore
  • Works offline (PWA-ready with service worker)

πŸ“± Progressive Web App (PWA)

  • Full mobile-responsive UI with custom glassmorphic bottom navigation bar
  • Add to Home Screen on iOS (Safari) and Android (Chrome)
  • Seamless offline support with Service Workers
  • Fluid grid layouts and safe-area adjustments for modern phone displays

πŸ–₯️ Desktop-First (Electron)

  • Custom frameless window with native title bar controls
  • Floating Mini Widget β€” when minimized, a small glass overlay shows your live timer countdown
  • System tray with quick-start shortcuts
  • Global shortcut: Ctrl+Shift+F to bring the app to focus

πŸš€ Getting Started

Prerequisites

Tool Version
Node.js 18+
npm 9+
Git any
A Firebase project Setup guide below

1. Clone the repo

git clone https://github.com/devantaris/Biome.git
cd Biome

2. Install dependencies

npm install

3. Configure Firebase

Copy the environment example and fill in your Firebase config:

cp .env.example .env

Then open src/lib/firebase.ts and replace the firebaseConfig object with your own values from the Firebase console:

const firebaseConfig = {
  apiKey: "YOUR_API_KEY",
  authDomain: "YOUR_PROJECT.firebaseapp.com",
  projectId: "YOUR_PROJECT_ID",
  storageBucket: "YOUR_PROJECT.firebasestorage.app",
  messagingSenderId: "YOUR_SENDER_ID",
  appId: "YOUR_APP_ID",
};

4. Run in the browser (dev mode)

npm run dev

Open http://localhost:3000 in your browser.

5. Run as a desktop app (Electron)

npm run dev:electron

This starts both the Vite dev server and Electron simultaneously.


Firebase Setup

Required for Google Sign-In and cross-device sync.

  1. Go to console.firebase.google.com β†’ Add project β†’ name it anything
  2. Authentication β†’ Get started β†’ Enable Google sign-in
  3. Firestore Database β†’ Create database β†’ Start in production mode
  4. Set Firestore Security Rules:
rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /users/{userId}/{document=**} {
      allow read, write: if request.auth != null && request.auth.uid == userId;
    }
    match /leaderboard/{userId} {
      allow read: if true;
      allow write: if request.auth != null && request.auth.uid == userId;
    }
  }
}
  1. Project settings β†’ Add a web app β†’ Copy the firebaseConfig β†’ paste into src/lib/firebase.ts

πŸ“ Project Structure

Biome/
β”œβ”€β”€ electron/                   # Electron main process
β”‚   β”œβ”€β”€ main.cjs                # Window, tray, widget, IPC handlers
β”‚   β”œβ”€β”€ preload.cjs             # Context bridge (exposed to React)
β”‚   β”œβ”€β”€ widget.html             # Floating mini-timer UI
β”‚   └── widget-preload.cjs     # Widget context bridge
β”‚
β”œβ”€β”€ public/                     # Static assets
β”‚   β”œβ”€β”€ favicon.svg
β”‚   β”œβ”€β”€ manifest.json           # PWA manifest
β”‚   └── sw.js                   # Service worker (offline)
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/             # React UI components
β”‚   β”‚   β”œβ”€β”€ AuthGate.tsx        # Google sign-in landing page
β”‚   β”‚   β”œβ”€β”€ Dashboard.tsx       # Home dashboard with stats
β”‚   β”‚   β”œβ”€β”€ Timer.tsx           # Focus timer UI
β”‚   β”‚   β”œβ”€β”€ ForestView.tsx      # The world builder (placement mode)
β”‚   β”‚   β”œβ”€β”€ TaskManager.tsx     # Daily task manager with date strip
β”‚   β”‚   β”œβ”€β”€ Calendar.tsx        # Monthly heatmap timeline
β”‚   β”‚   β”œβ”€β”€ Leaderboard.tsx     # Global rankings
β”‚   β”‚   β”œβ”€β”€ Achievements.tsx    # 30+ badges
β”‚   β”‚   β”œβ”€β”€ Challenges.tsx      # Weekly/daily challenges
β”‚   β”‚   β”œβ”€β”€ Settings.tsx        # App preferences + logout
β”‚   β”‚   β”œβ”€β”€ Sidebar.tsx         # Navigation + user profile
β”‚   β”‚   β”œβ”€β”€ Onboarding.tsx      # First-run welcome
β”‚   β”‚   └── TitleBar.tsx        # Custom frameless window controls
β”‚   β”‚
β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   β”œβ”€β”€ useAppState.ts      # Central state management (localStorage)
β”‚   β”‚   β”œβ”€β”€ useTimer.ts         # Timer logic, earn items, penalties
β”‚   β”‚   β”œβ”€β”€ useAuth.ts          # Firebase Google auth hook
β”‚   β”‚   └── useCloudSync.ts     # Firestore auto-sync hook
β”‚   β”‚
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ firebase.ts         # Firebase init ← PUT YOUR CONFIG HERE
β”‚   β”‚   β”œβ”€β”€ firestore.ts        # Firestore read/write/leaderboard
β”‚   β”‚   β”œβ”€β”€ achievements.ts     # Achievement definitions
β”‚   β”‚   β”œβ”€β”€ analytics.ts        # Streak, XP, session analytics
β”‚   β”‚   β”œβ”€β”€ leaderboard.ts      # Leaderboard generation
β”‚   β”‚   └── sounds.ts           # Web Audio ambient sound engine
β”‚   β”‚
β”‚   β”œβ”€β”€ types.ts                # All TypeScript interfaces
β”‚   β”œβ”€β”€ constants.ts            # Items, INITIAL_STATE, game config
β”‚   β”œβ”€β”€ App.tsx                 # Root app with routing
β”‚   β”œβ”€β”€ main.tsx                # React entry point
β”‚   └── index.css               # Global styles + design tokens
β”‚
β”œβ”€β”€ index.html
β”œβ”€β”€ vite.config.ts
β”œβ”€β”€ tsconfig.json
β”œβ”€β”€ electron-builder.yml        # Desktop build config
└── package.json

πŸ› οΈ Scripts

npm run dev              # Start Vite dev server (browser)
npm run dev:electron     # Start Vite + Electron together
npm run build            # Production web build
npm run build:electron   # Build + package desktop app (.exe / .dmg)
npm run lint             # TypeScript type check
npm run clean            # Remove build artifacts

🎨 Tech Stack

Layer Technology
UI Framework React 19 + TypeScript
Styling Tailwind CSS v4
Animations Motion (Framer Motion)
Icons Lucide React
Desktop Electron 33
Build Tool Vite 6
Auth Firebase Authentication (Google)
Database Cloud Firestore
Offline PWA + Service Worker
State React hooks + localStorage (with Firestore sync)
Audio Web Audio API (procedural ambient sounds)

πŸ—ΊοΈ Roadmap

  • Mobile app (React Native / Capacitor) sharing the same Firebase backend
  • Custom item catalog / marketplace
  • Collaborative forests (shared biomes with friends)
  • Biome themes (desert, arctic, ocean floor)
  • Widgets for iOS/Android home screen live timer
  • AI-powered focus coach suggestions

πŸ“„ License

MIT β€” see LICENSE for details.


Made with focus 🌿

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors