Skip to content

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

ToolVersionCheck Command
Node.js≥ 24.0.0node --version
pnpm≥ 10.0.0pnpm --version
GitLatestgit --version
bash
git clone https://github.com/threehappypenguins/VideoSphere.git
cd VideoSphere
pnpm install
cp .env.example .env.local
pnpm dev

Open 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-name

Use 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
CommandWhat it does
pnpm formatFormats code with Prettier (fixes style).
pnpm lintRuns ESLint (code quality and accessibility).
pnpm test runRuns tests once (no watch mode).
pnpm buildBuilds 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:

  1. git checkout main && git pull origin main
  2. git checkout -b feature/your-branch-name
  3. pnpm dev

End of work / before push:

  1. pnpm format
  2. pnpm lint
  3. pnpm test run
  4. pnpm build

Then commit (if you haven’t already), push, and open a PR.


pnpm Scripts

ScriptCommandDescription
pnpm devnext dev --webpackStart dev server on port 9624
pnpm buildnext buildCreate production build
pnpm startnext startStart production server
pnpm linteslint .Run ESLint
pnpm lint:fixeslint . --fixRun ESLint and auto-fix issues
pnpm formatprettier --write .Format all files with Prettier
pnpm format:checkprettier --check .Check formatting (used in CI)
pnpm type-checktsc --noEmitCheck TypeScript types
pnpm testvitestRun tests in watch mode
pnpm test runvitest runRun tests once
pnpm test:uivitest --uiRun tests with browser UI
pnpm test:coveragevitest run --coverageRun tests with coverage report

Local Docker (build from source)

bash
docker compose --env-file .env.local up -d --build

For production with a pre-built image, see the Deployment Guide.