A production-ready serverless analytics system that processes e-commerce events in real-time, performs intelligent data aggregation, and visualizes business insights through an interactive dashboard.
Dashboard: https://real-time-analytics-2a54015ca-jahnavikedias-projects.vercel.app
API Endpoint: https://izob8k3keg.execute-api.us-east-1.amazonaws.com/prod/dashboard/summary
This full-stack application demonstrates expertise in cloud architecture, real-time data processing, and modern web development. It simulates and analyzes e-commerce user behavior, providing actionable business intelligence metrics.
- 679 product views processed and analyzed
- 169 cart additions tracked
- 69 purchases completed
- 10.16% conversion rate calculated
- 59.17% cart abandonment rate measured
- Sub-200ms API response time achieved
βββββββββββββββββββ
β Event Generator β β Simulates e-commerce events
ββββββββββ¬βββββββββ
β
ββββββββββββββββββ
β Kinesis Stream β β Real-time event streaming
ββββββββββ¬ββββββββ
β
βββββββββββββββββββ
βStream Processor β β Aggregates & processes data
ββββββββββ¬βββββββββ
β
ββββββββββββββββ
β DynamoDB β β Stores raw events + analytics
ββββββββ¬ββββββββ
β
βββββββββββββββ
β Query Lambdaβ β REST API for data retrieval
ββββββββ¬βββββββ
β
ββββββββββββββββ
β API Gateway β β HTTP endpoints
ββββββββ¬ββββββββ
β
ββββββββββββββββββββ
β React Dashboard β β Interactive visualizations
β (Vercel) β
ββββββββββββββββββββ
- AWS Lambda - Serverless compute (3 functions)
- Amazon DynamoDB - NoSQL database for events & analytics
- Amazon Kinesis - Real-time data streaming
- API Gateway - RESTful API endpoints
- CloudWatch - Monitoring & logging
- IAM - Security & permissions
- React - UI framework
- Recharts - Data visualization
- Tailwind CSS - Styling
- Framer Motion - Animations
- Axios - API calls
- Vercel - Deployment & hosting
- Python 3.11 - Backend logic
- Node.js/npm - Frontend tooling
- Git/GitHub - Version control
- AWS CLI - Infrastructure management
- β Event-driven architecture with automatic processing
- β Sub-second latency from event generation to visualization
- β Automatic data aggregation (hourly, daily, by category)
- β Atomic counter updates for data consistency
- π Conversion Rate: Measures purchase effectiveness (purchases Γ· views)
- π Cart Abandonment Rate: Tracks lost sales opportunities
- π Category Performance: Identifies top-performing product categories
- π° Revenue Tracking: Monitors total sales and trends
- π¨ Beautiful gradient UI with glass-morphism effects
- π± Fully responsive (desktop, tablet, mobile)
- π Auto-refresh every 30 seconds
- β¨ Animated number counters and smooth transitions
- π Interactive charts with hover tooltips
- π― Real-time data from live API
Base URL: https://izob8k3keg.execute-api.us-east-1.amazonaws.com/prod
GET /dashboard/summary
Returns aggregated metrics with business intelligence calculations.
Response:
{
"success": true,
"data": {
"total_events": 930,
"metrics": {
"product_view": 679,
"add_to_cart": 169,
"purchase": 69,
"remove_from_cart": 13
},
"conversion_rate": 10.16,
"cart_abandonment_rate": 59.17
}
}GET /dashboard/categories
Returns performance metrics by product category.
Response:
{
"success": true,
"data": {
"all_time": true,
"categories": {
"Electronics": 350,
"Sports": 220,
"Home": 109
}
}
}GET /metrics/{metric_type}
Returns historical data for a specific metric across all dates.
Example:
GET /metrics/product_view_count
GET /metrics/{metric_type}/{date}
Returns metric data for a specific date.
Example:
GET /metrics/purchase_count/2025-11-14
Table: raw-events
- Partition Key:
event_id(String) - Sort Key:
timestamp(Number) - Purpose: Stores complete event details for audit trail
Event Types:
product_view- User views a productadd_to_cart- User adds product to cartpurchase- User completes purchaseremove_from_cart- User removes item from cart
Table: analytics
- Partition Key:
metric_type(String) - Sort Key:
time_window(String) - Purpose: Pre-aggregated metrics for fast queries
Metric Types:
product_view_count- Daily/hourly view countspurchase_count- Daily/hourly purchase countscategory_{name}- Category-specific metricsproduct_{id}- Product-specific metricspurchase_revenue- Revenue tracking
AWS Free Tier Coverage:
| Service | Free Tier | Usage | Cost |
|---|---|---|---|
| Lambda | 1M requests/month | ~1K/month | $0 |
| DynamoDB | 25GB storage | ~0.1GB | $0 |
| API Gateway | 1M calls/month (12 months) | ~500/month | $0 |
| CloudWatch | 5GB logs | ~0.1GB | $0 |
After Free Tier (Year 2+):
- Estimated: $0.50-2/month for portfolio use
- Can be reduced to $0 using cleanup script
Vercel:
- Free tier: Unlimited for personal projects
- Cost: $0 forever
To delete all AWS resources and return to $0/month:
cd ~/realtime-analytics-platform
./cleanup.shWhat gets deleted:
- All Lambda functions
- API Gateway
- DynamoDB tables
- Kinesis stream (if exists)
- IAM roles and policies
- CloudWatch alarms
What stays:
- Frontend on Vercel (continues working with static data)
- GitHub repository
- Local code
- API Response Time: 150-200ms average
- Event Processing Latency: <1 second
- Dashboard Load Time: <2 seconds
- Auto-refresh Interval: 30 seconds
- Concurrent Users Supported: 1000+ (auto-scaling)
- Designed event-driven serverless architecture
- Implemented microservices pattern with Lambda
- Configured cross-service IAM permissions
- Set up monitoring and billing alarms
- Built real-time streaming pipeline with Kinesis
- Designed efficient NoSQL schema with composite keys
- Implemented atomic aggregations for data consistency
- Optimized query patterns for sub-200ms response times
- Created RESTful API with proper HTTP methods
- Built responsive React dashboard with animations
- Implemented real-time data synchronization
- Deployed to production with CI/CD
- Infrastructure as Code principles
- Git version control and branching
- Environment variable management
- Cost optimization strategies
- AWS Account with CLI configured
- Node.js 16+ and npm
- Python 3.11+
- Git
# Clone repository
git clone https://github.com/jahnavikedia/realtime-analytics-platform.git
cd realtime-analytics-platform
# Deploy AWS infrastructure
# (Follow deployment steps in documentation)
# Test API
curl https://your-api-id.execute-api.us-east-1.amazonaws.com/prod/dashboard/summary# Navigate to frontend
cd frontend
# Install dependencies
npm install
# Start development server
npm start
# Build for production
npm run build
# Deploy to Vercel
vercel --prodIssue: Dashboard shows zeros Solution: Update Query Lambda to aggregate all-time data instead of just today
Issue: Browser blocks API calls
Solution: Verify Access-Control-Allow-Origin: * header in Lambda response
Issue: npm run build gets stuck
Solution: Use Vercel cloud build instead: vercel --prod
Issue: Function execution exceeds 60 seconds Solution: Increase timeout or optimize query logic
-
Advanced Analytics
- User cohort analysis
- Funnel visualization
- Revenue forecasting with ML
-
Performance Optimization
- ElastiCache Redis for hot data
- GraphQL API for flexible queries
- WebSocket for real-time updates
-
Additional Features
- User authentication with Cognito
- Custom date range filtering
- Export data to CSV/PDF
- Email alerts for anomalies
-
Infrastructure
- Multi-region deployment
- Automated backups
- Blue-green deployments
- Load testing automation
realtime-analytics-platform/
βββ lambda/
β βββ event-generator/ # Simulates e-commerce events
β β βββ lambda_function.py
β β βββ lambda_function.zip
β βββ stream-processor/ # Processes Kinesis stream
β β βββ lambda_function.py
β β βββ lambda_function.zip
β βββ api/ # Query API endpoints
β βββ lambda_function.py
β βββ lambda_function.zip
βββ frontend/ # React dashboard
β βββ public/
β βββ src/
β β βββ components/
β β β βββ Dashboard.js
β β βββ services/
β β β βββ api.js
β β βββ App.js
β β βββ index.js
β βββ package.json
β βββ tailwind.config.js
βββ infrastructure/
β βββ lambda-trust-policy.json
βββ cleanup.sh # Resource cleanup script
βββ DEPLOYMENT_INFO.md # Deployment reference
βββ PROJECT_SUMMARY.md # Project summary
βββ API_INFO.md # API documentation
βββ README.md # This file
1. Event Generator
- Purpose: Simulates realistic e-commerce user behavior
- Trigger: Manual invocation
- Output: 10 events per invocation
- Products: 8 different products across 3 categories
- Event Distribution: 70% views, 20% cart adds, 8% purchases, 2% removals
2. Stream Processor
- Purpose: Processes Kinesis events and updates analytics
- Trigger: Kinesis Data Stream
- Batch Size: Up to 10 records
- Operations: Saves raw events, updates aggregated metrics
- Concurrency: Supports parallel processing with atomic counters
3. Query API
- Purpose: Exposes analytics data via REST endpoints
- Trigger: API Gateway HTTP requests
- Response Format: JSON with CORS headers
- Features: Conversion rate calculation, all-time aggregations
DynamoDB Composite Keys:
- Enables efficient queries by metric type and time range
- Supports both specific date queries and time-series analysis
- Atomic counters prevent race conditions in concurrent updates
Query Patterns:
# Get specific metric for specific date
get_item(partition_key="product_view_count", sort_key="2025-11-14")
# Get all dates for a metric (time series)
query(partition_key="product_view_count")
# Get category performance
query(partition_key="category_Electronics")Jahnavi Kedia
- GitHub: @jahnavikedia
- Email: jahnavikedia91@gmail.com
- AWS Free Tier for making cloud learning accessible
- Vercel for seamless frontend deployment
- React and Recharts communities for excellent documentation
- Open source contributors for the libraries used
- AWS Services Used: 7
- API Endpoints: 4
- Events Processed: 679+
- Deployment Platforms: 2 (AWS, Vercel)
Built by Jahnavi Kedia