Find a file
danshtu ee6b77d09d
All checks were successful
Deploy to Firebase Hosting / deploy (push) Successful in 1m8s
Merge pull request 'Fix receipt scanner AI response parsing' (#11) from fix/receipt-scanner-parsing into master
Reviewed-on: #11
Reviewed-by: danshtu <mrdanilkos@gmail.com>
2026-03-01 10:46:07 -05:00
.forgejo added pnpm-lock, added eslint and lint workflow 2026-02-24 23:24:26 -05:00
dist Replace Claude API with Firebase AI Logic for receipt scanning 2026-02-14 21:48:32 -05:00
src Merge pull request 'Fix receipt scanner AI response parsing' (#11) from fix/receipt-scanner-parsing into master 2026-03-01 10:46:07 -05:00
.firebaserc initial commit 2026-02-12 22:53:00 -05:00
.gitignore initial commit 2026-02-12 22:53:00 -05:00
components.json added react project and components 2026-02-13 21:47:06 -05:00
eslint.config.js added pnpm-lock, added eslint and lint workflow 2026-02-24 23:24:26 -05:00
firebase.json firebase hosting deploy from dist folder 2026-02-13 22:02:20 -05:00
index.html initial commit 2026-02-12 22:53:00 -05:00
package.json Fix build errors after dependency cleanup 2026-02-24 04:59:21 +00:00
pnpm-lock.yaml added pnpm-lock, added eslint and lint workflow 2026-02-24 23:24:26 -05:00
postcss.config.js initial commit 2026-02-12 22:53:00 -05:00
README.md Add CI/CD workflow for automatic Firebase deployment 2026-02-20 23:10:10 +00:00
tailwind.config.js added react project and components 2026-02-13 21:47:06 -05:00
TODO.md added TODO.md 2026-02-14 22:12:56 -05:00
tsconfig.app.json initial commit 2026-02-12 22:53:00 -05:00
tsconfig.json initial commit 2026-02-12 22:53:00 -05:00
tsconfig.node.json added react project and components 2026-02-13 21:47:06 -05:00
vite.config.ts initial commit 2026-02-12 22:53:00 -05:00

Cafe Ledger

A non-profit coffee shop expense tracker built with React, TypeScript, and Firebase.

Prerequisites

Installation

Clone the repository and install dependencies:

git clone <repo-url>
cd cafe-ledger-hosting
pnpm install

Running locally

pnpm dev

The app will be available at http://localhost:5173.

Building for production

pnpm build

Output is written to the dist/ directory. You can preview the production build locally with:

pnpm preview

Firebase setup

The project connects to a Firebase backend (Firestore + Authentication). The Firebase config is hardcoded in src/lib/firebase.ts. To use your own Firebase project:

  1. Go to console.firebase.google.com and create a project.
  2. Enable Authentication → Email/Password sign-in.
  3. Create a Cloud Firestore database (start in test mode).
  4. Go to Project Settings → General, add a Web App, and copy the firebaseConfig object.
  5. Replace the config values in src/lib/firebase.ts:
const firebaseConfig = {
  apiKey: "...",
  authDomain: "...",
  projectId: "...",
  storageBucket: "...",
  messagingSenderId: "...",
  appId: "...",
};
rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /expenses/{doc} {
      allow read, write: if request.auth != null;
    }
  }
}

Deploying to Firebase Hosting

Automatic Deployment (CI/CD)

This repository is configured with Forgejo Actions to automatically deploy to Firebase Hosting when changes are merged to the master branch.

Setup: See .forgejo/SETUP.md for instructions on configuring the Firebase service account secret.

Workflow: The deployment happens automatically on every push to master. Monitor progress in the Actions tab.

Manual Deployment

You can also deploy manually using the Firebase CLI:

npm install -g firebase-tools
firebase login
pnpm build
firebase deploy --only hosting