Modern lesson authoring and management system with multi-language support, embeddable widget, and event-based workflow.
# 1. Configure environment
cp .env.example .env
# 2. Start services
docker compose -f docker-compose.local.yml up --build
# 3. Access services
# Frontend: http://localhost:3000
# Backend: http://localhost:8080
# Widget: http://localhost:3000/widget/widget.js# 1. Copy files to server
rsync -avz --exclude 'node_modules' --exclude '.next' \
./ root@10.66.1.76:/root/study-material-service/
# 2. SSH and configure
ssh root@10.66.1.76
cd /root/study-material-service
cp .env.production .env
nano .env # Edit with your settings
# 3. Build and start
docker compose build
docker compose up -d
docker compose logs -fπ Complete instructions: docs/DOCKER.md
- Docker Deployment Guide - Complete setup for local & production
- Configuration Reference - All environment variables and settings
- Widget Integration - Embed study materials on external sites
- Event Management - Create and manage study events
- Templates System - Template configuration
- Architecture Notes - System design and structure
- POC Documentation - Proof of concept details
π Full documentation index: docs/README.md
- β Create events (lessons, congresses, meals, lectures)
- β Multi-language support (8 languages)
- β Drag-and-drop reordering
- β Duplicate and delete events
- β Public/Private toggle
- β Multiple content types (video, excerpts, transcripts, documents)
- β Source integration with Kabbalahmedia API
- β Template-based organization
- β Custom links per section
- β Standalone JavaScript widget
- β Events list or single event view
- β Inline or fixed positioning
- β Multi-language support
| Layer | Technology |
|---|---|
| Backend | Go 1.25, Gorilla Mux, MongoDB |
| Frontend | Next.js 16, React 18, TypeScript, Tailwind CSS |
| Widget | Standalone JavaScript (esbuild) |
| Infrastructure | Docker, Docker Compose |
study-material-service/
βββ api/ # Backend API handlers
βββ cmd/ # CLI commands
βββ storage/ # Data persistence
βββ integrations/ # External APIs
βββ frontend/ # Next.js application
β βββ app/ # Pages
β βββ components/ # React components
β βββ widget/ # Embeddable widget
β βββ public/ # Static assets
βββ docs/ # π Documentation
βββ docker-compose.yml # Production config
βββ docker-compose.local.yml # Local dev config
βββ .env # Configuration (gitignored)
βββ .env.example # Configuration template
βββ config.toml # Defaults
docker compose logs -f backend
docker compose logs -f frontend# 1. Edit .env file
nano .env
# 2. Restart services
docker compose restart# Local
docker compose -f docker-compose.local.yml up --build -d backend
# Production
docker compose up --build -d# 1. Edit .env
MONGO_HOST=10.66.2.50
MONGO_URI=mongodb://10.66.2.50:27017/study_materials_db
# 2. Restart backend
docker compose restart backendπ More tasks: docs/DOCKER.md
<!-- Events list widget -->
<div
data-studymaterials-widget
data-language="he"
data-limit="10"
data-api-url="http://your-server:8080"
></div>
<script src="http://your-server:3000/widget/widget.js"></script>StudyMaterialsWidget.load(eventId, 'he', {
position: 'inline',
apiUrl: 'http://your-server:8080',
target: document.getElementById('container')
});π Complete guide: docs/WIDGET.md
GET /api/events- List public eventsGET /api/events/{id}- Get event detailsGET /api/events/{id}/parts- Get event materialsGET /api/sources/search?q=query- Search sourcesGET /health- Health check
π Full API reference: docs/WIDGET.md
All configuration is managed via .env files:
# Infrastructure
HOST_IP=localhost # Or production IP
BACKEND_PORT=8080
FRONTEND_PORT=3000
# Database
MONGO_HOST=mongo
MONGO_PORT=27017
MONGO_URI=mongodb://mongo:27017/study_materials_db
# API URLs
NEXT_PUBLIC_API_URL=http://localhost:8080
# External Services
KABBALAHMEDIA_URL=https://kabbalahmedia.info/backend/sqdata
KABBALAHMEDIA_TIMEOUT=120s
# Application
STORAGE_TYPE=mongodb
APP_SCRIPT_PASSWORD=change-meπ Full reference: docs/CONFIGURATION.md
# Check logs
docker compose logs backend
# Verify MongoDB
docker compose ps mongo
# Test connection
curl http://localhost:8080/health# Check API URL in .env
cat .env | grep NEXT_PUBLIC_API_URL
# Rebuild frontend (bakes in the URL)
docker compose up --build -d frontend# Test widget URL
curl http://localhost:3000/widget/widget.js
# Check browser console for errors
# Verify CORS settings (allows all origins by default)π Complete troubleshooting: docs/DOCKER.md#troubleshooting
- Make code changes
- Rebuild affected service:
docker compose -f docker-compose.local.yml up --build -d backend
- View logs:
docker compose -f docker-compose.local.yml logs -f backend
- Test in browser:
- Frontend: http://localhost:3000
- API: http://localhost:8080/health
- Copy
.env.productionto.env - Update
HOST_IPwith server IP - Update
NEXT_PUBLIC_API_URLwith public backend URL - Change
APP_SCRIPT_PASSWORDfrom default - Verify MongoDB connection
- Build with
docker compose build - Start with
docker compose up -d - Check logs:
docker compose logs -f - Test health:
curl http://HOST_IP:BACKEND_PORT/health - Test frontend: Open
http://HOST_IP:FRONTEND_PORT
π Complete deployment guide: docs/DOCKER.md#production-deployment
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Docker Network β
β β
β βββββββββββββββ ββββββββββββββββ ββββββββββ β
β β Frontend β β Backend β β MongoDBβ β
β β Next.js βββΆβ Go API βββΆβ β β
β β (Port 3000)β β (Port 8080) β β (27017)β β
β βββββββββββββββ ββββββββββββββββ ββββββββββ β
β β β β
βββββββββββΌβββββββββββββββββββΌβββββββββββββββββββββ
β β
Widget.js REST API
β β
βΌ βΌ
External Sites galaxy3, Apps
π Detailed architecture: docs/ARCHITECTURE-NOTES.md
- Documentation: docs/
- Configuration Help: docs/CONFIGURATION.md
- Deployment Help: docs/DOCKER.md
- Widget Integration: docs/WIDGET.md
- Issues: Create GitHub issue
[Add license information]