How bcsdlab/bcsd_united works
BCSD United is a Cloudflare Workers monorepo centered on the KOIN web app, with a Slack operations bot, a legacy API Worker, and error-autofix automation. The main user-facing flow is browser to SSR web app to the Java KOIN API. The bot’s spreadsheet workflows convert bus, cooperative-shop, and lecture data into reviewable submissions; error automation handles webhook/queue-driven diagnosis and pull-request fixes. Several links come from README statements or indexed imports; unsampled runtime wiring is omitted rather than inferred.
Main entry points: app.ts API Worker · index.ts Error webhook · queue.ts Autofix queue · pipeline.ts Co-op timetable review
Components 25
KOIN Web
- Web app and SSR
apps/web/src/client.tsx
Legacy API
- API Worker
apps/api/src/app.ts - Identity
apps/api/src/domains/identity - Commerce
apps/api/src/domains/commerce - Academic
apps/api/src/domains/academic - Community
apps/api/src/domains/community - Campus services
apps/api/src/domains - D1 database
apps/api/src/db/client.ts
Slack Bot
- Bot Worker
apps/b-bot/worker.ts - Bus timetable review
apps/b-bot/src/services/bus/pipeline.ts - Co-op timetable review
apps/b-bot/src/services/coop/pipeline.ts - Image extraction
apps/b-bot/src/services/coop/vision.ts - Co-op conversion
apps/b-bot/src/services/coop/convert.ts - Lecture review
apps/b-bot/src/services/lecture/pipeline.ts - Dining delivery
apps/b-bot/src/services/dining/worker.ts
Error Automation
- Error webhook
apps/error-automation/src/index.ts - Autofix queue
apps/error-automation/src/queue.ts - Diagnostics
apps/error-automation/src/diagnostics.ts - Model review
apps/error-automation/src/model.ts - GitHub operations
apps/error-automation/src/github.ts - Pull request prep
apps/error-automation/src/pull-request.ts
Other components
- Web user
- Java API
- Slack user
- GitHub PR
Connections 19
- Web user → Web app and SSR: uses
README.md - Web app and SSR → Java API: calls API
README.md - API Worker → Identity: registers routes
apps/api/src/app.ts - API Worker → Commerce: registers routes
apps/api/src/app.ts - API Worker → Academic: registers routes
apps/api/src/app.ts - API Worker → Community: registers routes
apps/api/src/app.ts - API Worker → Campus services: registers routes
apps/api/src/app.ts - Slack user → Bot Worker: interacts
- Bus timetable review → Co-op timetable review
- Co-op timetable review → Image extraction: extracts image
apps/b-bot/src/services/coop/pipeline.ts - Co-op timetable review → Co-op conversion: converts timetable
apps/b-bot/src/services/coop/pipeline.ts - Error webhook → Diagnostics: gathers evidence
apps/error-automation/src/index.ts - Error webhook → Model review: parses request
apps/error-automation/src/index.ts - Error webhook → GitHub operations: uses GitHub
apps/error-automation/src/index.ts - Error webhook → Pull request prep: inspects PR
apps/error-automation/src/index.ts - Autofix queue → GitHub operations: validates
apps/error-automation/src/queue.ts - Autofix queue → Model review: invokes model
apps/error-automation/src/queue.ts - Autofix queue → Pull request prep: prepares PR
apps/error-automation/src/queue.ts - GitHub operations → GitHub PR: publishes changes