A unified, resilient portal for managing Generative AI tools with an integrated Full-Stack TypeScript architecture (Express + Vite).
root/
├── src/ # React Frontend Code
│ ├── components/ # UI Components (Sidebar, Header, AppItem, etc.)
│ ├── services/ # API connectivity (api.ts)
│ ├── App.tsx # Main Application Component
│ ├── main.tsx # React Entry Point
│ └── types.ts # Shared TypeScript Definitions
├── server.ts # Express Backend & Vite Dev Server
├── config.json # Central Tool Registry (Data Store)
├── package.json # Dependencies & Scripts
└── vite.config.ts # Vite Configuration
The application implements a Mock JWT flow to demonstrate secure API communication.
- Login: On mount, the frontend calls
/api/auth/login. - Token: The Express server returns a mock access token (
mock-jwt-token-xyz-123). - Authorization: The frontend stores this token and attaches it as an
Authorization: Bearer <token>header to all subsequent API requests. - Verification: The backend middleware (
verifyTokeninserver.ts) validates this token before serving data.
The dashboard is built to be "Offline-First":
- Fallback Data: If the backend server is unreachable or authentication fails, the frontend automatically switches to a set of hardcoded fallback tools.
- Visual Feedback: Toasts notify the user when the app is running in "Offline/Cached" mode.
- Timeout Handling: API requests have a built-in timeout to prevent the UI from hanging on slow connections.
Install the required dependencies:
npm installStart the integrated server (Express + Vite):
npm run devThe application will be available at http://localhost:3000.
Build the frontend and start the production server:
npm run build
npm startYou can manage the tools displayed in the dashboard by editing config.json.
- Icons: Supports Lucide icon names (e.g., "Zap", "Palette").
- Categories: Tools are automatically grouped by the
categoryfield in the sidebar. - Real-time Updates: Changes to
config.jsonare reflected in the UI upon page refresh (no server restart required).