mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 05:57:09 +01:00
STRIPE_SECRET_KEY and the seven other STRIPE_* vars appear zero times outside
src/ and zero times in .env.example, so isStripeReady() could only ever return
false. Three API routes, a checkout route, a tier grid and a "Manage
subscription" button were all gated on it and permanently unreachable.
Confirmed empty in production before touching the schema:
select count(*) filter (where stripe_customer_id is not null),
count(*) filter (where stripe_subscription_id is not null),
count(*) from users;
→ 0 | 0 | 7
So this removes no data and, more to the point, changes nothing a user sees:
every code path already fell through to the branch below it.
WHAT STAYS. Plans are real and untouched. They are granted through the
OrangeCat/Bitcoin rail (/api/orangecat/entitlement -> recordOcBillingGrant),
with the expiry cron reverting a lapsed pass to free. The pricing CTA cascade
loses only its unreachable middle step: free -> TBA -> [stripe] -> BTC ->
start-free.
WHAT WAS ACTIVELY WRONG. Because isStripeReady() was false, the one part of
Billing that DID render was a notice telling the reader to "add
STRIPE_SECRET_KEY and price IDs" — an environment variable shown to a person
who does not deploy the app and could not act on it. That is the same mistake
NotificationsPill's comment already calls out. Billing now states the plan and
links to /pricing.
Removed: lib/stripe.ts, api/stripe/{checkout,portal,webhook}, api/checkout/
[plan], getUserByStripeCustomerId, two user columns (migration 0063), two
entries from the user-client-view redaction lists, the api/stripe/webhook entry
in proxy.ts's public matcher, the stripe npm dependency, and the smoke/auth
probes for routes that no longer exist.
BillingSettings drops "use client" — with the handlers gone it holds no state,
no effect and no search-param read.
Two mentions deliberately KEPT because they are not the rail: the placeholder
prose describing what a user might build ("Simple dashboard, automated
reminders, Stripe payments…") and the demo project's stack string.
pnpm run verify green. 28 files, 519 deletions.
Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
169 lines
8.4 KiB
JSON
169 lines
8.4 KiB
JSON
{
|
|
"name": "fleetcrown",
|
|
"version": "0.1.0",
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"prebuild": "npx tsx scripts/generate-bash-state-vocab.ts && pnpm run build:widget",
|
|
"build:widget": "esbuild widget/main.ts --bundle --minify --format=iife --outfile=public/widget.js --log-level=warning",
|
|
"build": "next build",
|
|
"postbuild": "bash scripts/record-build-ref.sh && bash scripts/deploy-local.sh",
|
|
"start": "next start",
|
|
"install-app": "bash scripts/install-fleetcrown-app.sh",
|
|
"db:push": "drizzle-kit push",
|
|
"db:generate": "drizzle-kit generate",
|
|
"check:schema": "npx tsx scripts/check-schema-drift.ts",
|
|
"lint": "eslint --cache --cache-location node_modules/.cache/eslint src/ home/ widget/",
|
|
"check:design": "bash scripts/check-design-system.sh",
|
|
"check:desktop": "bash scripts/check-desktop.sh",
|
|
"verify": "pnpm run format:check && pnpm run check:deploy-ready && pnpm run check:telegram-registry && tsc --noEmit && pnpm run lint && pnpm run check:design && pnpm run check:desktop && pnpm run test:unit && pnpm run test:home && pnpm run test:deploy-ref-gate && pnpm run test:not-behind-gate && pnpm run test:deploy-ready-gate && pnpm run test:ops",
|
|
"check:telegram-registry": "bash scripts/ci/check-telegram-registry.sh",
|
|
"smoke": "bash scripts/smoke.sh",
|
|
"test:home": "bash scripts/test-home.sh",
|
|
"test:ops": "bash scripts/hetzner/test-host-alerts.sh && bash scripts/hetzner/test-disk-gc.sh && bash scripts/hetzner/test-agent-work-watch.sh && bash scripts/hetzner/test-cron-runner.sh && bash scripts/hetzner/test-ci-gate.sh && bash scripts/hetzner/test-apply-schema.sh && bash scripts/hetzner/test-uptime-sweep.sh",
|
|
"test:executor": "npx tsx scripts/test/executor.ts",
|
|
"test:sandbox-executor": "npx tsx scripts/test/sandbox-executor.ts",
|
|
"test:control-presenter": "npx tsx scripts/test/control-presenter.ts",
|
|
"test:agent-resolution": "npx tsx scripts/test/agent-resolution.ts",
|
|
"test:auto-reroute": "npx tsx scripts/test/auto-reroute.ts",
|
|
"test:dod-gate": "npx tsx scripts/test/dod-gate.ts",
|
|
"test:project-session": "npx tsx scripts/test/project-session.ts",
|
|
"test:autopilot-defaults": "npx tsx scripts/test/autopilot-defaults.ts",
|
|
"test:fleet-kick": "npx tsx scripts/test/fleet-kick.ts",
|
|
"test:push-notifications": "npx tsx scripts/test/push-notifications.ts",
|
|
"test:onboarding": "npx tsx scripts/test/onboarding.ts",
|
|
"test:onboarding-heal": "npx tsx scripts/test/onboarding-heal.ts",
|
|
"test:db-url": "npx tsx scripts/test/db-url.ts",
|
|
"test:brand-sync": "npx tsx scripts/test/brand-sync.ts",
|
|
"test:orchestration-summary": "npx tsx scripts/test/orchestration-summary.ts",
|
|
"test:dispatch-gates": "npx tsx scripts/test/dispatch-gates.ts",
|
|
"test:notify-close": "npx tsx scripts/test/notify-close.ts",
|
|
"test:fact-budget": "npx tsx scripts/test/fact-budget.ts",
|
|
"test:fair-share": "npx tsx scripts/test/fair-share.ts",
|
|
"test:ai-budget-gate": "npx tsx scripts/test/ai-budget-gate.ts",
|
|
"test:deploy-ref-gate": "bash scripts/test/deploy-ref-gate.sh",
|
|
"test:not-behind-gate": "bash scripts/test/not-behind-gate.sh",
|
|
"test:approval-cues": "npx tsx scripts/test/approval-cues.ts",
|
|
"test:groq-error": "npx tsx scripts/test/groq-error.ts",
|
|
"test:chat-chain": "npx tsx scripts/test/chat-chain.ts",
|
|
"test:ai-health": "npx tsx scripts/test/ai-health.ts",
|
|
"test:health-route": "npx tsx scripts/test/health-route.ts",
|
|
"test:answering-prompt": "npx tsx scripts/test/answering-prompt.ts",
|
|
"test:prompt-history": "npx tsx scripts/test/prompt-history.ts",
|
|
"test:desktop-command-validator": "npx tsx scripts/test/desktop-command-validator.ts",
|
|
"test:tab-match": "npx tsx scripts/test/tab-match.ts",
|
|
"test:agent-comms": "npx tsx scripts/test/agent-comms.ts",
|
|
"test:unit": "npx tsx scripts/test-unit.ts",
|
|
"test:ai-forms": "tsx scripts/verify-ai-forms.ts",
|
|
"test:activity-ssot": "node scripts/activity-ssot-check.mjs",
|
|
"dogfood:loki": "node scripts/loki-dogfood.mjs",
|
|
"dogfood:loki:ci": "FLEETCROWN_SESSION_TOKEN=$(npx tsx scripts/test/print-session-token.ts) HEADLESS=1 node scripts/loki-dogfood.mjs",
|
|
"dogfood:ui-flows:ci": "FLEETCROWN_SESSION_TOKEN=$(npx tsx scripts/test/print-session-token.ts) HEADLESS=1 node scripts/ui-flow-dogfood.mjs",
|
|
"dogfood:machine:ci": "FLEETCROWN_SESSION_TOKEN=$(npx tsx scripts/test/print-session-token.ts) HEADLESS=1 node scripts/machine-dogfood.mjs",
|
|
"dogfood:self": "node scripts/fleetcrown-self-dogfood.mjs",
|
|
"test:dispatch-status": "npx tsx scripts/test/dispatch-status.ts",
|
|
"test:fleet-context": "npx tsx scripts/test/fleet-context.ts",
|
|
"test:execution-access": "npx tsx scripts/test/execution-access.ts",
|
|
"test:workspace-access": "npx tsx scripts/test/workspace-access.ts",
|
|
"test:authenticated-smoke": "npx tsx scripts/test/authenticated-smoke.ts",
|
|
"test:pre-push-prod-dogfood": "bash scripts/test/pre-push-prod-dogfood.sh",
|
|
"test:loop-ssot": "npx tsx scripts/test/loop-ssot.ts",
|
|
"test:auth-a11y": "npx tsx scripts/test/auth-a11y.ts",
|
|
"test:loki-prefetch": "npx tsx scripts/test/loki-prefetch.ts",
|
|
"test:digest": "npx tsx scripts/test/digest.ts",
|
|
"test:auth": "npx tsx scripts/test/auth.ts",
|
|
"test:orangecat-integration": "npx tsx scripts/test/orangecat-integration.ts",
|
|
"test:orangecat-entitlement-e2e": "npx tsx scripts/test/orangecat-entitlement-e2e.ts",
|
|
"generate:brand": "npx tsx scripts/generate-brand.mjs",
|
|
"generate:agent-prompts": "npx tsx scripts/generate-agent-prompts.ts",
|
|
"ingest:history": "npx tsx scripts/ingest-claude-code-history.ts",
|
|
"desktop:dev": "cd desktop && pnpm run dev",
|
|
"desktop:build": "cd desktop && pnpm run build",
|
|
"desktop:preview": "cd desktop && pnpm run preview",
|
|
"db:dump": "bash scripts/db/dump.sh",
|
|
"db:restore": "bash scripts/db/restore.sh",
|
|
"db:apply-box": "bash scripts/db/apply-box.sh",
|
|
"deploy": "bash scripts/deploy-hetzner.sh",
|
|
"deploy:status": "bash scripts/deploy-status.sh",
|
|
"doctor": "bash scripts/doctor.sh",
|
|
"git:prune": "bash scripts/git/prune-merged.sh",
|
|
"ship": "git push origin main",
|
|
"prepare": "husky",
|
|
"probe:models": "tsx scripts/probe-models.ts",
|
|
"check:models": "tsx scripts/check-model-ids.ts",
|
|
"check:telemetry": "tsx scripts/check-telemetry.ts",
|
|
"audit:responsive": "node scripts/test/responsive-audit.mjs",
|
|
"audit:mobile": "node scripts/test/mobile-interaction-audit.mjs",
|
|
"audit:contrast": "node scripts/test/contrast-audit.mjs",
|
|
"check:deploy-ready": "bash scripts/ci/check-deploy-ready.sh",
|
|
"test:deploy-ready-gate": "bash scripts/test/deploy-ready-gate.sh",
|
|
"format": "prettier --write .",
|
|
"format:check": "prettier --check ."
|
|
},
|
|
"dependencies": {
|
|
"@auth/core": "0.41.3",
|
|
"@auth/drizzle-adapter": "^1.11.3",
|
|
"@bitbaum/ai-kit": "^0.6.2",
|
|
"@bitbaum/mail-kit": "^0.1.0",
|
|
"@dnd-kit/core": "^6.3.1",
|
|
"@dnd-kit/sortable": "^10.0.0",
|
|
"@dnd-kit/utilities": "^3.2.2",
|
|
"@fleet/ai-forms": "npm:ai-forms@^0.1.2",
|
|
"@noble/hashes": "^2.4.0",
|
|
"@noble/secp256k1": "^3.1.0",
|
|
"@orangecat/sdk": "file:vendor/orangecat-sdk-0.2.0.tgz",
|
|
"@sentry/nextjs": "^10.72.0",
|
|
"@types/ws": "^8.18.1",
|
|
"@xterm/addon-fit": "^0.11.0",
|
|
"@xterm/addon-web-links": "^0.12.0",
|
|
"@xterm/xterm": "^6.0.0",
|
|
"bip-kit": "^0.1.0",
|
|
"bs58check": "^4.0.0",
|
|
"clsx": "^2.1.1",
|
|
"date-fns": "^4.4.0",
|
|
"drizzle-orm": "^0.45.2",
|
|
"geist": "^1.7.2",
|
|
"limitkit": "^0.2.0",
|
|
"lucide-react": "^1.35.0",
|
|
"mermaid": "^11.17.2",
|
|
"next": "16.3.3",
|
|
"next-auth": "^5.0.0-beta.32",
|
|
"next-themes": "^0.4.6",
|
|
"node-pty": "^1.1.0",
|
|
"postgres": "^3.4.9",
|
|
"react": "19.2.8",
|
|
"react-dom": "19.2.8",
|
|
"shadcn": "^4.19.0",
|
|
"tailwind-merge": "^3.6.0",
|
|
"tw-animate-css": "^1.4.0",
|
|
"web-push": "^3.6.7",
|
|
"ws": "^8.21.3",
|
|
"zod": "^4.5.1"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/postcss": "^4",
|
|
"@types/better-sqlite3": "^9.6.0",
|
|
"@types/node": "^26",
|
|
"@types/react": "^19",
|
|
"@types/react-dom": "^19",
|
|
"@types/web-push": "^3.6.4",
|
|
"better-sqlite3": "^13.0.3",
|
|
"dotenv": "^17.4.2",
|
|
"drizzle-kit": "^0.31.10",
|
|
"esbuild": "^0.28.2",
|
|
"eslint": "^10",
|
|
"eslint-config-next": "16.3.3",
|
|
"husky": "^9.1.7",
|
|
"playwright": "^1.62.1",
|
|
"prettier": "3.9.6",
|
|
"sharp": "^0.35.4",
|
|
"tailwindcss": "^4",
|
|
"tsx": "^4.23.12",
|
|
"typescript": "^6.0.3"
|
|
},
|
|
"packageManager": "pnpm@11.25.0"
|
|
}
|