How theprismsystem/beans-web works
beans-web is a local-first web interface for discovering and managing beans projects stored as Markdown files. Users browse project overviews and hierarchies, inspect and edit individual beans and their relationships, search across projects, and view analytics. The React app sends API requests to a Hono server, which discovers projects and proxies GraphQL operations to the beans CLI; search and analytics aggregate across projects, while file-change events are streamed to the UI. The README documents these capabilities; some internal route wiring is represented at the subsystem level because its source was not sampled.
Main entry points: app.ts Hono server · router.tsx App routes · client.ts API client · useBeans.ts Data hooks
Components 24
Web interface
- React app
apps/web/src/main.tsx - App routes
apps/web/src/router.tsx - Project views
apps/web/src/routes/projectList.tsx - Bean detail
apps/web/src/routes/beanDetail.tsx - Search view
apps/web/src/routes/search.tsx - Analytics view
apps/web/src/routes/analytics.tsx - Data hooks
apps/web/src/hooks/useBeans.ts - Bean mutations
apps/web/src/hooks/useMutations.ts - API client
apps/web/src/api/client.ts
Server API
- Hono server
apps/server/src/app.ts - Project routes
apps/server/src/routes/projects.ts - GraphQL routes
apps/server/src/routes/graphql.ts - Search route
apps/server/src/routes/search.ts - Analytics route
apps/server/src/routes/analytics.ts - Events route
apps/server/src/routes/events.ts
Project services
- Project discovery
apps/server/src/discovery/scan.ts - CLI executor
apps/server/src/beans/executor.ts - Search aggregation
apps/server/src/aggregate/search.ts - Analytics aggregation
apps/server/src/aggregate/analytics.ts - File watcher
apps/server/src/watch/watcher.ts
Local project data
- Beans project files
Other components
- User
- beans CLI
- Browser event stream
Connections 30
- User → React app: uses
- React app → App routes: renders
- App routes → Project views: routes
- App routes → Bean detail: routes
- App routes → Search view: routes
- App routes → Analytics view: routes
- Project views → Data hooks: loads project data
- Bean detail → Data hooks: loads bean data
- Search view → API client: searches
- Analytics view → API client: loads analytics
- Data hooks → API client: requests data
- Bean mutations → API client: sends changes
- API client → Hono server: HTTP requests
- Browser event stream → Hono server: opens event stream
- Hono server → Project routes: registers
- Hono server → GraphQL routes: registers
- Hono server → Search route: registers
- Hono server → Analytics route: registers
- Hono server → Events route: registers
- Project routes → Project discovery: lists projects
- GraphQL routes → CLI executor: runs operations
- Search route → Search aggregation: aggregates search
- Analytics route → Analytics aggregation: aggregates analytics
- Events route → File watcher: streams changes
- Project discovery → Beans project files: scans roots
- CLI executor → beans CLI: invokes
- beans CLI → Beans project files: reads and writes
- Search aggregation → beans CLI: searches projects
- Analytics aggregation → beans CLI: reads project data
- File watcher → Beans project files: watches changes