Automated Moderation Tool for Content Creation and Streaming
- Node.js v18 or higher
- Docker Desktop
- Python 3.12
- npm
git clone https://github.com/kumathy/ModSquad.git && cd ModSquadFrom the project root, install dependencies:
cd frontend && npm installStart dev server and Electron in two separate terminals:
# Terminal 1 β Vite dev server
npm run dev
# Terminal 2 β Electron
npm run startIn another separate terminal, from the project root:
docker compose up --buildThis builds the Python environment and starts the FastAPI server at http://localhost:8000. The --build flag is only needed the first time or after changes to requirements.txt/Dockerfile. After that, just run:
docker compose upTo stop the backend:
docker compose down- React - UI framework
- Vite - Build tool and dev server
- Electron - Desktop app wrapper
- shadcn/ui - Component library
- Tailwind CSS - CSS framework
- FastAPI - Backend API
- OpenAI Whisper - Speech-to-text transcription
- MoviePy - Video/audio processing
- Docker - Backend environment and dependency management
ModSquad/
βββ docker-compose.yml # Docker orchestration
βββ frontend/
β βββ src/
β β βββ App.jsx # Main app component
β β βββ components/
β β β βββ video/ # Video processing components
β β β βββ ui/ # shadcn components
β β βββ index.jsx # React entry point
β β βββ lib/
β βββ index.html # HTML entry point
β βββ main.cjs # Electron main process
βββ backend/
β βββ utils/ # Backend utility functions
β βββ main.py # FastAPI entry point
β βββ requirements.txt # Python dependencies
β βββ Dockerfile # Backend container definition
Run this command from the project root:
npx shadcn@latest add [component-name]Example:
npx shadcn@latest add button
npx shadcn@latest add card
npx shadcn@latest add tabsThis will automatically put the components in src/components/ui/
Our backend has a heavy dependency stack (ffmpeg, PyTorch, Whisper, MoviePy) that is difficult to install consistently across machines with different OSes. Docker solves this by packaging the backend and all its dependencies into a container, essentially an isolated computer that we can all use to run the backend, solving the "But it works on my machine" problem.
docker-compose.yml β orchestrates the backend container
backend/Dockerfile β specifications for building the backend environment
backend/requirements.txt β Python packages to be installed inside the container
The frontend runs outside Docker and communicates with the containerized backend over HTTP at localhost:8000.
Note
Please run docker compose up --build after modifying requirements.txt or Dockerfile
Only list direct dependencies in requirements.txt (Only whatever you're importing in .py files)
Steps to add a new package:
-
Install it into your local venv (for VS Code intellisense):
pip install <package>
-
Check the installed version:
pip show <package>
-
Manually add it to
backend/requirements.txt:package-name==1.2.3 -
Rebuild the Docker container so it installs inside it too:
docker compose up --build
Warning
Do not use pip freeze > requirements.txt. This dumps all sub-dependencies with pinned versions in the file and makes it difficult to maintain.
React β’ shadcn/ui β’ Tailwind CSS β’ FastAPI β’ Docker