{"id":50881330,"url":"https://github.com/jcampuza/expenses-app","last_synced_at":"2026-06-15T13:02:05.023Z","repository":{"id":308057024,"uuid":"929996961","full_name":"jcampuza/expenses-app","owner":"jcampuza","description":"Expenses App - mostly for myself but feel free to take a look.","archived":false,"fork":false,"pushed_at":"2026-03-22T21:02:05.000Z","size":1339,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-23T10:46:26.236Z","etag":null,"topics":["expenses","react","tanstack-react-query","tanstack-start","trpc"],"latest_commit_sha":null,"homepage":"https://expensemate.fyi","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcampuza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-02-09T21:36:48.000Z","updated_at":"2026-03-22T21:02:09.000Z","dependencies_parsed_at":"2025-08-03T22:29:20.225Z","dependency_job_id":"e65114b7-6e0a-490d-85cd-7382250462b5","html_url":"https://github.com/jcampuza/expenses-app","commit_stats":null,"previous_names":["jcampuza/expenses-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jcampuza/expenses-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcampuza%2Fexpenses-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcampuza%2Fexpenses-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcampuza%2Fexpenses-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcampuza%2Fexpenses-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcampuza","download_url":"https://codeload.github.com/jcampuza/expenses-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcampuza%2Fexpenses-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34363557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expenses","react","tanstack-react-query","tanstack-start","trpc"],"created_at":"2026-06-15T13:02:04.887Z","updated_at":"2026-06-15T13:02:05.007Z","avatar_url":"https://github.com/jcampuza.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ExpenseMate\n\nExpenseMate is a Vite + TanStack Router single-page app that uses Clerk for authentication and Convex for backend data and realtime updates.\n\n## Requirements\n\n- Bun\n- A Clerk application\n- A Convex deployment\n- A Cloudflare account for production hosting\n\n## Commands\n\n```bash\nbun install\nbun run dev          # web + convex together\nbun run dev:web      # Vite app only\nbun run dev:convex   # Convex functions only\nbun run lint\nbun run typecheck\nbun run check        # lint + typecheck + format check\nbun run format:check\nbun run format:write\nbun run test\nbun run build\nbun run build:staging\nbun run start\nbun run cf:preview\nbun run cf:preview:staging\nbun run cf:deploy\nbun run cf:deploy:staging\n```\n\n## Environment Variables\n\nCopy `.env.example` to `.env.local` for local development and provide the required values.\n\n### Frontend build-time variables\n\nThese values are embedded into the Vite build and must be present anywhere you run `bun run build`.\n\n```bash\nVITE_CLERK_PUBLISHABLE_KEY=\nVITE_CLERK_FRONTEND_API_URL=\nVITE_CONVEX_URL=\n```\n\n### Other variables\n\nThese are not part of the Cloudflare static frontend deployment, but may still be used by other local workflows.\n\n```bash\nCLERK_SECRET_KEY=\nCONVEX_DEPLOY_KEY=\nCONVEX_DEPLOYMENT=\n```\n\n## Build Modes\n\nThis repo uses Vite env modes for frontend deployment targets:\n\n- `bun run build` uses production values from `.env.production`\n- `bun run build:staging` uses staging values from `.env.staging`\n\nCloudflare Wrangler environments are configured to mirror those targets, but the deployed frontend values still come from the Vite build step.\n\n## Local Development\n\nInstall dependencies:\n\n```bash\nbun install\n```\n\nRun the app and Convex together:\n\n```bash\nbun run dev\n```\n\nRun only the frontend:\n\n```bash\nbun run dev:web\n```\n\nRun only Convex:\n\n```bash\nbun run dev:convex\n```\n\n## Production Build\n\nCreate the production frontend bundle:\n\n```bash\nbun run build\n```\n\nPreview the Vite production build locally:\n\n```bash\nbun run start\n```\n\n## Cloudflare Workers Static Assets\n\nThis app deploys to Cloudflare as a static SPA. Clerk and Convex remain external services.\n\nThe Cloudflare config lives in `wrangler.jsonc` and is set up to:\n\n- serve assets from `dist/`\n- return `index.html` for unknown navigation routes\n- support direct loads of TanStack Router routes like `/dashboard`\n- define separate production and staging Wrangler environments\n- expose non-secret runtime metadata via Wrangler `vars`\n\n### First-time setup\n\nAuthenticate Wrangler:\n\n```bash\nbunx wrangler login\n```\n\nVerify the active account if needed:\n\n```bash\nbunx wrangler whoami\n```\n\n### Preview the Cloudflare deployment locally\n\nProduction preview:\n\n```bash\nbun run cf:preview\n```\n\nStaging preview:\n\n```bash\nbun run cf:preview:staging\n```\n\n### Deploy to Cloudflare\n\nProduction deploy:\n\n```bash\nbun run cf:deploy\n```\n\nStaging deploy:\n\n```bash\nbun run cf:deploy:staging\n```\n\nStart by validating the app on the generated `workers.dev` hostname before attaching a production custom domain.\n\n### Wrangler environments\n\n`wrangler.jsonc` defines:\n\n- the default environment for production\n- a `staging` environment override under `env.staging`\n- non-secret `vars` for deployment metadata and public frontend values\n\nDo not store secrets like `CLERK_SECRET_KEY` in Wrangler `vars`. Use Cloudflare secrets only if you later add a Worker script that actually needs them.\n\n### GitHub Actions deployment\n\n`.github/workflows/deploy-worker.yml` deploys:\n\n- `main` pushes to the default production Worker\n- all other branch pushes to the `staging` Wrangler environment\n- manual runs to either target via `workflow_dispatch`\n\nConfigure these GitHub environment secrets in both `staging` and `production`:\n\n- `CLOUDFLARE_ACCOUNT_ID`\n- `CLOUDFLARE_API_TOKEN`\n\nConfigure these GitHub environment variables in both `staging` and `production`:\n\n- `VITE_CLERK_FRONTEND_API_URL`\n- `VITE_CLERK_PUBLISHABLE_KEY`\n- `VITE_CONVEX_URL`\n\nThe workflow selects the GitHub Environment automatically:\n\n- `main` uses the `production` environment\n- other branches use the `staging` environment\n- manual runs use the environment chosen in `workflow_dispatch`\n\n## Production Cutover Checklist\n\nBefore switching traffic to Cloudflare, verify:\n\n- `VITE_CLERK_PUBLISHABLE_KEY` points to the correct Clerk application\n- `VITE_CLERK_FRONTEND_API_URL` points to the correct Clerk frontend API/domain\n- `VITE_CONVEX_URL` points to the correct Convex production deployment\n- Clerk allows the Cloudflare hostname and final custom domain\n- Clerk sign-in and redirect URLs include the deployed frontend origin\n- direct loads of `/`, `/dashboard`, `/dashboard/connection/:connectionId`, and `/settings` work\n- Convex queries, mutations, and realtime updates work from the deployed origin\n\n## Notes\n\n- This repository is a client-rendered TanStack Router app, not a TanStack Start app.\n- Cloudflare Workers are only being used for static asset hosting and SPA fallback in this phase.\n- No backend migration off Convex is included in this setup.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcampuza%2Fexpenses-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcampuza%2Fexpenses-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcampuza%2Fexpenses-app/lists"}