EcoLafaek Public Dashboard β

A comprehensive public web dashboard showcasing Amazon Bedrock AgentCore autonomous AI agent capabilities for waste management in Timor-Leste. This dashboard demonstrates real-time AI chat with multi-round tool calling, semantic vector search, and interactive data visualization.
π€ AI Agent Integration: β
- AgentCore AI Chat: Natural language interface with autonomous tool execution
- Multi-Round Tool Calling: Agent chains SQL queries β Chart generation β Map creation
- Vector Search: Amazon Titan Embed powered semantic similarity search
- Real-time Analytics: Interactive data visualization and reporting
For detailed AI agent architecture, see Backend README and Architecture Diagram.
π Key Features β
- π€ AI Chat Helper: Interact with AgentCore autonomous agent for data insights and chart generation
- π Vector Search: Semantic search powered by Amazon Titan Embed (1024-dimensional embeddings)
- πΊοΈ Interactive Maps: Geospatial visualization of waste reports and hotspots
- π Real-time Analytics: Monitor waste management metrics with customizable date ranges
- π Data Visualization: Charts, graphs, and trends powered by AgentCore Code Interpreter
- π Community Leaderboard: Recognize top contributors
π₯οΈ Live Demo β
Visit: https://www.ecolafaek.com

ποΈ Technical Stack β
Frontend β
- Framework: Next.js 15 (React 18)
- Language: TypeScript 5.0+
- Styling: Tailwind CSS 3.0+
- Maps: Leaflet.js
- Charts: Chart.js, Tremor Charts
Backend Integration β
- API: Next.js API Routes (Serverless)
- AI Agent: Amazon Bedrock AgentCore (via FastAPI backend proxy)
- Vector Search: Amazon Titan Embed + SQL database
- Authentication: API Key-based
- Deployment: Vercel Edge Functions
AI Services (via Backend) β
- Amazon Bedrock Nova-Pro: Multi-modal reasoning and tool orchestration
- Amazon Bedrock AgentCore: Autonomous code execution and browser automation
- Amazon Titan Embed: Vector embeddings for semantic search
π Project Structure β
ecolafaek_public_dashboard/
βββ pages/
β βββ index.js # Dashboard homepage
β βββ agentcore-chat.js # AI Agent chat interface
β βββ vector-search.js # Semantic search page
β βββ reports.js # Reports listing
β βββ map.js # Interactive map view
β βββ api/
β βββ chat.js # Proxy to FastAPI AgentCore chat
β βββ contact.js # Contact form handler
β βββ proxy-image.js # Image proxy for CORS
βββ components/
β βββ Dashboard/ # Dashboard widgets
β βββ Maps/ # Map components
β βββ Charts/ # Chart components
β βββ Layout/ # Layout components
βββ lib/
β βββ db.js # Database connection
β βββ bedrock.js # Amazon Bedrock client
β βββ utils.js # Helper functions
βββ public/
βββ scs/ # Screenshotsπ Getting Started β
Prerequisites β
- Node.js 18+ and npm
- Access to backend API (www.ecolafaek.xyz)
Installation β
- Clone the repository:
git clone https://github.com/ajitonelsonn/EcoLafaek.git
cd EcoLafaek/ecolafaek_public_dahboard- Install dependencies:
npm install- Create
.env.localfile:
# Backend API
NEXT_PUBLIC_API_URL=https://www.ecolafaek.xyz
# Database (for direct queries from Next.js API routes)
DB_HOST=your-database-host
DB_PORT=4000
DB_USER=your-db-user
DB_PASSWORD=your-db-password
DB_NAME=your-db-name
# AWS Bedrock (for vector search API route)
AWS_ACCESS_KEY_ID=your-aws-key
AWS_SECRET_ACCESS_KEY=your-aws-secret
AWS_REGION=us-east-1
# Google reCAPTCHA (for chat protection)
NEXT_PUBLIC_RECAPTCHA_SITE_KEY=your-site-key
RECAPTCHA_SECRET_KEY=your-secret-key- Run development server:
npm run devBuild for Production β
npm run build
npm startπ Key Pages β
1. AgentCore AI Chat (/agentcore-chat) β
- Natural language queries to autonomous AI agent
- Multi-round tool calling (SQL β Charts β Maps β Web Scraping)
- Real-time chart/map generation via AgentCore Code Interpreter
- PDF export of conversation history
- reCAPTCHA protection
Example Queries:
- "Show me waste trends over the last month"
- "Create a map of high-severity hotspots"
- "Generate a pie chart of waste types"
2. Vector Search (/vector-search) β
- Semantic similarity search using Amazon Titan Embed embeddings
- Find similar waste reports based on image/text content
- Cosine similarity matching
3. Reports (/reports) β
- Browse all waste reports with filtering
- Direct database queries from Next.js API routes
- Pagination and search
4. Interactive Map (/map) β
- Geospatial visualization
- Hotspot clustering
- Real-time updates
π API Routes β
| Endpoint | Purpose | Integration |
|---|---|---|
/api/chat | Proxy AgentCore chat to backend | FastAPI + Bedrock AgentCore |
/api/contact | Contact form submissions | Email service |
/api/proxy-image | CORS-safe image proxy | S3 images |
π Security Features β
- reCAPTCHA v2: Bot protection for AI chat
- Rate Limiting: 30 requests/minute per IP
- API Key Authentication: Secure backend communication
- CORS Configuration: Restricted origins
- Session Management: 5-minute chat token validity
π’ Deployment (Vercel) β
This dashboard is deployed on Vercel with automatic deployments from Git:
# Automatic deployment on push to main branch
git push origin mainLive URL: https://www.ecolafaek.com
Environment Variables (Vercel) β
Configure all .env.local variables in Vercel dashboard under Project Settings β Environment Variables.
π For Judges β
Testing the Dashboard: β
- Visit: https://www.ecolafaek.com
- Try AI Chat: Navigate to "Agent Chat" and ask questions like:
- "Show waste type distribution chart"
- "Create a map of hotspots"
- "How many reports were submitted this month?"
- Vector Search: Try semantic search for similar waste reports
- Explore Maps: Interactive geospatial visualization
Key Features to Review: β
β Autonomous AI agent with multi-round tool calling β Real-time chart generation via AgentCore Code Interpreter β Semantic vector search with Amazon Titan Embed β Clean, responsive UI with real production data
π Additional Documentation β
- π± Mobile App: ../ecolafaek/README.md
- β‘ Backend API: ../mobile_backend/README.md
- π¨βπΌ Admin Panel: ../ecolafaek_admin_panel/README.md
- ποΈ Database Schema: ../database/README.md
- π System architecture: ../Diagram/README.md
- π Main Project: ../README.md
Built with β€οΈ for Timor-Leste | AWS AI Agent Global Hackathon
Powered by Amazon Bedrock AgentCore