A modern, responsive single-page web application for uploading, processing, and visualizing transcripts. Built with Next.js, React, TypeScript, and Tailwind CSS.
- File Upload: Drag-and-drop or click to upload
.txttranscript files - Text Paste: Direct paste of transcript text into a text area
- Read-only Preview: Preview uploaded files before processing
- Smart Input States: Automatic switching between upload and paste modes
- Report: Markdown-rendered analysis report with formatted headings, lists, and code blocks
- JSON Output: Interactive JSON viewer with:
- Copy to clipboard functionality
- Download as JSON file
- Syntax highlighting
- Steps: Accordion-style list of extracted process steps with:
- Expand/collapse individual steps
- Expand/collapse all controls
- Numbered step indicators
- BPMN Viewer: Interactive BPMN diagram visualization with:
- Zoom in/out/reset controls
- Pan and navigate the diagram
- Read-only view
- Loading states with spinner animations
- Error handling and user-friendly error messages
- Disabled states for invalid inputs
- Responsive design for mobile and desktop
- Clean, modern UI with Tailwind CSS
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: Custom React components
- Markdown Rendering: react-markdown
- BPMN Visualization: bpmn-js
- Icons: lucide-react
frontend/
├── app/
│ ├── api/
│ │ └── process/
│ │ └── route.ts # API route for backend communication
│ ├── globals.css # Global styles and Tailwind imports
│ ├── layout.tsx # Root layout component
│ └── page.tsx # Main page component
├── components/
│ ├── tabs/
│ │ ├── BpmnTab.tsx # BPMN diagram viewer
│ │ ├── JsonTab.tsx # JSON output viewer
│ │ ├── ReportTab.tsx # Markdown report renderer
│ │ └── StepsTab.tsx # Steps accordion view
│ ├── ResultsTabs.tsx # Tab navigation component
│ └── TranscriptInput.tsx # File upload and text input component
├── .env.local # Local environment variables
├── .env.example # Environment variables template
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── tailwind.config.js # Tailwind CSS configuration
├── next.config.js # Next.js configuration
└── README.md # This file
- Node.js 18.x or higher
- npm, yarn, or pnpm package manager
- Backend API service running (see Backend Configuration)
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install # or yarn install # or pnpm install
-
Configure environment variables:
- Copy
.env.exampleto.env.local - Update
BACKEND_URLto point to your backend service:
BACKEND_URL=http://localhost:8000
- Copy
-
Development mode (with hot reload):
npm run dev # or yarn dev # or pnpm dev
-
Open your browser: Navigate to http://localhost:3000
-
Production build:
# Build the application npm run build # Start the production server npm start
The frontend communicates with a backend API service. Configure the backend URL in .env.local:
BACKEND_URL=http://localhost:8000POST /api/process
Request Body:
{
"transcript": "Your transcript text here..."
}Response Body:
{
"report": "# Markdown report content...",
"json": {
"key": "Full JSON response object"
},
"steps": [
"Step 1 description",
"Step 2 description",
"..."
],
"bpmn": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>..."
}- Option A: Click the upload area and select a
.txtfile - Option B: Paste transcript text directly into the text area
- Click "Process Transcript" button (enabled when input is provided)
- Wait for processing (loading spinner will appear)
Navigate through tabs to view different outputs:
- Report: Structured analysis in Markdown format
- JSON Output: Copy or download the full JSON response
- Steps: View individual process steps in an accordion
- BPMN Viewer: Visualize the process flow diagram
- Copy JSON: Click to copy JSON output to clipboard
- Download JSON: Save JSON output as a file
- Zoom Controls: Adjust BPMN diagram view
- Expand/Collapse: Toggle step details in Steps tab
- TypeScript for type safety
- Functional React components with hooks
- Tailwind CSS for styling
- Component-based architecture
- Create new components in
/components - Add new tabs in
/components/tabs - Update type definitions in relevant files
- Follow existing patterns for consistency
- Network errors are caught and displayed to users
- Invalid inputs are prevented at the UI level
- Backend errors are propagated with user-friendly messages
-
Port 3000 already in use:
# Use a different port PORT=3001 npm run dev -
Backend connection failed:
- Verify backend is running
- Check
BACKEND_URLin.env.local - Ensure CORS is enabled on backend
-
BPMN diagram not loading:
- Verify BPMN XML format is correct
- Check browser console for errors
- Ensure bpmn-js is properly installed
-
File upload not working:
- Verify file is
.txtformat - Check file size limits (if any)
- Ensure read permissions on file
- Verify file is
-
Build the application:
npm run build
-
Test production build locally:
npm start
-
Deploy:
- Deploy to Vercel, Netlify, or any Node.js hosting
- Update
BACKEND_URLenvironment variable for production - Ensure backend CORS settings allow your frontend domain
The application uses Next.js API routes to proxy requests to the backend:
- Client → Next.js API Route (
/app/api/process/route.ts) → Backend Service - This approach keeps backend URL configuration server-side
- No API keys or secrets are exposed to the client
- Supports custom error handling and response transformation
- BPMN viewer is dynamically imported to reduce initial bundle size
- Large JSON outputs are rendered efficiently with virtualization
- File reading happens client-side to reduce server load
- Images and assets are optimized by Next.js automatically
- Modern browsers (Chrome, Firefox, Safari, Edge)
- ES2017+ JavaScript support required
- CSS Grid and Flexbox support required
This project is part of the Transcript Processor system.
For issues or questions:
- Check this documentation
- Review example transcripts and responses
- Verify backend API is functioning correctly
- Check browser console for errors
Built with ❤️ using Next.js and React