{"id":50886503,"url":"https://github.com/ski043/financial-hub-cursor","last_synced_at":"2026-06-15T17:32:17.620Z","repository":{"id":362129997,"uuid":"1257496441","full_name":"ski043/financial-hub-cursor","owner":"ski043","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-02T19:29:53.000Z","size":1118,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-02T21:14:36.089Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ski043.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":"2026-06-02T18:27:29.000Z","updated_at":"2026-06-02T19:29:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ski043/financial-hub-cursor","commit_stats":null,"previous_names":["ski043/financial-hub-cursor"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ski043/financial-hub-cursor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ski043%2Ffinancial-hub-cursor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ski043%2Ffinancial-hub-cursor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ski043%2Ffinancial-hub-cursor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ski043%2Ffinancial-hub-cursor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ski043","download_url":"https://codeload.github.com/ski043/financial-hub-cursor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ski043%2Ffinancial-hub-cursor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34374146,"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":[],"created_at":"2026-06-15T17:32:16.201Z","updated_at":"2026-06-15T17:32:17.609Z","avatar_url":"https://github.com/ski043.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Finance Hub\n\nYour complete financial life in one dashboard — net worth, cash flow, spending, subscriptions, assets, and debts. See [PRD.md](PRD.md) for the product spec and [CONTEXT.md](CONTEXT.md) for the domain language.\n\n## Stack\n\n- **Next.js 16** (App Router, TypeScript) — note: Middleware is now `proxy.ts`.\n- **Prisma 7 + PostgreSQL** with the `@prisma/adapter-pg` driver adapter. Config lives in [prisma.config.ts](prisma.config.ts); the client is generated to `generated/`.\n- **Better Auth** (email + password) — config in [lib/auth.ts](lib/auth.ts).\n- **Tailwind + shadcn/ui** (base-nova style, `@base-ui/react`).\n\n## Getting started\n\n### 1. Install dependencies\n\n```bash\nnpm install\n```\n\n`postinstall` runs `prisma generate` automatically.\n\n### 2. Configure environment\n\nCopy the example and fill in your values:\n\n```bash\ncp .env.example .env\n```\n\n- `DATABASE_URL` — your Postgres connection string.\n- `BETTER_AUTH_SECRET` — generate one with `openssl rand -base64 32`.\n- `BETTER_AUTH_URL` — `http://localhost:3000` for local dev.\n\n### 3. Migrate the database\n\n```bash\nnpm run db:migrate\n```\n\n### 4. Seed the demo user\n\n```bash\nnpm run db:seed\n```\n\nCreates `demo@financehub.app` / `demo-password-123`.\n\n### 5. Run the dev server\n\n```bash\nnpm run dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000). Sign in with the demo user or create a new account at `/signup`.\n\n## Auth architecture\n\n- **Schema**: generated by the Better Auth CLI (`npm run auth:generate`). It produces `User` (extended with `baseCurrency`, `expectedMonthlyIncomeCents`, `savingsTargetCents`), `Session`, `AuthAccount`, and `Verification`. Better Auth's credential table is mapped to `AuthAccount` so the domain `Account` (cash) stays free per [CONTEXT.md](CONTEXT.md).\n- **Route handler**: `app/api/auth/[...all]/route.ts` via `toNextJsHandler`.\n- **Route protection**: [proxy.ts](proxy.ts) does an optimistic session-cookie check (redirects `/dashboard` → `/login` and away from auth pages when signed in). The authoritative check is `requireSession()` in [lib/auth-guard.ts](lib/auth-guard.ts), used by Server Components.\n\n## Useful scripts\n\n| Script | Description |\n|--------|-------------|\n| `npm run dev` | Start the dev server |\n| `npm run db:migrate` | Create/apply a Prisma migration |\n| `npm run db:generate` | Regenerate the Prisma client |\n| `npm run db:seed` | Seed the demo user |\n| `npm run auth:generate` | Regenerate auth models from the Better Auth config |\n| `npm run lint` | Run ESLint |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fski043%2Ffinancial-hub-cursor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fski043%2Ffinancial-hub-cursor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fski043%2Ffinancial-hub-cursor/lists"}