---
id: w5/m1/t002
title: Strip beancount domain features, GraphQL ops, and docs
worker: worker5
status: done
estimate: 45m
depends_on: [w5/m1/t001]
---

## Objective

Delete beancount's domain-specific code from the freshly copied `dashboard/`, leaving only the generic app shell (routing, layout, providers, Apollo wiring, UI kit) that any dashboard would need.

## Context

- `dashboard/src/features/` holds beancount's domain modules — remove the whole directory: `ai-agent`, `auth`, `bql`, `collaboration`, `git`, `importer`, `journal`, `ledger-data`, `ledger-editor`, `ledger-list`, `oauth`, `plaid`, `receipt`, `reports`, `user-profile`, `user-settings`.
- `dashboard/src/graphql/{query,mutation}` are beancount's generated **operations** (queries/mutations shaped for beancount's own backend) — remove; `dashboard/api-gateway.graphql` is beancount's introspected **schema SDL** — remove too, it doesn't match `bex-api`'s GraphQL shape (`docs/ADR006-bex-api.md`: `services`, `server(id)`, `suspendService`, `database`, …) at all.
- **Keep the GraphQL plumbing, not just the ops**: `src/common/apollo` (Apollo Client setup), the `@apollo/client` dependency, and the `graphql-codegen` tooling (`codegen.ts`, the `codegen` script) stay — this dashboard is meant to become a client of `bex-api`'s `/graphql` (that adapter was built "Render dashboard compatible" specifically to drive a dashboard like this one), so the wiring mechanism is reused, not thrown away. Point `codegen.ts`'s schema source at a placeholder/TODO comment referencing `bex-api`'s `/graphql` endpoint instead of the deleted `api-gateway.graphql` — actually introspecting/codegen against a live `bex-api` is out of scope for this milestone (no real queries added until a future milestone wires one in).
- `dashboard/src/routes/` and `dashboard/src/common/root-route/` likely import from `features/` and `graphql/` — after deleting, sweep for now-dangling imports (route tree, providers, nav/menu items referencing removed features).
- `dashboard/docs/` and `dashboard/CLAUDE.md` document beancount's domain (ledger, journal, importer, etc.) — remove or gut docs that only make sense for beancount; keep anything describing the generic app shell/build tooling if worth keeping (judgment call, err toward deleting and let t003 rewrite from scratch).
- `dashboard/src/i18n/locales` likely has translation keys tied to removed features — prune dangling keys if the sweep in t005 flags them (don't over-invest here if `i18n` itself is dropped instead — decide based on whether the shell needs i18n at all for "almost empty").
- Leave `dashboard/src/common/` (apollo, components, hooks, lib, providers, root-route, server-fn, types) and `dashboard/src/routes` skeleton intact except for dangling references to deleted code.

## Steps

1. `rm -rf dashboard/src/features dashboard/src/graphql dashboard/api-gateway.graphql`
2. Grep for now-broken imports: `grep -rl "features/\|graphql/query\|graphql/mutation" dashboard/src` and fix/remove each reference (route definitions, nav components, provider wiring, `codegen.ts`).
3. Remove/trim `dashboard/docs/` content and `dashboard/CLAUDE.md` sections that only describe removed beancount features.
4. Run `grep -ril beancount dashboard --exclude-dir=node_modules` and address every remaining hit except this task's own commit history (should approach zero — full sweep finishes in t003/t005).

## Files

- `dashboard/src/features/*` (delete)
- `dashboard/src/graphql/*`, `dashboard/api-gateway.graphql` (delete)
- `dashboard/src/routes/`, `dashboard/src/common/root-route/`, `dashboard/codegen.ts` (fix dangling references)
- `dashboard/docs/`, `dashboard/CLAUDE.md` (trim)

## Acceptance criteria

- [ ] `dashboard/src/features/` and `dashboard/src/graphql/` no longer exist.
- [ ] No file in `dashboard/src` imports from a deleted path (`grep -rl "features/\|graphql/query\|graphql/mutation" dashboard/src` empty).
- [ ] `dashboard/docs/` and `dashboard/CLAUDE.md` no longer describe beancount-specific domain features.
- [ ] `@apollo/client` dependency and `src/common/apollo` Apollo Client setup are still present (not deleted); `codegen.ts` still exists with its schema source repointed to a placeholder/TODO for `bex-api`'s `/graphql`, not `api-gateway.graphql`.

## Out of scope

- Rebranding names/titles (t003), adding sample content (t004), full build verification (t005).
