Skip to content

etchad2-hub/MinutesForMoney

Repository files navigation

Minutes for Money

A React + Vite single-page app that shows how many hours you need to work to afford something. Authentication and data live on Firebase (Auth + Firestore).

Features

  • Email/password signup & login (Firebase Auth)
  • Onboarding to collect country, income period/value, days/week, hours/day
  • Hourly rate calculation (monthly-hours = days × hours × 4.33)
  • Time-to-earn calculator with progress bar
  • Optional history of calculations stored per user in Firestore
  • Tailwind CSS styling

Tech stack

  • Frontend: React, Vite, React Router, Tailwind CSS
  • Backend: Firebase Authentication, Firebase Firestore
  • Hosting: Firebase Hosting (SPA rewrite to index.html)

Environment variables

Create .env.local (for local dev) and .env.production (for deploy builds) with your Firebase web config:

VITE_FIREBASE_API_KEY=...
VITE_FIREBASE_AUTH_DOMAIN=...
VITE_FIREBASE_PROJECT_ID=...
VITE_FIREBASE_STORAGE_BUCKET=...
VITE_FIREBASE_MESSAGING_SENDER_ID=...
VITE_FIREBASE_APP_ID=...
VITE_FIREBASE_MEASUREMENT_ID=...   # optional

Firestore rules (example)

Allow each signed-in user to read/write only their own data:

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;
    }
  }
}

Scripts

  • npm run dev — start Vite dev server
  • npm run build — production build to dist
  • npm run preview — preview the build locally

Firebase Hosting (summary)

Hosting config lives in firebase.json and .firebaserc. After you’ve logged in with the Firebase CLI:

npm run build
firebase deploy --only hosting

Notes

  • Ensure your env vars are present at build time; the deployed bundle cannot read .env.local.
  • Add your hosting domains to Firebase Auth “Authorized domains”.

About

Minutes for Money is a simple full-stack app that helps you understand the real cost of purchases. Users sign up, enter their income and working hours, and the app instantly converts any item’s price into how long you need to work to afford it - shown in hours and minutes. Built with React and Firebase (Auth + Firestore).

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors