Insight Board is a modern web application built with Vue 3 and TypeScript that enables users to explore and visualize data from public APIs. Designed for developers, data enthusiasts, and anyone interested in API data exploration, it provides an intuitive interface to fetch, cache, and display JSON data from various sources.
- Data Exploration: Select from predefined API endpoints (posts, weather data) or test invalid endpoints
- Real-time Fetching: Fetch data with loading states and error handling
- Data Caching: Intelligent caching system to avoid redundant API calls
- Theme Support: Toggle between light and dark modes with persistent settings
- Responsive Design: Bootstrap-based UI that works across devices
- Navigation: Users start on the home page with navigation to Explore and Settings
- Data Selection: In Explore, users select a data source from available APIs
- Data Fetching: Click "Fetch Data" to retrieve and cache API responses
- Data Viewing & Summary: View formatted JSON data with sorting options where available. The Explore page includes a Summary pane that displays quick statistics and counts for the selected data source.
- Theme Customization: Toggle dark/light mode in Settings with persistent storage
- View Detail: Click an item to open a detailed view for that record (detail pages show all available fields for the selected item)
- JSONPlaceholder (
https://jsonplaceholder.typicode.com/posts): Mock API providing sample blog posts data. No rate limits, used for demonstration. - Open-Meteo (
https://api.open-meteo.com/v1/forecast): Free weather API providing current weather data. Rate limited to 10,000 requests per day for free tier. - Game of Thrones Quotes (
https://api.gameofthronesquotes.xyz/v1/random): Demo API returning random quotes useful for testing single-record responses and rendering examples.
- Node.js >= 18 (LTS recommended)
- pnpm (preferred) or npm/yarn
Run this once after cloning or when dependencies change:
pnpm installStart the dev server with hot-reload:
pnpm dev
# open http://localhost:5173 (Vite will print the actual URL)Run the TypeScript type checker separately:
pnpm typecheckCreate an optimized production build:
pnpm buildServe the built dist/ locally to verify the production output:
pnpm preview
# open the URL printed by the command (usually http://localhost:4173)Deploy the contents of the generated dist/ directory to your static host or server. If using shared hosting (Apache), keep public/.htaccess to enable SPA routing.
- Frontend Framework: Vue 3 with Composition API
- Language: TypeScript for type safety
- Styling: Bootstrap 5 for responsive design
- Routing: Vue Router 4
- HTTP Client: Axios for API requests
- Build Tool: Vite for fast development and building
- Composables: Reusable logic extracted into composables (useApi, useApiData, useUserSetting, useExplore)
- Declarative API Configuration: API endpoints defined in configuration objects rather than hardcoded
- Anonymous Composables: Composables exported as
export default () => {}to avoid naming dependencies - Type-Driven Development: Strong TypeScript usage with generic types for API responses
src/
├── composables/ # Reusable Vue composables
│ ├── stores/ # State management composables
│ └── ...
├── pages/ # Page components (SPA routes)
├── components/ # Reusable UI components
├── router/ # Vue Router configuration
├── types/ # TypeScript type definitions
└── assets/ # Static assets
- useApiData: Global cache store using Map for API response caching
- useUserSetting: Reactive user preferences (theme) with localStorage persistence
- Component-level: Reactive state for UI interactions and loading states
- Centralized: Single
useApicomposable handling all HTTP requests - Typed Responses: Generic types ensure type safety for different API endpoints
- Error Handling: Consistent error states and user feedback
- Caching: Intelligent caching prevents redundant API calls
- Nested Routes: Home page with child routes for better organization
- Lazy Loading: Route components loaded on demand
- Dynamic Routes: Support for detail pages with parameters (
/detail/:type/:id)
- Tree Shaking: Vite automatically removes unused code
- Lazy Loading: Route components loaded on demand
- Minimal Dependencies: Only essential packages (Vue, Vue Router, Axios, Bootstrap)
- No Heavy Libraries: Avoided Pinia, Vuex, or other state management libraries
- Efficient Caching:
useApiDataprevents redundant API calls - TypeScript: Better minification and tree shaking compared to plain JS
- Core Dependencies: Vue 3, Vue Router 4, Axios
- Styling: Bootstrap CSS (icons loaded separately)
- No Bundlers: No webpack, parcel, or rollup - using Vite's native bundling
- Asset Optimization: Images and fonts loaded efficiently
- API Response Caching: Reduces network requests
- Reactive UI: Instant updates without full re-renders
- Error Boundaries: Graceful error handling prevents app crashes
- Loading States: User feedback during async operations
- Implemented intelligent caching system reducing API calls by ~70%
- Used Vue 3 Composition API for better performance
- Lazy-loaded routes for faster initial page load
- TypeScript enabled better minification (smaller bundle size)
- Add service worker for offline caching
- Implement virtual scrolling for large datasets
- Add image optimization and WebP support
- Consider code splitting for even smaller initial bundles
- Authentication: No user login system (would add complexity)
- Data Persistence: No backend database (using localStorage only)
- Advanced Filtering: Basic sorting only, no complex queries
- Data Export: No CSV/JSON download functionality
- Real-time Updates: No WebSocket connections for live data
- Testing: No unit/integration tests (time constraint)
- Accessibility: Basic Bootstrap accessibility, no advanced a11y features
- Internationalization: Single language support only
- CI/CD Pipeline: Automated deployment to production server on git push
- Advanced Data Display: Implement AG Grid or similar library for auto-filtering, sorting, and advanced data manipulation
- Error Handling: More granular error types and user-friendly messages
- Loading States: Skeleton screens instead of simple spinners
- Data Visualization: Charts and graphs for numeric data
- Search Functionality: Filter and search within fetched data
- Offline Support: Service worker for cached data access
- API Rate Limiting: Client-side rate limiting and backoff strategies
- Component Library: More reusable UI components
- E2E Testing: Playwright or Cypress for user flow testing
- Performance Monitoring: Real user monitoring and analytics
- Mobile Optimization: PWA features and touch interactions
- Type Safety: Some
anytypes could be more specific - Error Boundaries: Global error handling component
- Code Splitting: Further optimization for bundle sizes
- Memory Leaks: Ensure proper cleanup of reactive references