How filipomc/rzejbot works
Rzej is a shift- and employee-management product with a Discord bot and a web application backed by a shared API and database. The main operational workflow is that staff use Discord commands to manage employees and plan or send shifts; the web API stores shift records and supports reports and attendance, absence, and station logs, which the web interface can present. The tree also shows automated shift-briefing tasks and a shared validation/configuration package. The README is empty and bot helpers, web pages, and task implementations were not sampled, so their internal wiring is left unspecified.
Main entry points: shifts Shift endpoints · prisma.ts Prisma client · logs Shift log endpoints · shiftSchemas.ts Shift schemas
Components 17
Discord bot
- Staff commands
packages/bot/src/app/commands/(Kierownictwo) - Shift editor
packages/bot/src/app/components/zmiana/manageShiftEmbed - Bot helpers
packages/bot/src/helper - Shift briefing tasks
packages/bot/src/app/tasks/prepareShiftBriefing.ts
Web application
- Shift pages
packages/web/src/app/zmiana/[shiftNumber]/plan/page.tsx - Web API client
packages/web/src/lib/api.ts
API and persistence
- Employee endpoints
packages/web/src/app/api/employees - Shift endpoints
packages/web/src/app/api/shifts - Shift log endpoints
packages/web/src/app/api/shifts/[id]/logs - Shift reports
packages/web/src/app/api/shifts/[id]/report/route.ts - Prisma client
packages/web/src/lib/prisma.ts - Application database
Shared contracts
- Employee schemas
packages/shared/src/zod/employeeSchemas.ts - Shift schemas
packages/shared/src/zod/shiftSchemas.ts - Shared config
packages/shared/src/config
Other components
- Discord staff
- Web users
Connections 17
- Discord staff → Staff commands: invoke commands
- Staff commands → Shift editor: open editor
- Bot helpers → Shift endpoints: call API
- Shift briefing tasks → Shift endpoints: call API
- Web users → Shift pages: view shifts
- Shift pages → Web API client: request data
- Web API client → Shift endpoints: call API
- Employee endpoints → Prisma client: read/write employees
- Shift endpoints → Prisma client: read/write shifts
- Shift log endpoints → Prisma client: read/write logs
- Shift reports → Prisma client: read/write reports
- Prisma client → Application database: read/write records
- Employee endpoints → Employee schemas: validate input
- Shift endpoints → Shift schemas: validate input
- Shift log endpoints → Shift schemas: validate input
- Shift reports → Shift schemas: validate input
- Shift log endpoints → Shared config: order stations