Appearance
Daily Development Workflow
Use this checklist before you start work and when you finish work so your environment is ready and your changes pass CI.
For first-run setup after cloning the repository (environment variables, MongoDB, admin account), see SETUP.md in the repository root.
Prerequisites
| Tool | Version | Check Command |
|---|---|---|
| Node.js | ≥ 24.0.0 | node --version |
| pnpm | ≥ 10.0.0 | pnpm --version |
| Git | Latest | git --version |
bash
git clone https://github.com/threehappypenguins/VideoSphere.git
cd VideoSphere
pnpm install
cp .env.example .env.local
pnpm devOpen http://localhost:9624 (or your LAN host IP on port 9624).
Before you start development
Do these at the beginning of each development session.
Update main and create a branch
Always start from the latest main so you don’t base your work on outdated code.
bash
git checkout main
git pull origin main
git checkout -b feature/your-feature-nameUse a branch name that matches your task (e.g. feature/draft-form, fix/login-error).
When you finish work (before you push or open a PR)
Run these commands as recommended pre-commit and pre-PR checks. Fix any failures before pushing. (CI currently runs lint, format check, and type-check; running format, lint, test, and build locally catches more issues before you open a PR.)
bash
pnpm format
pnpm lint
pnpm test run
pnpm build| Command | What it does |
|---|---|
pnpm format | Formats code with Prettier (fixes style). |
pnpm lint | Runs ESLint (code quality and accessibility). |
pnpm test run | Runs tests once (no watch mode). |
pnpm build | Builds the app (catches type and build errors). |
Order: Run them in this order. Fix any errors before moving to the next. If everything passes, your branch is ready to push and open a PR.
Quick reference
Start of day:
git checkout main && git pull origin maingit checkout -b feature/your-branch-namepnpm dev
End of work / before push:
pnpm formatpnpm lintpnpm test runpnpm build
Then commit (if you haven’t already), push, and open a PR.
pnpm Scripts
| Script | Command | Description |
|---|---|---|
pnpm dev | next dev --webpack | Start dev server on port 9624 |
pnpm build | next build | Create production build |
pnpm start | next start | Start production server |
pnpm lint | eslint . | Run ESLint |
pnpm lint:fix | eslint . --fix | Run ESLint and auto-fix issues |
pnpm format | prettier --write . | Format all files with Prettier |
pnpm format:check | prettier --check . | Check formatting (used in CI) |
pnpm type-check | tsc --noEmit | Check TypeScript types |
pnpm test | vitest | Run tests in watch mode |
pnpm test run | vitest run | Run tests once |
pnpm test:ui | vitest --ui | Run tests with browser UI |
pnpm test:coverage | vitest run --coverage | Run tests with coverage report |
Local Docker (build from source)
bash
docker compose --env-file .env.local up -d --buildFor production with a pre-built image, see the Deployment Guide.