On fume pas, on shish. — Track who pays the next round.
Hookah Tracker is a private web app to track hookah rounds between friends — log who pays, how much, and let the app handle the rest.
- ➕ Log a round — payer's name, optional amount, note, automatic timestamp
- 🎰 Random picker — enter tonight's participants and draw who pays next
- 🏆 Leaderboard — who paid the most in count and in CHF
- 📜 History — all rounds, from most recent to oldest
- 📊 Dashboard — total spent, number of rounds, average per round
- 🔒 Protected access — Firebase Authentication (email/password or Google)
- 👥 Registration control — open or close sign-ups without touching the code
- Node.js v18+
- A Firebase project with Authentication and Realtime Database enabled
git clone https://github.com/vicmtn/hookah-tracker.git
cd hookah-tracker
npm installCreate a .env file at the root:
VITE_FIREBASE_API_KEY=
VITE_FIREBASE_AUTH_DOMAIN=
VITE_FIREBASE_DATABASE_URL=
VITE_FIREBASE_PROJECT_ID=
VITE_FIREBASE_STORAGE_BUCKET=
VITE_FIREBASE_MESSAGING_SENDER_ID=
VITE_FIREBASE_APP_ID=
npm run dev # dev server (localhost:5173)
npm run build # production build → dist/
npm run deploy # build + deploy to Firebase Hosting- Enable Authentication → Sign-in method → Email/Password and Google
- Add your domain in Authentication → Settings → Authorized domains
- Create member accounts in Authentication → Users → Add user
- Apply the Realtime Database rules below
{
"rules": {
"registrations_open": {
".read": true,
".write": false
},
"sessions": {
".read": "auth != null",
".write": "auth != null"
}
}
}hookah-tracker/
├── index.html
├── vite.config.js
├── .env
└── src/
├── lib/
│ ├── firebase.js
│ ├── auth.js
│ └── registrations.js
├── hooks/
│ ├── useAuth.js
│ ├── useSessions.js
│ └── useToast.js
├── pages/
│ ├── LoginPage.vue
│ └── DashboardPage.vue
├── components/
│ ├── AppHeader.vue
│ ├── StatsRow.vue
│ ├── StreakBanner.vue
│ ├── AddSessionForm.vue
│ ├── RandomPicker.vue
│ ├── AppLeaderboard.vue
│ ├── HistoryList.vue
│ └── ui/
│ ├── AppToast.vue
│ └── DeleteModal.vue
└── styles/
└── style.css
Access is restricted to invited members. Two sign-in methods available:
- Email/password — account manually created by the admin in the Firebase console
- Google — one-click sign-in with an existing Google account
Sign-ups can be opened or closed without modifying any code. In Firebase Console → Realtime Database, edit the value:
{ "registrations_open": true }true→ the registration form is accessiblefalse→ only existing members can sign in
- Real authentication system
- Controllable sign-ups without code changes
- We'll see...
- Migration to Vue 3 + Vite
- Replaced shared password auth with Firebase Authentication
- Email/password and Google sign-in
- Registration control via Realtime Database flag
- Database secured with
auth != nullrules - Deployment migrated to Firebase Hosting
- Initial release — vanilla HTML/CSS/JS
- SHA-256 hardcoded password auth
- Firebase Realtime Database
- Hosted on GitHub Pages
Made with 💜 by VicMtn