Skip to content

wip workspace refactor + wip cli demo#868

Draft
gudnuf wants to merge 2 commits intomasterfrom
workspace-refactor
Draft

wip workspace refactor + wip cli demo#868
gudnuf wants to merge 2 commits intomasterfrom
workspace-refactor

Conversation

@gudnuf
Copy link
Contributor

@gudnuf gudnuf commented Feb 20, 2026

first commit is the refactor to a bun workspace, second commit is just an mvp cli that uses a supabase edge function to mint a JWT with no open secret.

I didn't review at all, this is just proof of concept

…iness logic

Restructure the codebase into a Bun workspace monorepo with @agicash/core
(portable business logic, no DOM dependencies) and the web app (React/browser
glue). Core enforces environment-agnosticism at compile time via tsconfig
with no DOM lib.

Key changes:
- Create packages/core/ with its own package.json, tsconfig (no DOM lib), biome config
- Move pure lib modules (money, cashu, bolt11, ecies, etc.) to core
- Move types, errors, DB types, feature entities to core
- Split mixed files: encryption, cryptography, cashu, spark have pure logic
  in core with React hooks/query wrappers remaining in web
- Move repositories and services to core, using Cache/KeyProvider interfaces
  instead of direct QueryClient/@opensecret/react dependencies
- Add runtime config (configure/getConfig) and injectable performance measurement
- Web app files become thin re-exports from @agicash/core for zero consumer
  import changes
- Fix generate-db-types pre-commit hook (add pass_filenames = false)
- Add biome format step to db:generate-types to prevent hook cycle
…oken receive

- Scaffold packages/cli with SeedKeyProvider (BIP32/BIP85), MapCache, and seed-auth
- CLI commands: `accounts` (list with balances) and `receive <token>` (claim cashu token)
- Copy seed-auth edge function from demo branch with Deno import maps
- Exclude supabase/functions from root tsconfig (Deno runtime)
- Format BTC balances as sats
@vercel
Copy link

vercel bot commented Feb 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agicash Ready Ready Preview, Comment Feb 20, 2026 7:20am

Request Review

@supabase
Copy link

supabase bot commented Feb 20, 2026

Updates to Preview Branch (workspace-refactor) ↗︎

Deployments Status Updated
Database Fri, 20 Feb 2026 07:21:00 UTC
Services Fri, 20 Feb 2026 07:21:00 UTC
APIs Fri, 20 Feb 2026 07:21:00 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations ⚠️ Fri, 20 Feb 2026 07:24:18 UTC
Migrations Fri, 20 Feb 2026 07:24:21 UTC
Seeding Fri, 20 Feb 2026 07:24:21 UTC
Edge Functions ⚠️ Fri, 20 Feb 2026 07:24:21 UTC

⚠️ Warning — Service health check failed
⚠️ Warning — Only Functions declared in config.toml will be automatically deployed to branches: [functions.my-slug]


View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

@gudnuf gudnuf marked this pull request as draft February 26, 2026 18:20
@gudnuf gudnuf marked this pull request as draft February 26, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant