Menu

Getting Started

Viktor Fási

Getting Started

Installation

Tests always run inside an Embedded Browser pod -- there is no local-Playwright fallback. Even local development requires the EB stack (pnpm stack).

Option 1: Docker Compose (home server)

git clone https://github.com/las-team/lastest.git
cd lastest
docker compose up -d

Starts PostgreSQL + the Lastest app on :3000. Open http://localhost:3000.

EB pods are provisioned by the app into a Kubernetes cluster you configure separately -- see [Docker Deployment] for prod EB wiring.

Option 2: From source (host dev)

The local-dev architecture is host app + host postgres + k3d-hosted EB pods.

git clone https://github.com/las-team/lastest.git
cd lastest
docker compose up -d            # PostgreSQL on :5432 (volume: lastest-pgdata)
pnpm install

# Configure env (required before pnpm dev -- without EB_PROVISIONER the app
# starts but no test can ever provision an Embedded Browser).
cp .env.example .env.local
cat >> .env.local <<EOF
EB_PROVISIONER=kubernetes
EB_NAMESPACE=lastest
EB_IMAGE=lastest-embedded-browser:latest
LASTEST_URL=http://host.k3d.internal:3000
SYSTEM_EB_TOKEN=$(openssl rand -hex 32)
EOF

pnpm db:push                    # apply schema
pnpm stack                      # REQUIRED: create k3d cluster + build/import EB image
pnpm dev                        # http://localhost:3000

.env.example already pins DATABASE_URL to the bundled compose Postgres -- the block above just appends the EB vars and a freshly generated SYSTEM_EB_TOKEN. EB_PROVISIONER defaults to 'none' in code, so omitting it lets pnpm dev start cleanly but every test silently fails to provision an EB. Always set it.

Requirements

  • Docker: Docker 20+ with Compose v2
  • Node.js: 18+ and pnpm 10.x
  • For running/recording tests (always required): k3d >= 5.6, kubectl, openssl

First Steps

  1. Create an account -- local authentication, no external auth required
  2. Add a repository -- set its local path or connect GitHub/GitLab
  3. Click Record -- interact with your app, Lastest captures everything
  4. AI generates test code automatically (or use the recorded interactions directly)
  5. Run the test -- screenshots are captured and diffed against baselines
  6. Review visual changes -- approve or reject

Understanding the Workflow

Repositories

A repository in Lastest represents your project. You can:

  • Point it to a local directory
  • Connect it to a GitHub repo (via OAuth)
  • Connect it to a GitLab repo (including self-hosted)

Tests

Tests are Playwright scripts that navigate your app and capture screenshots. They can be:

  • Recorded manually via the built-in browser recorder
  • Generated by AI from a URL, spec, or description
  • Created autonomously by the Play Agent

Builds

A build is a collection of test runs. Builds can be triggered:

  • Manually -- click "Run" in the UI
  • By webhook -- when a PR is opened/updated
  • By CI/CD -- via the GitHub Action or CLI runner

Baselines

The first screenshot from a test becomes the baseline. Subsequent runs compare against it. When you approve a visual change, the new screenshot becomes the baseline.


Commands Reference

pnpm dev              # Start development server on localhost:3000
pnpm build            # Production build
pnpm start            # Start production server
pnpm lint             # Run ESLint
pnpm test             # Run unit tests (Vitest)
pnpm test:watch       # Run unit tests in watch mode
pnpm test:coverage    # Run tests with coverage report
pnpm test:ui          # Run tests with Vitest UI
pnpm db:studio        # Open Drizzle Studio for database inspection
pnpm db:push          # Push schema changes to database
pnpm db:generate      # Generate Drizzle migrations
pnpm db:reset         # Reset database (drops PostgreSQL tables + clears screenshots/baselines)
pnpm db:seed          # Seed test data
pnpm test:visual      # Run visual tests via CLI

# Local k3d cluster -- hosts dynamically-provisioned EB pods only
pnpm stack            # Create k3d cluster + build/import EB image
pnpm stack:refresh    # Rebuild + import EB image after editing packages/embedded-browser
pnpm stack:status     # Cluster + EB jobs/pods + host /api/health
pnpm stack:logs       # Tail EB pod logs
pnpm stack:stop       # Delete the cluster

Related

Wiki: Docker Deployment
Wiki: Home
Wiki: _Sidebar

MongoDB Logo MongoDB