A Microsoft Copilot Studio–style React chatbot interface for the LynorAI Enterprise RAG Assistant. Built with Vite + React, featuring a Teams-inspired dark UI, real-time SSE streaming, drag-and-drop PDF upload, and integration guides for Microsoft Teams, Power Apps, and Web Chat.
- Node.js 18+
- Spring Boot backend running on port
8080(seeLynorAI-backend)
npm install
npm run dev # → http://localhost:3000Vite proxies all /api/* requests to the Spring Boot backend automatically.
npm run build # Output → frontend/dist/| Pane | What it does |
|---|---|
| Chat | Bubble-style conversation, real-time SSE token streaming, source citation pills, typing indicator, Enter-to-send |
| Documents | Drag-and-drop PDF upload, ingestion progress tracking, per-tenant isolation |
| Integrations | Setup guides + copy-able code snippets for Teams, Power Apps, and Web Chat |
| Settings | Sandbox session token, rate limits, auto-cleanup policy, version & tech stack info |
src/
├── App.jsx # Root shell — tab routing, all hooks wired
├── App.css # Design system — Teams palette, Inter font, CSS vars
├── main.jsx
├── api/
│ └── client.js # Fetch + SSE helpers, sandbox token (localStorage)
├── hooks/
│ ├── useBootstrap.js # GET /api/bootstrap + live sandbox countdown
│ ├── useChat.js # SSE streaming message state
│ └── useDocuments.js # Upload + poll /api/documents/status/:id
└── components/
├── TopBar.jsx # Logo, "ENTERPRISE RAG ASSISTANT", sandbox badge
├── Sidebar.jsx # Icon nav (Chat / Documents / Integrations / Settings)
├── ChatPane.jsx # Chat bubbles, typing dots, auto-scroll, citations
├── DocumentPane.jsx # Drag-and-drop zone, upload list with status badges
├── IntegrationPane.jsx # Expandable cards: Teams · Power Apps · Web Chat
└── SettingsPane.jsx # Sandbox info, rate limits, version, tech stack
All requests include X-Sandbox-Token header for multi-tenant isolation.
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/bootstrap |
Init session, get sandbox token & limits |
POST |
/api/documents/upload |
Upload a PDF for ingestion |
GET |
/api/documents/status/:id |
Poll document processing status |
GET |
/api/ask/stream?question=… |
SSE streaming RAG answer |
Register an Azure Bot, add the Teams channel, and upload the app manifest via the Teams Developer Portal.
Wrap the chat in a PCF component and import the solution into your Power Platform environment.
<iframe
src="https://lynorai.space"
style="position:fixed;bottom:24px;right:24px;width:380px;height:560px;
border:none;border-radius:16px;box-shadow:0 8px 32px rgba(0,0,0,.3);"
title="LynorAI Copilot">
</iframe>- Color palette — Teams-inspired dark:
#1a1a2ebase ·#6264A7accent ·#9EA8DBlight accent - Typography — Inter (UI) · DM Mono (code/tokens)
- Patterns — Glassmorphism cards · CSS custom properties · Micro-animations
React 18 · Vite 7 · Vanilla CSS · Spring Boot 3 · Spring AI · OpenAI GPT · pgvector