A production-ready social analytics API built with Go + Inngest + Redis Cloud + React. Real-time cryptocurrency sentiment analysis with enterprise-grade architecture.
π Frontend Dashboard: View Live Demo
π§ API Health Check: Backend Status
π Real-time Metrics: 11 cryptocurrency social sentiment indicators
β οΈ Note: Backend uses Render's free tier - first request may take 30-60 seconds to wake up from sleep after 15 minutes of inactivity.
graph TD
A[LunarCrush API] --> B[Inngest Background Jobs]
B --> C[Redis Cloud Cache]
C --> D[React Dashboard]
- β‘ High Performance: Go backend with Redis Cloud caching (3-5 second response times)
- π€ AI-Ready: LunarCrush API integration for seamless AI assistant access
- π Background Processing: Inngest workflows with error recovery and retries
- π Real-time Analytics: 11 cryptocurrency social sentiment metrics
- π‘οΈ Production Ready: Comprehensive error handling and graceful degradation
- ποΈ Go 1.24 - High-performance API server with Gin framework
- π΄ Redis Cloud - Cloud-hosted Redis with 15-minute TTL caching
- βοΈ Inngest - Background job processing with error recovery
- π LunarCrush API - For latest cryptocurrency social analytics
- βοΈ Render - Backend deployment platform (free tier with cold starts)
- βοΈ Next.js 14 - React framework with TypeScript
- π¨ Tailwind CSS - Utility-first styling with custom color palette
- π§© Radix UI - Accessible component primitives
- π‘ TanStack Query - Server state management with caching
- π― TypeScript - Full type safety across the application
- βοΈ Vercel - Frontend deployment platform
- Redis Cloud - Managed Redis hosting (30MB free tier)
- Render - Go backend hosting (free tier with sleep mode)
- Vercel - React frontend hosting (permanent free tier)
- Inngest - Background job orchestration (free tier)
- Go 1.24+ - Download Go
- Node.js 18+ - Download Node.js
- Redis (local) or Redis Cloud account
# Clone the repository
git clone https://github.com/danilobatson/crypto-rankings.git
cd crypto-rankings
# Setup environment variables
cp .env.example .env
# Edit .env with your API keys (see setup guide below)
# Terminal 1: Start Go Backend
cd server
go mod tidy
go run main.go
# Terminal 2: Start React Frontend
cd frontend
npm install
npm run devπ Access Dashboard: http://localhost:3001 π§ API Health: http://localhost:8080/health
- Sign up: LunarCrush Developers
- Subscribe: Choose any plan to generate API keys
- Generate Key: Visit API Authentication
- Sign up: Redis Cloud
- Create Database: Choose free 30MB tier
- Get Connection: Copy host, port, and password
- Sign up: Inngest Cloud
- Create App: Get your Event Key and Signing Key
- Development: Use Inngest Dev Server for local development
# .env file
# Redis Cloud
REDIS_URL=redis://default:password@your-redis-host:port
# LunarCrush API
LUNARCRUSH_API_KEY=lc_your_api_key_here
# Inngest Configuration
INNGEST_EVENT_KEY=your_inngest_event_key
INNGEST_SIGNING_KEY=your_inngest_signing_key
INNGEST_DEV_URL=http://localhost:8080/api/inngest
# Application
PORT=8080
NODE_ENV=development| Endpoint | Method | Description | Response Time |
|---|---|---|---|
/health |
GET | System health check | ~50ms |
/api/crypto/data |
GET | Complete analytics data | ~3-5s |
/dev/trigger |
POST | Manual data refresh | ~5-10s |
/api/crypto/info |
GET | Available metrics info | ~50ms |
{
"timestamp": "2025-06-26T15:30:00Z",
"total_metrics": 11,
"all_metrics": {
"market_cap": {
"name": "Market Cap",
"success": true,
"data_count": 10,
"all_data": [
{
"name": "Bitcoin",
"symbol": "BTC",
"value": "$1,981,409,972,282"
}
],
"fetch_time_ms": 3247
}
},
"fetch_stats": {
"successful_fetches": 10,
"failed_fetches": 1,
"total_duration_ms": 12453
}
}crypto-rankings/
βββ server/ # Go Backend
β βββ main.go # API server with 11 metrics
β βββ go.mod # Go dependencies
β βββ go.sum # Dependency checksums
β βββ .env # Environment variables
βββ frontend/ # React Frontend
β βββ src/
β β βββ app/ # Next.js app directory
β β β βββ page.tsx # Main dashboard component
β β β βββ globals.css # Soft, eye-friendly styling
β β β βββ layout.tsx # App layout
β β βββ components/ # Reusable UI components
β βββ package.json # Frontend dependencies
β βββ tailwind.config.js # Styling configuration
βββ .env.example # Environment template
βββ README.md # This file
The backend is deployed on Render's free tier:
- URL:
https://crypto-rankings.onrender.com - Cold Start: ~30-60 seconds after 15 minutes of inactivity
- Performance: Fast once warmed up (3-5 second API responses)
Deployment Steps:
- Connect GitHub repository to Render
- Configure build settings:
- Root Directory:
server - Build Command:
go build -o main ./main.go - Start Command:
./main
- Root Directory:
- Add environment variables in Render dashboard
- Deploy automatically on git push
The frontend is deployed on Vercel:
- URL:
https://crypto-rankings.vercel.app/ - Performance: Fast global CDN delivery
- Auto-deploy: On git push to main branch
Deployment Steps:
-
Connect GitHub repository to Vercel
-
Configure build settings:
- Framework: Next.js
- Root Directory:
frontend - Build Command:
npm run build
-
Add environment variables:
NEXT_PUBLIC_API_URL=https://crypto-rankings.onrender.com
-
Deploy automatically on git push
- API Response Time: 3-5 seconds (with Redis cache hits: <100ms)
- Memory Usage: ~50MB base + 10MB per 1000 requests
- Throughput: 1000+ requests/second on modest hardware
- Cold Start: 30-60 seconds (Render free tier limitation)
- Redis TTL: 15 minutes for crypto data
- Background Jobs: Inngest updates data every 5 minutes
- Browser Cache: 5 minutes for API responses
# Health check
curl https://crypto-rankings.onrender.com/health
# Data endpoint (may take 30-60s on first request if sleeping)
curl https://crypto-rankings.onrender.com/api/crypto/data
# Manual trigger
curl -X POST https://crypto-rankings.onrender.com/dev/trigger# Backend testing
cd server
go run main.go
# Frontend testing
cd frontend
npm run dev
# Test API endpoints
curl http://localhost:8080/health
curl http://localhost:8080/api/crypto/data# Start Redis (if running locally)
redis-server
# Backend development (with hot reload using Air)
cd server && air
# or server/main.go
# Frontend development
cd frontend && npm run dev- Go:
gofmt,go vet, proper error handling - TypeScript: ESLint, Prettier, strict mode
- Commit Hooks: Pre-commit formatting and linting
- Frontend: https://crypto-rankings.vercel.app/
- Backend API: https://crypto-rankings.onrender.com
- Health Check: https://crypto-rankings.onrender.com/health
- Source Code: https://github.com/danilobatson/crypto-rankings
- Go Documentation - Backend language
- Redis Documentation - Caching layer
- Inngest Docs - Background job processing
- Next.js Guide - React framework
- Tailwind CSS - Styling framework
- Render Documentation - Backend deployment
- Vercel Documentation - Frontend deployment
- Redis Cloud - Managed Redis
- LunarCrush API - Social data source
- Sleep Mode: Service sleeps after 15 minutes of inactivity
- Wake Time: 30-60 seconds to respond to first request
- Bandwidth: 100GB/month
- Build Time: 500 build minutes/month
Consider upgrading to:
- Render Starter Plan: $7/month for always-on service
- Alternative Platforms: Google Cloud Run, AWS Lambda, Fly.io
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and test thoroughly
- Commit with conventional commits:
feat: add real-time updates - Push and create a Pull Request
- Go: Follow effective Go guidelines
- TypeScript: Strict mode, explicit return types
- Commits: Conventional commits format
- Documentation: Update README for new features
- LunarCrush - Real-time crypto social sentiment data
- Inngest - Background job processing platform
- Vercel - Frontend deployment and hosting
- Render - Backend deployment platform
- Redis Cloud - Managed Redis hosting
MIT License - see LICENSE file for details.
π Built with β€οΈ for the modern web
β Star this repo β’ π Report Bug β’ β¨ Request Feature
Demonstrates full-stack development, cloud architecture, real-time data processing, and modern UI/UX design.