Repository navigation
QUICKSTART_MICROSERVICES
github-actions[bot] edited this page Aug 1, 2026
·
4 revisions
⚠️ Historical (W30, 2026-07). This document describes the vendoredfeatures/ai-classroom/studyArenamicroservice, which was removed. The live implementation is native underserver/services/study-arena/(see study-arena-inspired-by-openmaic.md) and attribution is at OpenMAIC-ATTRIBUTION.md. Kept for historical reference only.
# Run setup script
bash scripts/setup-services.sh
# This creates:
# - services/iniclaw/
# - Dockerfiles and package.json files# IniClaw is already in this repo — no copy needed
# features/ai-classroom/ini_claw/ is the built-in LLM gateway# Copy and edit .env
cp .env.example .env
# Generate BRIDGE_SECRET
openssl rand -hex 32 # Copy this value to BRIDGE_SECRET in .env
# Fill in Firebase credentials
# Fill in OpenAI API key
# Fill in MongoDB password# With Docker (recommended)
docker compose up
# Without Docker (2 terminals)
# Terminal 1: EduAI app (includes native Study Arena — no extra process needed)
npm run dev
# Terminal 2 (optional): IniClaw LLM gateway
cd features/ai-classroom/ini_claw && BRIDGE_SECRET=<secret> INICLAW_PORT=7070 node gateway.js# EduAI (always required)
curl http://localhost:5001/api/health
curl http://localhost:5001/api/ai-classroom/health # native Study Arena
# Optional services
curl http://localhost:4000/api/health # IniClaw (services/iniclaw, Docker)
curl http://localhost:7070/health # IniClaw (local dev gateway)
# Access the apps
# - EduAI + AI Classroom: http://localhost:5001
# - EduAI + AI Classroom: http://localhost:5001/ai-classroom
# - IniClaw gateway: http://localhost:5001/gateway (via Nginx)- EduAI (React + Express + native Study Arena) on port 5001
-
IniClaw (
services/iniclaw— production gateway) on port 4000 -
IniClaw (
features/ai-classroom/ini_claw— local dev gateway) on port 7070 - MongoDB on port 27017
- Cassandra on port 9042
- Redis on port 6379
- Nginx reverse proxy on port 80
- Firebase JWT tokens validated by EduAI
- Automatic user sync between Firebase and MongoDB
- Gateway events stored in MongoDB
- Analytics tracked for study plan generation
-
/→ EduAI main app -
/api/*→ EduAI backend -
/gateway/*→ IniClaw agent gateway
curl -X POST http://localhost:5001/api/ai-classroom/create \
-H "Authorization: Bearer <jwt>" \
-H "Content-Type: application/json" \
-d '{
"topic": "Calculus",
"sceneTypes": ["slides", "quiz"]
}'
# Returns: { "jobId": "abc123", "status": "generating" }curl http://localhost:5001/api/ai-classroom/status/abc123 \
-H "Authorization: Bearer <jwt>"curl http://localhost:5001/api/ai-classroom/my-classrooms \
-H "Authorization: Bearer <jwt>"# Check Docker is running
docker ps
# Check logs
docker compose logs -f
# Rebuild images
docker compose build --no-cache# Verify Firebase credentials in .env
echo $VITE_FIREBASE_PROJECT_ID
# Check token verification
curl -H "Authorization: Bearer <token>" http://localhost:5001/api/auth/me# Verify BRIDGE_SECRET is set
echo $BRIDGE_SECRET
# Check webhook logs
docker compose logs iniclaw-gateway | grep webhook# Find process using port
lsof -i :5001
# Kill process
kill -9 <PID>
# Or change port in .env
PORT=5002 docker compose upSee docs/MICROSERVICES_INTEGRATION.md for:
- Complete architecture overview
- Phase-by-phase implementation guide
- API endpoint documentation
- Webhook event specifications
- Security best practices
- Production deployment guide
- ✅ Services initialized
- ✅ Docker Compose configured
- ✅ Native Study Arena replaces external dependency for core classroom generation
- ✅ IniClaw rewritten as lightweight LLM proxy (zero npm dependencies)
- ✅ 25/25 API integration tests passing
- ⏳ Deploy to production
- Use
docker compose logs -f <service>to debug specific services - Services communicate via internal Docker network (no localhost needed)
- Nginx handles routing and SSL termination in production
- All services share Firebase authentication
- MongoDB stores all application data
- Cassandra stores high-volume message data
- Check logs:
docker compose logs -f - Verify environment:
cat .env | grep -E "FIREBASE|BRIDGE|MONGO" - Test health endpoints:
curl http://localhost:5001/api/health - Review integration guide:
docs/MICROSERVICES_INTEGRATION.md
Ready to go! 🎉 Your microservices are now orchestrated and ready for development.