Web UI
May 1, 2026 ยท View on GitHub
Web UI โ Spec-Driven Presentation Maker
Layer 4 Web UI for Spec-Driven Presentation Maker. A React-based chat interface for creating presentations through conversational AI โ design your spec, then let the agent build the slides.

Tech Stack
- Next.js 16 with Turbopack (static export)
- React 19 / TypeScript 5
- Tailwind CSS v4 / shadcn/ui / Radix UI
- react-oidc-context โ Cognito OIDC authentication
- react-markdown + remark-gfm โ Markdown rendering
- react-dropzone โ File upload
- sonner โ Toast notifications
- PWA โ Service Worker + Web App Manifest
Prerequisites
- Node.js 20+
- npm
Quick Start
cd web-ui
npm ci
npm run dev # Starts dev server with Turbopack
Open http://localhost:3000.
Note: Authentication is required by default. See the Authentication section to configure or disable it.
Experimental: Local Mode (Kiro ACP backend)
โ ๏ธ Experimental. APIs, flags, and behavior may change or break without notice.
Run the Web UI entirely on your machine, backed by Kiro CLI via ACP (Agent Client Protocol) instead of the cloud-deployed Agent and Runtime. No AWS deployment needed. Useful for trying the UI without setting up Layer 3/4.
Prerequisites
kiro-cliinstalled and onPATHโ see Kiro CLI install guide
Start
cd web-ui
npm ci
npm run dev:local
Open http://localhost:3000 (Next.js picks the next free port if 3000 is taken).
How it works
Setting NEXT_PUBLIC_MODE=local enables the Next.js API Routes under src/app/api/ and spawns kiro-cli acp --agent sdpm-spec per active deck. The agent definitions live under mcp-local/.kiro/agents/ and share the MCP toolset from mcp-local/server_acp.py.
Authentication
Authentication uses OIDC via Cognito User Pool. Configuration is loaded from public/aws-exports.json at runtime, with optional environment variable overrides.
Setup
- Copy the example config:
cp public/aws-exports.example.json public/aws-exports.json
- Fill in your Cognito values:
{
"authority": "https://cognito-idp.<REGION>.amazonaws.com/<USER_POOL_ID>",
"client_id": "<CLIENT_ID>",
"redirect_uri": "http://localhost:3000",
"post_logout_redirect_uri": "http://localhost:3000",
"response_type": "code",
"scope": "openid profile email",
"automaticSilentRenew": true,
"agentRuntimeArn": "arn:aws:bedrock-agentcore:<REGION>:<ACCOUNT_ID>:runtime/<NAME>",
"apiBaseUrl": "https://<API_GW_ID>.execute-api.<REGION>.amazonaws.com/prod/",
"awsRegion": "<REGION>"
}
Environment Variable Override
Environment variables (NEXT_PUBLIC_COGNITO_*) take priority over aws-exports.json:
| Variable | Description |
|---|---|
NEXT_PUBLIC_COGNITO_REGION | AWS region |
NEXT_PUBLIC_COGNITO_USER_POOL_ID | Cognito User Pool ID |
NEXT_PUBLIC_COGNITO_CLIENT_ID | Cognito App Client ID |
NEXT_PUBLIC_COGNITO_REDIRECT_URI | OAuth redirect URI |
NEXT_PUBLIC_COGNITO_POST_LOGOUT_REDIRECT_URI | Post-logout redirect URI |
NEXT_PUBLIC_COGNITO_RESPONSE_TYPE | OAuth response type (default: code) |
NEXT_PUBLIC_COGNITO_SCOPE | OAuth scopes (default: email openid profile) |
NEXT_PUBLIC_COGNITO_AUTOMATIC_SILENT_RENEW | Auto token renewal (true/false) |
Disabling Auth for Local Development
Authentication is enforced through a Next.js Route Group. All protected pages live under src/app/(authenticated)/, which wraps children with AuthProvider in its layout.tsx:
src/app/
โโโ layout.tsx # RootLayout โ no auth
โโโ (authenticated)/
โโโ layout.tsx # AuthProvider wrapper
โโโ page.tsx # Redirects to /decks
โโโ decks/page.tsx # Main page
To bypass auth during local development, remove the AuthProvider wrapper in src/app/(authenticated)/layout.tsx:
Before:
import { AuthProvider } from "@/components/auth/AuthProvider"
export default function AuthenticatedLayout({ children }: { children: React.ReactNode }) {
return <AuthProvider>{children}</AuthProvider>
}
After:
export default function AuthenticatedLayout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
โ ๏ธ This change is for local development only. Do not deploy to production.
Project Structure
web-ui/
โโโ src/
โ โโโ app/
โ โ โโโ layout.tsx # RootLayout (Geist font, Toaster, PWA)
โ โ โโโ globals.css
โ โ โโโ (authenticated)/
โ โ โโโ layout.tsx # AuthProvider wrapper
โ โ โโโ page.tsx # Root โ /decks redirect
โ โ โโโ decks/page.tsx # Main deck workspace
โ โโโ components/
โ โ โโโ ui/ # shadcn/ui primitives
โ โ โโโ auth/ # AuthProvider, AutoSignin
โ โ โโโ chat/ # ChatPanel, ChatMessage, ToolCard, FileDropZone, etc.
โ โ โโโ deck/ # DeckCard, SlideCarousel, OutlineView, DeckListView, etc.
โ โ โโโ AppShell.tsx # Header + layout shell
โ โโโ hooks/ # useAuth, useDeckList, useWorkspace, useSwipe, etc.
โ โโโ lib/ # auth.ts (Cognito config), utils.ts
โ โโโ services/ # deckService, uploadService, agentCoreService, parsers
โ โโโ types/
โโโ public/
โ โโโ aws-exports.example.json # Auth config template
โ โโโ manifest.json # PWA manifest
โ โโโ sw.js # Service Worker
โโโ package.json
โโโ next.config.ts # Static export, build โ build/
โโโ tsconfig.json
โโโ components.json # shadcn/ui config
โโโ postcss.config.mjs
Key Components
Chat (components/chat/)
Conversational interface for interacting with the agent. Includes message rendering with Markdown support, tool execution cards, file drag-and-drop upload, mention overlays, and slide tag references.
Deck (components/deck/)
Presentation management โ deck cards with thumbnails, slide carousel viewer, outline view, spec step navigation, search results grid, and deck CRUD actions.
Auth (components/auth/)
OIDC authentication flow โ AuthProvider wraps the Cognito OIDC context, AutoSignin handles automatic redirect-based sign-in.
Documentation
| Document | Description |
|---|---|
| Getting Started | Full setup guide for all layers |
| Architecture | 4-layer design, data flow, auth model |
| Recommended Deploy | Recommended path for AWS deployments (CloudShell or local) |