A React + TypeScript frontend application that connects to the GoInsight feedback analytics API. This application provides an intuitive interface for asking natural language questions about feedback data and visualizing AI-powered insights.
See the docs/ directory for short notes on what to expect when running the app locally (prerequisites, env vars, common pitfalls) and other helpful documentation.
Backend Required: This frontend connects to the GoInsight Backend API - a Go-based AI-powered feedback analytics service. Make sure to set up and run the backend before using this frontend.
- Natural Language Query Interface: Ask questions in plain English about your feedback data
- Rich Data Visualization: Interactive tables with sortable columns, color-coded chips, and detailed tooltips
- AI-Powered Insights: Get summaries, recommendations, and actionable items from your feedback data
- Material UI Design: Professional, accessible UI components with a polished internal tool aesthetic
- Type-Safe Architecture: Full TypeScript coverage with strict typing throughout
- State Management: Efficient global state management with Zustand
- Responsive Design: Works seamlessly across desktop and tablet devices
- SCSS Styling: Customizable styling with SCSS modules and MUI theming
- React 18 with TypeScript
- Vite - Fast build tool and dev server
- Material UI (MUI v5) - Component library
- Zustand - Lightweight state management
- Axios - HTTP client
- SCSS/Sass - Styling
- Emotion - CSS-in-JS (required by MUI)
- Node.js 18+ and npm
- GoInsight Backend API - Clone, configure, and run the backend server
# Clone the backend git clone https://github.com/devchuckcamp/goinsight.git cd goinsight # Follow the backend README for setup instructions
- Backend should be running at
http://localhost:8080(or configure custom URL in.env)
cd goinsight-webui
npm installCreate a .env file (copy from .env.example):
cp .env.example .envEdit .env to configure your API endpoint and JIRA settings:
VITE_API_BASE_URL=http://localhost:8080
VITE_JIRA_PROJECT_KEY=SASSEnvironment Variables:
VITE_API_BASE_URL: Backend API URL (default:http://localhost:8080)VITE_JIRA_PROJECT_KEY: JIRA project key for ticket creation (default:SASS)
npm run devThe application will be available at http://localhost:5173
npm run buildThe production build will be in the dist/ directory.
npm run previewgoinsight-webui/
βββ src/
β βββ api/
β β βββ client.ts # Axios client with interceptors
β β βββ goinsight.ts # Typed API functions
β βββ components/
β β βββ layout/
β β β βββ AppLayout.tsx # Main app layout with header/footer
β β βββ ask/
β β βββ QuestionForm.tsx # Question input form
β β βββ InsightSummary.tsx # Summary display
β β βββ DataPreviewTable.tsx # Data table with sorting
β β βββ RecommendationsList.tsx # Recommendations display
β β βββ ActionsAccordion.tsx # Actionable items
β βββ hooks/
β β βββ useAskQuestion.ts # Custom hook for API calls
β βββ store/
β β βββ useInsightStore.ts # Zustand global store
β βββ styles/
β β βββ _variables.scss # SCSS variables
β β βββ global.scss # Global styles and utilities
β βββ types/
β β βββ goinsight.ts # TypeScript interfaces
β βββ App.tsx # Main app component
β βββ main.tsx # App entry point
β βββ config.ts # Configuration management
βββ .env.example # Environment variables template
βββ package.json
βββ tsconfig.json
βββ vite.config.ts
The application uses Zustand for global state management with a clean, type-safe API:
const { lastResponse, loading, error } = useInsightStore();API calls are abstracted through:
- API Client (
api/client.ts): Axios instance with interceptors - API Functions (
api/goinsight.ts): Typed API methods - Custom Hook (
useAskQuestion): Encapsulates API logic and state updates
App.tsx
βββ AppLayout
βββ QuestionForm
βββ Results (conditional)
βββ InsightSummary
βββ DataPreviewTable
βββ RecommendationsList
βββ ActionsAccordion
The application combines Material UI theming with SCSS for maximum flexibility:
- MUI Components: Buttons, Cards, Tables, Chips, etc.
- MUI Theme: Custom color palette and typography
- SCSS Variables: Spacing, colors, breakpoints
- SCSS Utilities: Layout helpers, spacing utilities
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
The frontend expects the following API endpoint:
POST /api/ask
Request:
{
"question": "Show me critical issues from enterprise customers"
}Response:
{
"question": "Show me critical issues from enterprise customers",
"data_preview": [
{
"id": "fb-001",
"created_at": "2025-12-02T10:13:20Z",
"customer_tier": "enterprise",
"priority": 5,
"product_area": "billing",
"region": "NA",
"sentiment": "negative",
"source": "zendesk",
"summary": "Customer unable to process refund...",
"topic": "refund processing"
}
],
"summary": "Analysis of critical enterprise issues...",
"recommendations": [
"Prioritize billing system refund workflow",
"Schedule customer success check-in"
],
"actions": [
{
"title": "Fix Refund Processing Bug",
"description": "Investigate and resolve refund processing issue..."
}
]
}This frontend is designed to work seamlessly with the GoInsight Backend API:
Backend Features:
- AI-powered feedback analysis using GPT models
- Natural language question processing
- JIRA ticket creation from actionable insights
- RESTful API with JSON responses
- Go-based for performance and reliability
Integration Points:
POST /api/ask- Submit natural language questions about feedback dataPOST /api/jira-tickets- Create JIRA tickets from selected actions- Environment-based configuration for seamless local/production deployment
Setup Instructions:
- Clone and run the GoInsight backend
- Ensure it's accessible at
http://localhost:8080(or updateVITE_API_BASE_URL) - Start this frontend and begin querying your feedback data
- Authentication & Authorization
- JIRA Integration (convert actions to tickets) β
- Advanced filtering and search
- Data export capabilities
- Charts and visualizations
- Saved queries and history
- Real-time updates via WebSockets
- Multi-language support
This project demonstrates senior-level React engineering practices:
- TypeScript: Strict typing, no
anytypes - React Hooks: Proper use of
useMemo,useCallback, custom hooks - Component Design: Small, focused, reusable components
- Error Handling: Comprehensive error states and user feedback
- Performance: Optimized re-renders, memoization where appropriate
- Accessibility: Semantic HTML, ARIA labels, keyboard navigation
- Follow the existing code style and patterns
- Use TypeScript strictly (no
anytypes) - Write descriptive commit messages
- Test thoroughly before submitting
MIT License - see LICENSE file for details
Built with β€οΈ by the GoInsight Team