-
Notifications
You must be signed in to change notification settings - Fork 0
Features
A breakdown of every major capability across all three subprojects.
β Navigation: Home Β· Architecture Β· API Reference
Messages stream instantly over Direct Line's WebSocket connection. The client connects to the streamUrl returned by the server on conversation start β no polling, no delay.
Bot responses are passed through a Markdown utility layer before display. This means Copilot Studio can return structured answers with headings, bullet lists, code blocks, links, and bold/italic text β all rendered beautifully in the chat bubble.
Three keys are written to sessionStorage so a page refresh doesn't lose context:
| Key | Contents |
|---|---|
opotin_chat_messages |
Full chat history array |
opotin_conversation |
Conversation metadata (ID, token, streamUrl) |
opotin_watermark |
Direct Line watermark for deduplication |
The Direct Line watermark is persisted so that reconnecting after a refresh doesn't re-deliver messages the user has already seen. Only activities newer than the last watermark are processed.
A built-in control wipes all three sessionStorage keys and starts a fresh conversation β useful when testing or when a student wants a clean start.
DIRECT_LINE_SECRET never reaches the browser. The server exchanges it for a short-lived token and returns only the token and streamUrl to the client. See Architecture β Security Model for the full flow.
Every conversationId is automatically stored in data/database.db the moment a conversation starts. The database file is created on first run β no setup needed.
Students can rate any conversation from 1β5 stars via POST /feedback/:conversationId. Ratings are stored alongside the conversation record and exposed to the admin dashboard.
All analytics endpoints require an X-Admin-Token header matching the ADMIN_TOKEN value in server/.env. Requests without a valid token receive a 401 response.
The Overview tab shows:
- Average rating across all conversations
- Distribution bars β visual breakdown of how many 1β through 5β ratings were given
- Donut chart β proportional view of the rating spread
- Summary cards β total conversations rated, total feedback entries
The Conversations tab lists every rated conversation with sorting controls by date and rating. Each entry expands to show the full conversation details via ConversationCard.
Login submits the admin token, which is tested immediately against the backend. On success, the token is persisted to sessionStorage under opotin_admin_token so the admin stays logged in across tab refreshes.
The navbar includes a refresh button that re-fetches both /feedback and /conversations in parallel β no need to reload the page.
npm run dev # starts client + server + admin concurrentlyThe root package.json uses concurrently to orchestrate all three Vite/Node processes in a single terminal session.
Each subproject can also be run on its own:
cd client && npm run dev # Chat UI only
cd server && npm start # API only
cd admin && npm run dev # Dashboard onlyβ Next: π API Reference Β· π Setup & Configuration
π Live π¬ Chatbot π Admin Dashboard
π Pages
π Home ποΈ Architecture β¨ Features π API Reference π Setup & Config π οΈ Tech Stack π Deployment π₯ Team π©Ί Troubleshooting
π Subprojects
client/ Β· Chat UI Β· :5173
server/ Β· Proxy + API Β· :3000
admin/ Β· Dashboard Β· :5174
TAMK Student Guide