# πŸ”΄ Redlight A modern, self-hosted BigBlueButton frontend with beautiful themes and powerful features. ![Node.js](https://img.shields.io/badge/Node.js-18+-green) ![React](https://img.shields.io/badge/React-18+-blue) ![License](https://img.shields.io/badge/License-MIT-yellow) ![BigBlueButton](https://img.shields.io/badge/BigBlueButton-Compatible-red) ## ✨ Features ### Core Features - πŸŽ₯ **Video Conferencing** – Integrated BigBlueButton support for professional video meetings - 🎨 **15+ Themes** – Dracula, Nord, Catppuccin, RosΓ© Pine, Gruvbox, and more - πŸ“ **Room Management** – Create unlimited rooms with custom settings and access codes - πŸ” **User Management** – Registration, login, role-based access control (Admin/User) - πŸ“Ή **Recording Management** – View, publish, and delete meeting recordings per room - 🌍 **Multi-Language Support** – German (Deutsch) and English built-in, easily extensible - βœ‰οΈ **Email Verification** – Optional SMTP-based email verification for user registration - πŸ‘€ **User Profiles** – Customizable avatars, themes, and language preferences - πŸ“± **Responsive Design** – Works seamlessly on mobile, tablet, and desktop ### Admin Features - πŸ‘₯ **User Administration** – Manage users and roles - 🏒 **Branding Customization** – Custom app name and logos - πŸ“Š **Dashboard** – Overview of system statistics - πŸ”§ **Settings Management** – System-wide configuration ### Room Features - πŸ”‘ **Access Codes** – Restrict room access with optional passwords - πŸšͺ **Guest Access** – Allow unauthenticated users to join meetings - ⏱️ **Max Participants** – Set limits on concurrent participants - 🎀 **Mute on Join** – Automatically mute new participants - βœ… **Approval Mode** – Require moderator approval for participants - πŸŽ™οΈ **Anyone Can Start** – Allow participants to start the meeting - πŸ“Ή **Recording Settings** – Control whether meetings are recorded ### Developer Features - 🐳 **Docker Support** – Easy deployment with Docker Compose - πŸ—„οΈ **Database Flexibility** – SQLite (default) or PostgreSQL support - πŸ”Œ **REST API** – Comprehensive API for custom integrations - πŸ“¦ **Open Source** – Full source code transparency - πŸ› οΈ **Self-Hosted** – Complete data privacy and control --- ## πŸ“Š Comparison: Redlight vs Greenlight | Feature | Redlight | Greenlight | |---------|----------|-----------| | **Theme System** | 15+ customizable themes | Limited theming | | **Language Support** | Multi-language ready | Multi-language ready | | **UI Framework** | React + Tailwind (Modern) | Rails-based (Traditional) | | **User Preferences** | Theme, language, avatar | Limited customization | | **Database Options** | SQLite / PostgreSQL | PostgreSQL only | | **Docker** | βœ… Supported | βœ… Supported | | **Admin Dashboard** | Modern React UI | Legacy Rails interface | | **Room Sharing** | βœ… Share rooms with users | βœ… Supported | | **Recording Management** | Full control per room | Standard management | | **API** | RESTful JSON API | RESTful API | | **Setup Complexity** | Simple (5 min) | Moderate (10-15 min) | | **Customization** | Easy (Tailwind CSS) | Requires Ruby/Rails | | **Community** | doesn't exist lol | Established | --- ## πŸš€ Quick Start ### Prerequisites - Docker & Docker Compose - BigBlueButton server (with API access) - SMTP server (optional, for email verification) ### Installation 1. **Clone the repository** ```bash git clone https://git.scrunkly.cat/Michelle/redlight cd redlight ``` 2. **Configure environment** ```bash cp .env.example .env ``` Edit `.env` with your settings: ```env BBB_URL=https://your-bbb-server.com/bigbluebutton/api/ BBB_SECRET=your-bbb-shared-secret JWT_SECRET=your-secret-key DATABASE_URL=postgres://user:password@postgres:5432/redlight POSTGRES_USER=redlight POSTGRES_PASSWORD=redlight POSTGRES_DB=redlight # Optional: Email verification SMTP_HOST=smtp.gmail.com SMTP_PORT=587 SMTP_USER=your-email@gmail.com SMTP_PASS=your-app-password ``` 3. **Start the application** ```bash docker-compose up -d ``` 4. **Access the application** - Open `http://localhost:3001` in your browser - Default admin: `admin@example.com` / `admin123` - Change password immediately! --- ## πŸ› οΈ Development ### Local Setup 1. **Install dependencies** ```bash npm install ``` 2. **Start development server** ```bash npm run dev ``` - Frontend: http://localhost:5173 - Backend: http://localhost:3001 3. **Build for production** ```bash npm run build npm run preview ``` ### Tech Stack - **Frontend**: React 18, Tailwind CSS, React Router, Lucide Icons - **Backend**: Node.js, Express, JWT, Bcrypt - **Database**: SQLite / PostgreSQL with better-sqlite3 / pg - **Email**: Nodemailer - **Build**: Vite --- ## πŸ“ Project Structure ``` redlight/ β”œβ”€β”€ server/ # Node.js/Express backend β”‚ β”œβ”€β”€ config/ # Database & mailer config β”‚ β”œβ”€β”€ middleware/ # JWT authentication β”‚ β”œβ”€β”€ routes/ # API endpoints β”‚ └── index.js # Server entry point β”œβ”€β”€ src/ # React frontend β”‚ β”œβ”€β”€ components/ # Reusable components β”‚ β”œβ”€β”€ contexts/ # React context (Auth, Language, Theme, Branding) β”‚ β”œβ”€β”€ i18n/ # Translations (DE, EN) β”‚ β”œβ”€β”€ pages/ # Page components β”‚ β”œβ”€β”€ services/ # API client β”‚ β”œβ”€β”€ themes/ # Tailwind theme config β”‚ └── main.jsx # Frontend entry point β”œβ”€β”€ public/ # Static assets β”œβ”€β”€ uploads/ # User avatars (runtime) β”œβ”€β”€ compose.yml # Docker Compose configuration β”œβ”€β”€ Dockerfile # Container image definition └── package.json # Dependencies ``` --- ## πŸ” Security - **JWT Authentication** – Secure token-based auth with 7-day expiration - **HTTPS Ready** – Configure behind reverse proxy (nginx, Caddy) - **Password Hashing** – bcryptjs with salt rounds 12 - **Email Verification** – Optional SMTP-based email verification - **CORS Protection** – Configurable CORS settings - **Admin Isolation** – Role-based access control --- ## πŸ“¦ API Endpoints ### Authentication - `POST /api/auth/register` – Register new user - `POST /api/auth/login` – Login user - `GET /api/auth/verify-email?token=...` – Verify email with token - `POST /api/auth/resend-verification` – Resend verification email - `GET /api/auth/me` – Get current user info - `PUT /api/auth/profile` – Update profile - `PUT /api/auth/password` – Change password - `POST /api/auth/avatar` – Upload avatar image ### Rooms - `GET /api/rooms` – List user's rooms - `POST /api/rooms` – Create new room - `GET /api/rooms/:uid` – Get room details - `PUT /api/rooms/:uid` – Update room - `DELETE /api/rooms/:uid` – Delete room - `POST /api/rooms/:uid/start` – Start meeting ### Recordings - `GET /api/recordings/:roomUid` – List room recordings - `PUT /api/recordings/:recordingId` – Publish/unpublish recording - `DELETE /api/recordings/:recordingId` – Delete recording ### Admin - `GET /api/admin/users` – List all users - `GET /api/admin/stats` – System statistics - `PUT /api/admin/users/:id` – Update user - `DELETE /api/admin/users/:id` – Delete user ### Branding - `GET /api/branding` – Get branding settings - `PUT /api/branding` – Update branding (admin only) --- ## 🌍 Internationalization (i18n) Redlight comes with built-in support for multiple languages. Currently supported: - πŸ‡©πŸ‡ͺ Deutsch (German) - πŸ‡¬πŸ‡§ English ### Adding a new language 1. Create `src/i18n/xx.json` (e.g., `fr.json` for French) 2. Copy structure from `de.json` or `en.json` 3. Translate all strings 4. Update `src/i18n/index.js` to include the new language --- ## 🎨 Themes Redlight includes the following themes: - πŸŒ™ Dracula - ❄️ Nord - 🐱 Catppuccin - 🌹 RosΓ© Pine - πŸ‚ Gruvbox (Dark, Light) - πŸ’œ One Dark - 🌊 Tokyo Night - And more... Themes are fully customizable by editing `src/themes/index.js`. --- ## 🐳 Docker Deployment ### Using Docker Compose (Recommended) ```bash docker-compose up -d ``` Services: - **redlight** – Node.js application - **postgres** – PostgreSQL database ### Production Deployment Behind a reverse proxy (nginx example): ```nginx upstream redlight { server localhost:3001; } server { listen 443 ssl http2; server_name your-domain.com; ssl_certificate /path/to/cert.pem; ssl_certificate_key /path/to/key.pem; client_max_body_size 5M; location / { proxy_pass http://redlight; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection upgrade; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } } ``` --- ## πŸ› Troubleshooting ### Issue: "Email verification not working" **Solution**: Ensure SMTP is configured in `.env`. If `SMTP_HOST` is not set, email verification is disabled. ### Issue: "BigBlueButton API error" **Solution**: Verify `BBB_URL` and `BBB_SECRET` are correct. Test the connection with: ```bash curl "https://your-bbb-server/bigbluebutton/api/getMeetings?checksum=..." ``` ### Issue: "Database connection failed" **Solution**: Check `DATABASE_URL` format. For PostgreSQL: `postgres://user:password@host:5432/redlight` ### Issue: "Theme not applying" **Solution**: Clear browser cache (Ctrl+Shift+Del) or restart dev server with `npm run dev`. --- ## πŸ“ License This project is licensed under the MIT License – see [LICENSE](LICENSE) file for details. --- ## 🀝 Contributing Contributions are welcome! Please feel free to submit a Pull Request. 1. Fork the repository 2. Create a feature branch (`git checkout -b feature/amazing-feature`) 3. Commit changes (`git commit -m 'Add amazing feature'`) 4. Push to branch (`git push origin feature/amazing-feature`) 5. Open a Pull Request