Skip to content

Latest commit

 

History

History
200 lines (120 loc) · 3.06 KB

File metadata and controls

200 lines (120 loc) · 3.06 KB
title Development
description Local development setup and commands for Pixelated Empathy
**Prerequisites**: - Node.js v19+ (use `nvm` to manage versions) - pnpm (for Node.js dependencies) - uv (for Python dependencies) - Docker & Docker Compose (for local infrastructure)

Quick Start

Install all frontend and service dependencies:

# Node.js dependencies
pnpm install

## Python dependencies (AI services, bias detection, pipelines)
uv sync

Launch local infrastructure services (MongoDB, Redis, etc.):

docker compose up -d

Start the Astro development server with all services:

pnpm dev:all-services

This starts:

  • Frontend dev server (typically port 5173)
  • AI Service (FastAPI)
  • WebSocket server
  • Worker service

Development Commands

## Start Astro dev server
pnpm dev

## With custom port
pnpm dev --port 3000
## Start all services
pnpm dev:all-services

## Start with specific port
pnpm dev:all-services --port 8080
## Start the AI inference service
pnpm dev:ai

## Start the research pipeline
pnpm dev:pipeline

Quality Gates

Before submitting changes, run the full quality check:

## Type check, lint, and format
pnpm check:all

## Unit tests
pnpm test:all

## Security audit
pnpm security:scan

## Ultimate Bug Scanner (UBS) on changed files
ubs $(git diff --name-only --cached)

If port 5173 is already in use, the Astro dev server will attempt the next available port. You can also specify a custom port:

pnpm dev --port 3000

The dev server is configured with increased memory (--max-old-space-size=8192). If you still encounter memory issues:

NODE_OPTIONS="--max-old-space-size=16384" pnpm dev

If uv encounters issues, try resetting the environment:

rm -rf .venv
uv sync

Check Docker daemon status and available disk space:

docker ps
docker system df

Documentation

This documentation site is built with Astro Starlight. To run the docs locally:

## From project root
pnpm dev

## Docs are served at the same port as the main app
## Navigate to /docs route
The ``, ``, ``, ``, and `` components used throughout this documentation are built into Astro Starlight.