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:
- Podman (preferred) or Docker, with a compose tool (
podman compose/docker compose) - Go 1.24.9+ (for Mill API development)
- Node.js 18+ (for Pillow App 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 Redis and Redpanda (database is remote at db.voltdata.io)docker compose up -d redis redpanda# Or with Podman:podman compose up -d redis redpanda -
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 ps || podman compose 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
# Set up environment variablescp config/.env.example config/.env# Edit config/.env with your configuration
# Note: Database is remote at db.voltdata.io# No local database setup required
# 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 API healthcurl http://localhost:4000/health
# Check frontend is runningcurl http://localhost:3000
# Check infrastructure servicesdocker compose ps || podman compose ps2. 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 harvesters 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": ["harvester"] }'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.
Sample Data
Section titled “Sample Data”# Run a harvester to collect real datacd harvesters/sources/homes-co-nzexport MILL_API_URL="http://localhost:4000"export MILL_API_KEY="your-token-here"go run main.go
# Or submit properties via the API (see Mill API documentation)curl -X POST http://localhost:4000/harvesters/properties/single \ -H "Content-Type: application/json" \ -H "Authorization: Bearer your-token" \ -H "X-Harvester-Source: test-source" \ -d '{...property data...}'See the Harvesters documentation for more information on data collection.
Setting Up Your First Harvester
Section titled “Setting Up Your First Harvester”Create a simple harvester to collect data:
1. Create harvester directory
Section titled “1. Create harvester directory”# Navigate to harvesters directorycd harvesters
# Create a new harvester from templatecp -r templates/basic-harvester sources/my-first-harvester2. Configure the harvester
Section titled “2. Configure the harvester”# Configure the harvestercd sources/my-first-harvesternano config.ymlConfigure your harvester:
name: "my-first-harvester"source: "example-real-estate-site.com"schedule: "0 9 * * *" # Daily at 9 AMrate_limit: requests_per_second: 5regions: - "US-CA"validation: required_fields: ["address", "price"]3. Run your harvester
Section titled “3. Run your harvester”# Test the harvestergo run main.go --config=config.yml --dry-run
# Run the harvestergo run main.go --config=config.ymlDevelopment 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) - Harvesters: 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
# Harvester testscd harvesters && 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/.env)
Section titled “Mill API (config/.env)”# Database (remote at db.voltdata.io)DATABASE_HOST=db.voltdata.ioDATABASE_PORT=9030DATABASE_USER=your_userDATABASE_PASSWORD=your_passwordDATABASE_NAME=mill
# RedisREDIS_URL=redis://localhost:6379
# API ConfigurationAPI_PORT=4000JWT_SECRET=your-jwt-secret-change-thisLOG_LEVEL=infoPillow App (.env.local)
Section titled “Pillow App (.env.local)”NEXT_PUBLIC_MILL_API=http://localhost:4000MILL_API=http://localhost:4000MILL_API_TIMEOUT=10000Harvester (.env)
Section titled “Harvester (.env)”MILL_API_URL=http://localhost:4000MILL_API_KEY=your-harvester-token-hereFeature Flags
Section titled “Feature Flags”Enable/disable features using configuration:
features: enable_real_time_updates: true enable_market_analytics: true enable_saved_searches: true enable_price_alerts: trueCommon 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 Harvester: Build your first data harvester
- 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 all services in dev modenpm run dev
# Start infrastructure onlydocker compose up -d redis redpanda || podman compose up -d redis redpanda
# Stop infrastructuredocker compose down || podman compose down
# View logsdocker compose logs -f redis || podman compose logs -f redis
# Run quality checksnpm run check
# Run testsnpm run test
# Lint all componentsnpm run lint
# Build all componentsnpm run build
# Run specific workspaceturbo run dev --filter=millturbo run dev --filter=pillow-app