This application consists of:
- API: Express.js server with ChromaDB vector search
- Client: React + Vite frontend with Arabic/English hadith search
- ChromaDB: Vector database for semantic embeddings
# Start all services
docker-compose up --build
# Access:
# - Client: http://localhost:80
# - API: http://localhost:3000
# - ChromaDB: http://localhost:8000- Push code to GitHub
- Connect your repo to Render via the
render.yamlblueprint - Set environment variables in Render dashboard:
COHERE_API_KEY(required)VITE_GEMINI_KEY(for client translation)
-
API Service:
- Create Web Service
- Build:
npm install - Start:
node src/index.js - Env:
COHERE_API_KEY,CHROMA_URL(if using Chroma Cloud)
-
ChromaDB:
- Create Web Service with Docker
- Use
Dockerfile.chroma - Or use Chroma Cloud and set
CHROMA_URL
-
Client:
- Create Static Site
- Root directory:
client - Build:
npm install && npm run build - Publish:
dist - Env:
VITE_API_URL=https://your-api.onrender.com/api
COHERE_API_KEY=your_key_here
CHROMA_HOST=chroma # for docker, or use CHROMA_URL for cloud
CHROMA_PORT=8000
VITE_GEMINI_KEY=your_key_here # For Arabic translation
VITE_API_URL=/api # or full URL for separate deployment
├── src/ # API source
├── client/ # React frontend
│ ├── src/
│ ├── Dockerfile
│ └── nginx.conf
├── data/ # Hadith dataset
├── docker-compose.yml # Local development
├── Dockerfile # API Dockerfile
├── Dockerfile.chroma # ChromaDB Dockerfile
├── Dockerfile.render # Combined production build
├── render.yaml # Render deployment blueprint
└── render-nginx.conf # Nginx config for combined deployment