A Tamagotchi-style virtual companion powered by your daily GitHub activity! Keep your pet happy, fed, and leveling up by committing code, opening pull requests, and maintaining your streaks.
- Activity-Powered Pet: Your pet's mood, XP, and health react dynamically to your GitHub commits and coding habits.
- XP & Levels: Earn experience points for contributions and watch your pet evolve.
- Mood & Streaks: Track your daily coding streaks and keep your pet happy.
- Chrome Extension UI: Clean browser popup with live stats, cute animations, and status indicators.
- Local SQLite Backend: Fast and lightweight local data storage for offline state and caching.
github-pet/
├── backend/ # Node.js + Express API server & SQLite database
│ ├── database.js # SQLite schema & queries
│ ├── github.js # GitHub API integration & OAuth flow
│ ├── mood.js # Pet mood calculation logic
│ ├── streak.js # Streak tracking algorithms
│ ├── xp.js # XP calculation & level progression
│ └── server.js # Express server & API routes
├── extension/ # Chrome Extension (Manifest V3)
│ ├── images/ # Pet SVGs and mood illustrations
│ ├── manifest.json # Extension configuration
│ ├── popup.html # Extension popup interface
│ ├── popup.css # Styling & animations
│ └── popup.js # Frontend interaction & API client
└── preview.html # Standalone preview of pet moods & SVGs
- Node.js (v16+ recommended)
- A Chromium-based browser (Google Chrome, Brave, Edge, Arc)
-
Navigate to the backend directory:
cd backend -
Install dependencies:
npm install
-
Configure environment variables:
- Copy
.env.exampleto.env:cp .env.example .env
- Register a new GitHub OAuth App at GitHub Developer Settings:
- Application name:
GitHub Pet - Homepage URL:
http://localhost:3000 - Authorization callback URL:
http://localhost:3000/auth/github/callback
- Application name:
- Fill in your
GITHUB_CLIENT_IDandGITHUB_CLIENT_SECRETin.env.
- Copy
-
Start the backend server:
npm start
The backend server will run at
http://localhost:3000.
- Open your browser and navigate to
chrome://extensions/(oredge://extensions/). - Toggle on Developer mode in the top-right corner.
- Click Load unpacked.
- Select the
extensionfolder inside this repository (github-pet/extension). - Pin the GitHub Pet extension to your browser toolbar!
To preview all pet mood graphics and animations without running the backend:
- Open
preview.htmldirectly in any web browser.
| Action | Effect on Pet |
|---|---|
| Daily Commits | Boosts pet mood and maintains your streak |
| Pull Requests / Reviews | Grants bonus XP and speeds up leveling |
| Inactivity / Missed Days | Pet gets sleepy or grumpy |