Skip to content

Harry-jain/SynBoard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SyncBoard - Real-Time Collaborative Platform

Complete real-time collaboration platform with video calling, screen sharing, file management, and integrated browser-based IDEx.

🚀 Quick Start

Windows (Easiest):

Double-click: RUN_NOW.bat

Manual:

# Install dependencies
npm install

# Start everything
docker-compose up -d --build

# Wait 60 seconds, then open:
# http://localhost:3000

⏱️ First run takes 5-10 minutes (builds Docker images)

📍 Access Points

Service URL Credentials
Main App http://localhost:3000 Register new account
API Gateway http://localhost:8000/api -
MinIO Console http://localhost:9001 minioadmin / minioadmin123
Code IDEx http://localhost:8080 syncboard123

✨ Features

  • Video Calling - WebRTC peer-to-peer video/audio
  • Screen Sharing - Share your entire screen
  • In-Call Chat - Text messages during calls
  • File Management - S3-compatible storage with MinIO
  • User Authentication - JWT-based auth system
  • Code IDEx - VS Code in your browser
  • Real-time Sync - Instant updates across users

🏗️ Architecture

10 Containerized Services:

  1. Frontend - Next.js 15 + React 18 + TypeScript (Port 3000)
  2. Auth API - User authentication & JWT (Port 5000)
  3. File Storage API - File management with MinIO (Port 8082)
  4. API Gateway - Unified API routing (Port 8000)
  5. Signaling Server - WebRTC coordination (Port 4000)
  6. PostgreSQL - Database (Port 5432)
  7. Redis - Caching & sessions (Port 6379)
  8. MinIO - S3-compatible object storage (Ports 9000, 9001)
  9. Code IDEx - Browser-based VS Code (Port 8080)
  10. Nginx - Reverse proxy (Port 80)

📂 Project Structure

SyncBoard/
├── src/                      # Frontend (Next.js/React/TypeScript)
│   ├── app/                 # Next.js pages
│   ├── components/          # React components
│   ├── hooks/              # Custom hooks
│   └── lib/                # Utilities
├── services/                # Backend microservices
│   ├── auth-api/           # Authentication service
│   ├── file-storage/       # File management
│   ├── api-gateway/        # API Gateway
│   └── signaling/          # WebRTC signaling
├── database/               # PostgreSQL init scripts
├── nginx/                  # Nginx configuration
├── docker-compose.yml      # Service orchestration
├── RUN_NOW.bat            # One-click launcher
└── README.md              # This file

🛠️ Management

Start Services

# Easy way (Windows)
RUN_NOW.bat

# Manual way
docker-compose up -d --build

Stop Services

docker-compose down

View Logs

# All services
docker-compose logs -f

# Specific service
docker-compose logs -f frontend
docker-compose logs -f auth-api

Check Status

docker-compose ps

Restart Service

docker-compose restart frontend

Clean Restart (removes all data)

docker-compose down -v
docker system prune -a -f
docker-compose up -d --build

Remove Docker Images and Rebuild

# Stop all containers
docker-compose down

# Remove all containers, networks, and volumes
docker-compose down -v --remove-orphans

# Remove all Docker images (be careful - removes ALL images)
docker rmi $(docker images -q) -f

# Or remove only SyncBoard images
docker rmi $(docker images | grep "done-" | awk '{print $3}') -f

# Clean up Docker system (removes unused data)
docker system prune -a -f

# Rebuild everything from scratch
docker-compose build --no-cache --parallel
docker-compose up -d

Force Rebuild Specific Service

# Rebuild only frontend
docker-compose build --no-cache frontend
docker-compose up -d frontend

# Rebuild only auth-api
docker-compose build --no-cache auth-api
docker-compose up -d auth-api

# Rebuild multiple services
docker-compose build --no-cache frontend auth-api file-storage
docker-compose up -d

🔧 Configuration

Edit .env.example and save as .env to customize:

  • Database credentials
  • JWT secret key
  • MinIO access keys
  • Port numbers
  • CORS settings

⚠️ Important: Change default passwords in production!

🌐 API Endpoints

All endpoints via API Gateway: http://localhost:8000/api

Authentication

POST /api/auth/register   - Register new user
POST /api/auth/login      - Login
POST /api/auth/logout     - Logout
GET  /api/auth/verify     - Verify token

Users

GET /api/users/me         - Get current user
PUT /api/users/me         - Update profile
GET /api/users            - List users

Files

POST   /api/files/folders              - Create folder
GET    /api/files/folders/:id/contents - List folder
POST   /api/files/upload               - Upload file
GET    /api/files/:id/download         - Download file
DELETE /api/files/:id                  - Delete file/folder
PUT    /api/files/:id/rename           - Rename file/folder

Projects

GET  /api/projects        - List projects
POST /api/projects        - Create project
GET  /api/projects/:id    - Get project

Authentication: Include JWT token in header:

Authorization: Bearer <your-token>

📦 File Storage

Files are stored in ./SyncBoard-data/ with user isolation:

SyncBoard-data/
└── syncboard-files/
    ├── user-<UUID-1>/
    │   ├── projects/
    │   ├── documents/
    │   └── uploads/
    └── user-<UUID-2>/
        └── ...

Each user has private, isolated storage.

🐛 Troubleshooting

Docker not running

Fix: Start Docker Desktop before running the app.

Port conflicts

Fix: Ensure these ports are free:

  • 3000, 4000, 5000, 8000, 8080, 8082
  • 9000, 9001, 5432, 6379, 80

Build fails

Fix:

docker-compose down -v
docker system prune -a -f
docker-compose build --no-cache
docker-compose up -d

Services not responding

Fix: Wait 60 seconds after startup, then check logs:

docker-compose logs -f

TypeScript errors in IDEx

Fix: Run npm install to install all dependencies.

📊 Tech Stack

Frontend:

  • Next.js 15 (App Router)
  • React 18
  • TypeScript
  • Tailwind CSS + Shadcn UI
  • WebRTC + Socket.io

Backend:

  • Node.js 20 + Express
  • PostgreSQL
  • Redis
  • MinIO (S3-compatible)
  • JWT Authentication

DevOps:

  • Docker + Docker Compose
  • Multi-stage builds
  • Health checks
  • Auto-restart

🔒 Security Notes

  • Change default passwords in production
  • Use strong JWT secret
  • Enable HTTPS with proper SSL certificates
  • Implement rate limiting
  • Regular security updates

📝 Development

# Run frontend locally (hot reload)
npm run dev

# Build for production
npm run build

# Lint code
npm run lint

Made CHAOTICALLY BY HARSH JAIN

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors