How oracle-vfts-352/mirai_hub works
Mirai Hub is a feedback platform: users discover projects, follow them, submit and vote on feedback, and developers respond with status updates or official replies. The web app calls an Express API for accounts, projects, posts, feedback, and notifications; a background worker handles asynchronous notification processing. The README documents the database, Redis, object storage, and mail integrations. Some route and service implementations were not excerpted, so their internal call relationships are omitted where the available evidence does not establish them.
Main entry points: app.ts Express app · api.ts API client · App.tsx Web app · auth_controller.ts Passkey and sessions
Components 34
Web client
- Web app
apps/web/src/App.tsx - API client
apps/web/src/api.ts - Auth context
apps/web/src/auth.tsx - Project pages
apps/web/src/pages/ProjectPage.tsx - Feedback UI
apps/web/src/components/FeedbackSection.tsx - Project posts
apps/web/src/components/PostList.tsx - User profiles
apps/web/src/pages/Profile.tsx - Notification UI
apps/web/src/components/NotificationBell.tsx - Localization
apps/web/src/i18n/index.ts - Avatar display
apps/web/src/components/Avatar.tsx - Project logo display
apps/web/src/components/ProjectLogo.tsx - Date formatting
apps/web/src/i18n/format.ts - Feedback labels
apps/web/src/labels.ts
API and domain
- Express app
apps/api/src/app.ts - Auth routes
apps/api/src/routes/auth.ts - Passkey and sessions
apps/api/src/controllers/auth_controller.ts - Session checks
apps/api/src/middleware/auth.ts - Project routes
apps/api/src/routes/projects.ts - Feedback routes
apps/api/src/routes/feedback.ts - Feedback workflow
apps/api/src/services/feedback.ts - Project, post, user services
apps/api/src/services - Email verification
apps/api/src/services/emailVerification.ts - Rate limiting
apps/api/src/middleware/rateLimit.ts
Notifications
- Transactional outbox
apps/api/src/lib/outbox.ts - BullMQ queue
apps/api/src/lib/queue.ts - Notification worker
apps/api/src/run-worker.ts - Notification service
apps/api/src/services/notifications.ts
Persistence and integrations
- PostgreSQL
- Redis
apps/api/src/lib/redis.ts - Object storage
apps/api/src/lib/storage.ts - SMTP mail
apps/api/src/lib/mail.ts - Runtime config
apps/api/src/lib/config.ts - Prisma client
apps/api/src/lib/prisma.ts
Other components
- User
Connections 39
- User → Web app: uses
README.md - Web app → API client: calls
- Web app → Auth context: provides context
apps/web/src/App.tsx - Project pages → API client: requests data
apps/web/src/pages/ProjectPage.tsx - Project pages → Feedback UI: renders
apps/web/src/pages/ProjectPage.tsx - Project pages → Project posts: renders
apps/web/src/pages/ProjectPage.tsx - User profiles → API client: requests data
apps/web/src/pages/Profile.tsx - Feedback UI → API client: requests data
apps/web/src/components/FeedbackSection.tsx - Project posts → API client: requests data
apps/web/src/components/PostList.tsx - Avatar display → API client: uses user data
- Web app → Localization: uses translations
apps/web/src/main.tsx - Date formatting → Localization: reads locale
apps/web/src/i18n/format.ts - Web app → Notification UI: renders
apps/web/src/App.tsx - API client → Express app: sends API requests
README.md - Express app → Auth routes: mounts
apps/api/src/app.ts - Express app → Project routes: mounts
apps/api/src/app.ts - Express app → Feedback routes: mounts
apps/api/src/app.ts - Express app → Rate limiting: applies limits
apps/api/src/app.ts - Auth routes → Passkey and sessions: dispatches
apps/api/src/routes/auth.ts - Auth routes → Session checks: guards routes
apps/api/src/routes/auth.ts - Feedback routes → Feedback workflow: calls
apps/api/src/routes/feedback.ts - Passkey and sessions → PostgreSQL: reads and writes
apps/api/src/controllers/auth_controller.ts - Passkey and sessions → Redis: stores challenges
apps/api/src/controllers/auth_controller.ts - Passkey and sessions → Email verification: requests verification
apps/api/src/controllers/auth_controller.ts - Passkey and sessions → Object storage: formats media URL
apps/api/src/controllers/auth_controller.ts - Session checks → PostgreSQL: checks token version
apps/api/src/middleware/auth.ts - Session checks → Redis: checks revocation
apps/api/src/middleware/auth.ts - Feedback workflow → PostgreSQL: persists feedback
apps/api/src/services/feedback.ts - Feedback workflow → BullMQ queue: uses notification queue
apps/api/src/services/feedback.ts - Email verification → PostgreSQL: uses
apps/api/src/services/emailVerification.ts - Email verification → SMTP mail: sends email
apps/api/src/services/emailVerification.ts - Express app → PostgreSQL: serves application data
README.md - Express app → Object storage: uses image storage
README.md - Express app → Redis: uses cache and limits
README.md - Notification worker → BullMQ queue: consumes jobs
apps/api/src/run-worker.ts - Notification worker → Transactional outbox: relays events
apps/api/src/run-worker.ts - Notification worker → Notification service: dispatches processing
apps/api/src/run-worker.ts - Transactional outbox → BullMQ queue: publishes events
README.md - Notification service → PostgreSQL: creates notifications
README.md