An AWS-powered intelligent business analytics platform that provides real-time insights, AI-powered chat, and predictive simulations for enterprise operations.
Live Demo: http://insightsgridai-results-1761385095.s3-website-us-east-1.amazonaws.com/
- AWS CLI configured with appropriate permissions
- Node.js 18+ and npm installed
- AWS CDK installed:
npm install -g aws-cdk
# Clone and navigate to project
cd /Users/vedantkandge/Documents/Hackathons/ABC
# Deploy infrastructure and frontend
./deploy.shThe script will:
- Deploy AWS infrastructure using CDK
- Upload sample data to S3
- Build and deploy React frontend
- Display your website URL
- AI Chat Tab: General business intelligence queries using Airia pipeline
- Chat with Data Widget: Data-specific queries with contextual insights
- Natural language interface for complex business questions
- Real-time responses with intelligent caching
- Fuel Price Impact Analysis: Analyze cost effects of fuel price changes
- Demand Forecasting: Predict revenue and capacity requirements
- Warehouse Expansion ROI: Investment analysis for new facilities
- Route Optimization: Cost and time efficiency improvements
- Interactive data visualizations
- Key performance indicators (KPIs)
- Regional performance breakdowns
- Trend analysis and forecasting
- Custom metrics and filters
- Financial metrics (revenue, costs, profit margins)
- Logistics performance (shipments, delivery times, fuel costs)
- Sales analytics (products, regions, customer segments)
- AI-generated insights and recommendations
- S3: Data lake and static website hosting
- Lambda: Serverless compute (Python 3.11)
- API Gateway: HTTP API v2 & REST API
- DynamoDB: Session management and caching
- Athena: Serverless SQL queries
- Glue: Data catalog and ETL
- CloudWatch: Logging and monitoring
- Frontend: React 18, TypeScript, TailwindCSS, Recharts
- Backend: Python 3.11, AWS Lambda
- AI/ML: Airia AI platform with custom pipelines
- Infrastructure: AWS CDK (TypeScript)
Base URL: https://aij9r8sc8i.execute-api.us-east-1.amazonaws.com
POST /chat- AI Chat interface (Airia pipeline: 0e2a6599)POST /chat-with-data- Data-aware chat (Airia pipeline: 70ef9a9d)
Base URL: https://h3qy1xq5kh.execute-api.us-east-1.amazonaws.com/prod/api
GET /data?type=overview- Business overview metricsGET /data?type=trends- Trend data for chartsGET /data?type=costs- Cost analysis by routePOST /simulate- Run business simulations
The platform includes enhanced sample datasets:
- finance.csv: Revenue, costs, profit by date, region, department
- logistics.csv: Shipment data with carriers, routes, costs, fuel prices
- sales.csv: Product sales with categories, channels, forecasts
- customers.csv: Customer segments and demographics
- inventory.csv: Stock levels and warehouse data
Both chat features use Airia with specialized pipelines:
AI Chat Tab:
- Pipeline ID:
0e2a6599-9c5f-40ac-9a39-456a53b7d935 - Purpose: General business questions and analysis
- Timeout: 90 seconds
Chat with Data Widget:
- Pipeline ID:
70ef9a9d-5eb5-44e8-873b-e8060f024791 - Purpose: Data-specific queries and insights
- Timeout: 90 seconds
API Credentials: Configured in Lambda environment variables via CDK
Lambda functions automatically configured with:
AIRIA_API_KEY: Airia authentication keyAIRIA_USER_ID: User identification for pipeline executionATHENA_DATABASE: Data catalog database nameATHENA_WORKGROUP: Query execution workgroup
cd frontend
npm install
npm startThe development server will proxy API requests to your deployed endpoints.
cd infrastructure
npm install
npm run build
cdk diff # Preview changes
cdk deploy # Deploy changes# Test all API endpoints
./test-endpoints.sh
# Test chat features specifically
./test-both-airia.sh
# Comprehensive API testing
./comprehensive-test.sh# Watch Lambda logs
aws logs tail /aws/lambda/insights-grid-bedrock --follow
aws logs tail /aws/lambda/insights-grid-airia-chat --follow
# Check API Gateway metrics
aws cloudwatch get-metric-statistics \
--namespace AWS/ApiGateway \
--metric-name Count \
--dimensions Name=ApiId,Value=aij9r8sc8i \
--start-time 2025-10-26T00:00:00Z \
--end-time 2025-10-26T23:59:59Z \
--period 3600 \
--statistics Sum- Answers in seconds, not weeks
- Real-time data processing
- Instant what-if scenario analysis
- Automated insight generation
- Predicts and prevents costly decisions
- Identifies optimization opportunities
- Reduces manual analysis time by 70%+
- Pay-per-use serverless architecture
- Handles enterprise-scale data
- Auto-scaling based on demand
- No infrastructure management
- Global availability
Monthly operational costs for mid-size company:
- Lambda: $50-100
- S3: $20-50
- Athena: $30-80
- DynamoDB: $20-40
- Airia AI: $100-300
- API Gateway: $10-30
Total: ~$230-600/month with 10x+ ROI potential
- IAM roles with least privilege access
- S3 bucket encryption at rest
- API Gateway authentication ready
- CORS configured for frontend origin
- Environment variables for secrets
- CloudWatch audit logging
Issue: Requests timeout after 29-30 seconds
Cause: API Gateway has 29s (REST API) / 30s (HTTP API) hard limits
Solutions:
- Simplify query complexity
- Check Airia pipeline performance
- Review CloudWatch logs for Airia 500 errors
Issue: Endpoints return 404 Not Found
Solution:
cd infrastructure
cdk deploy --forceIssue: Dashboard shows loading indefinitely
Check:
- Browser console for API errors
- API Gateway endpoints are deployed
- Lambda functions are active
- S3 data files are uploaded
Issue: "Internal Server Error" from Airia
Solutions:
- Check Airia pipeline status at https://api.airia.ai/
- Verify pipeline IDs in Lambda environment variables
- Check Airia API key hasn't expired
- Review CloudWatch logs for detailed errors
Issue: CDK deploy errors
Common Fixes:
# Clear CDK cache
cd infrastructure
rm -rf cdk.out/
npm run build
cdk bootstrap # If first time
cdk deploy- DEPLOYMENT.md: Detailed deployment guide and configuration
- ARCHITECTURE.md: Deep dive into system architecture and data flows
- TROUBLESHOOTING.md: Comprehensive problem-solving guide
To destroy all AWS resources:
cd infrastructure
cdk destroy --all- All Lambda functions
- API Gateway endpoints
- S3 buckets and data
- Athena workgroups
- CloudWatch logs
- Factory performance simulations
- Supply chain optimization
- Capacity planning
- Cost impact analysis
- Inventory management
- Sales forecasting
- Regional performance analysis
- Customer behavior insights
- Route optimization
- Fuel cost management
- Delivery performance tracking
- Warehouse expansion planning
- Revenue forecasting
- Cost optimization
- Budget impact analysis
- Profitability modeling
- Real-time IoT data integration
- Advanced ML models for predictions
- Multi-tenant support with Cognito
- Mobile application
- WebSocket real-time updates
- Advanced visualization features
- Custom data source connectors
- API rate limiting and caching
- CloudFront CDN distribution
- Custom domain with HTTPS
This project is for educational and demonstration purposes.
This is a hackathon project. For questions or improvements, please open an issue or submit a pull request.
For issues or questions:
- Check CloudWatch logs for errors
- Review TROUBLESHOOTING.md
- Verify AWS permissions
- Check deployment script output
- Review API endpoint status
Built with AWS Serverless Stack
Powered by Airia AI β’ React β’ AWS CDK
Last Updated: October 2025