Quick Start Guide
Get up and running with Pillow in minutes! This guide will walk you through setting up a complete development environment and running your first property search.
Prerequisites
Section titled “Prerequisites”Before you begin, make sure you have the following installed:
- Docker with Docker Compose (
docker compose) - Go 1.24+ (for Mill API and Connectors development)
- Node.js 22+ (for Pillow App and Docs development)
- Git (for version control)
Installation Methods
Section titled “Installation Methods”Choose the installation method that works best for you:
Turborepo Setup (Recommended)
Section titled “Turborepo Setup (Recommended)”The fastest way to get started is using the Turborepo monorepo setup:
Steps:
Section titled “Steps:”-
Clone the repository
Terminal window git clone https://github.com/pillow/pillow.gitcd pillow -
Install all dependencies
Terminal window npm run install:allThis installs Go modules, npm packages, and development tools for all workspaces.
-
Start infrastructure services
Terminal window # Start PostgreSQL, Redis, and Redpandadocker compose -f docker-compose.dev.yml up -d -
Start development servers
Terminal window # Start all components in development modenpm run devThis starts:
- Mill API (Go) on port 4000
- Pillow App (Next.js) on port 3000
- Documentation site (Astro) on port 4321
-
Verify services are running
Terminal window # Check infrastructuredocker compose -f docker-compose.dev.yml ps# Check API healthcurl http://localhost:4000/health# Check frontendcurl http://localhost:3000
Manual Setup
Section titled “Manual Setup”For development or customization, you can set up services manually.
1. Install Dependencies
Section titled “1. Install Dependencies”# From repository root - installs all dependenciesnpm run install:all2. Mill API Setup
Section titled “2. Mill API Setup”# Navigate to Mill directorycd mill
# Start infrastructure (PostgreSQL + Redis)make docker-compose-up
# Start the API server (with hot reload)make dev# Or: go run cmd/mill/main.goThe Mill API will be available at:
- API:
http://localhost:4000 - OpenAPI docs:
http://localhost:4000/swagger/index.html - Health check:
http://localhost:4000/health
3. Pillow App Setup
Section titled “3. Pillow App Setup”# Navigate to Pillow App directorycd pillow-app
# Install dependencies (if not using npm run install:all)npm install
# Set up environment variablescp .env.example .env.local# Edit .env.local with your configuration
# Start the development servernpm run devThe frontend will be available at http://localhost:3000
First Steps
Section titled “First Steps”1. Verify Installation
Section titled “1. Verify Installation”Check that all services are running:
# Check infrastructure servicesdocker compose -f docker-compose.dev.yml ps
# Check API healthcurl http://localhost:4000/health
# Check frontendcurl http://localhost:30002. Access the Applications
Section titled “2. Access the Applications”- Pillow App (Frontend): http://localhost:3000
- Mill API: http://localhost:4000
- OpenAPI Documentation: http://localhost:4000/swagger/index.html
- API Health Check: http://localhost:4000/health
- Documentation Site: http://localhost:4321 (when running
npm run dev)
3. Create Your First API Token
Section titled “3. Create Your First API Token”# Create a service token for connectors or API accesscurl -X POST http://localhost:4000/admin/tokens/service \ -H "Content-Type: application/json" \ -d '{ "service_name": "test-service", "source": "test-source", "roles": ["connector"] }'Save the token from the response for use in API requests.
4. Your First Property Search
Section titled “4. Your First Property Search”Try searching for properties using the API:
# Search for properties (no auth required for public endpoints)curl "http://localhost:4000/api/v1/properties?limit=5"
# Search with filterscurl "http://localhost:4000/api/v1/properties?city=San%20Francisco&limit=5"
# With authentication (if required)curl -H "Authorization: Bearer your-token" \ "http://localhost:4000/api/v1/properties?city=San%20Francisco&limit=5"Or use the web interface at http://localhost:3000 to search visually.
Loading Sample Data
Section titled “Loading Sample Data”Mill auto-creates sample data on startup when configured (the default for local development). You can also run a connector to collect live data:
# Run the homes.co.nz connector in dry-run mode (scrape but don't submit)cd connectorsgo run . -connector homes-co-nz -mill-api http://localhost:4000 -dry-run
# Run for real (submit scraped data to Mill)go run . -connector homes-co-nz -mill-api http://localhost:4000
# Or submit a single property via the APIcurl -X POST http://localhost:4000/connectors/properties/single \ -H "Content-Type: application/json" \ -H "Authorization: Bearer your-token" \ -H "X-Connector-Source: test-source" \ -d '{ "title": "Test Property", "property_type": "residential", "address": { "street": "123 Test St", "city": "Auckland", "country": "New Zealand" }, "rooms": { "bedrooms_total": 3, "bathrooms_total": 2 } }'See the Connectors documentation for more information on data collection.
Development Workflow
Section titled “Development Workflow”Hot Reloading
Section titled “Hot Reloading”All services support hot reloading during development:
- Mill API: Uses
airfor hot reloading Go code (runmake devfrommill/directory) - Pillow App: Next.js development server with fast refresh (automatic with
npm run dev) - Connectors: Use
go runwith file watching orairfor hot reloading
Testing
Section titled “Testing”Run tests for all components:
Run All Tests (Turborepo)
Section titled “Run All Tests (Turborepo)”# From repository root - runs tests for all workspacesnpm run testIndividual Component Tests
Section titled “Individual Component Tests”# Mill API testscd mill && go test ./...# Or: make test-unit
# Pillow App testscd pillow-app && npm test
# Connector testscd connectors && go test ./...
# Integration tests (Mill)cd mill && make test-integrationDebugging
Section titled “Debugging”Mill API Debugging
Section titled “Mill API Debugging”cd mill
# Enable debug modeexport GIN_MODE=debugexport LOG_LEVEL=debug
# Run with verbose loggingmake dev# Or: go run cmd/mill/main.goPillow App Debugging
Section titled “Pillow App Debugging”cd pillow-app
# Run in debug mode (Next.js has built-in debugging)npm run dev
# Enable React DevTools (browser extension recommended)# Or use Next.js built-in debugging featuresConfiguration
Section titled “Configuration”Environment Variables
Section titled “Environment Variables”Key environment variables for each service:
Mill API (config/config.yaml)
Section titled “Mill API (config/config.yaml)”The Mill reads its config from mill/config/config-local.yaml by default. Key settings:
database: postgres: host: "localhost" port: 5432 user: "pillow" password: "pillow" database: "pillow" ssl_mode: "disable"
redis: host: "localhost" port: 6379All values can be overridden via environment variables prefixed with MILL_ (e.g. MILL_DATABASE_POSTGRES_HOST).
Pillow App (.env.local)
Section titled “Pillow App (.env.local)”NEXT_PUBLIC_MILL_API=http://localhost:4000MILL_API=http://localhost:4000MILL_API_TIMEOUT=10000Connectors
Section titled “Connectors”Connectors receive the Mill API URL and credentials via CLI flags:
go run . -connector homes-co-nz -mill-api http://localhost:4000Tokens are acquired automatically from the Mill admin endpoint. See Connectors for details.
Common Issues & Solutions
Section titled “Common Issues & Solutions”Next Steps
Section titled “Next Steps”Now that you have Pillow running:
- Explore the API: Check out the API documentation
- Customize a View: Learn about view customization
- Create a Connector: Build your first data connector
- Deploy: Learn about deployment options
Getting Help
Section titled “Getting Help”If you run into issues:
- 📖 Check the Configuration Guide
- 🐛 Report bugs
- 💬 Ask questions
- 📧 Email support
Useful Commands
Section titled “Useful Commands”# Install all dependenciesnpm run install:all
# Start infrastructure (PostgreSQL, Redis, Redpanda)docker compose -f docker-compose.dev.yml up -d
# Stop infrastructuredocker compose -f docker-compose.dev.yml down
# Start all services in dev modenpm run dev
# View infrastructure logsdocker compose -f docker-compose.dev.yml logs -f
# Run quality checks (lint + build + test)npm run check
# Run testsnpm run test
# Lint all componentsnpm run lint
# Build all componentsnpm run build
# Run a specific workspaceturbo run dev --filter=millturbo run dev --filter=pillow-app