How nastoi/checkonit works
CheckOnIt is a staff-facing learner-operations chat UI, not the assistant workflow engine. Staff sign in with Microsoft Entra ID when enabled (or use a development identity), enter a learner email, and send messages through the chat interface. The server validates access and input, attaches staff identity and learner email, and proxies requests to Dify while carrying its conversation ID. The UI also provides quick actions for status, attendance, modules, payments, and support tickets. Dify’s downstream workflow is documented, but its implementation is outside this repository.
Main entry points: auth.ts Entra auth · page.tsx Chat access gate · route.ts Chat proxy · lib-auth-mode.ts Auth mode
Components 12
Access and identity
- Sign-in page
app/page.tsx - Entra auth
auth.ts - Auth callback route
app/api/auth/[...nextauth]/route.ts - Auth mode
lib-auth-mode.ts - Sign-out page
app/signout/page.tsx
Staff chat interface
- Chat access gate
app/chat/page.tsx - Chat and quick actions
components/ChatShell.tsx
Assistant integration
- Chat proxy
app/api/chat/route.ts
Other components
- Staff user
- Microsoft Entra ID
- Dify service
- Dify workflow stack
Connections 17
- Staff user → Sign-in page: opens
README.md - Sign-in page → Entra auth: signs in via
app/page.tsx - Entra auth → Microsoft Entra ID: authenticates with
auth.ts - Auth callback route → Entra auth: dispatches to
app/api/auth/[...nextauth]/route.ts - Sign-in page → Auth mode: checks mode
app/page.tsx - Staff user → Chat access gate: opens chat
README.md - Chat access gate → Entra auth: checks session
app/chat/page.tsx - Chat access gate → Auth mode: checks mode
app/chat/page.tsx - Chat access gate → Chat and quick actions: renders
app/chat/page.tsx - Staff user → Sign-out page: requests sign-out
README.md - Sign-out page → Entra auth: signs out via
app/signout/page.tsx - Sign-out page → Auth mode: checks mode
app/signout/page.tsx - Chat and quick actions → Chat proxy: posts messages
components/ChatShell.tsx - Chat proxy → Entra auth: checks session
app/api/chat/route.ts - Chat proxy → Auth mode: selects staff identity
app/api/chat/route.ts - Chat proxy → Dify service: posts chat request
app/api/chat/route.ts - Dify service → Dify workflow stack: uses workflows
README.md