This project is a simple web application that generates an instant dashboard from raw JSON data using an AI model. The user provides structured data and a short natural language prompt, and the application renders a one-page dashboard preview.
- Clone the Repository
- git clone https://github.com/your-username/instant-dashboard.git
- cd instant-dashboard
- Create and activate a virtual environment
- python -m venv venv
- venc\Scripts\activate
- Install Dependencies
- pip install -r requirements.txt
- Add API key Create a .env file in the project root and add :
- GEMINI_API_KEY=your_api_key_here
- Start the Server
- python app.py
- Open the app in a browser
This Application uses the Google Gemini API to generate frontend HTML Dashboards.
- Model: Gemini-2.5-flash (generateContent endpoint)
- The AI is instructed to behave as a frontend developer.
- It outputs a complete HTML file styled with Tailwind CSS.
- Strict rules are applied to ensure the AI uses only the data provided in the JSON.
- Invalid JSON input is handled gracefully.
- The Dashboard preview is rendered inside an iframe.
- Generated dashboards can be downloaded as an image.