Skip to content

Quick Start

Get Manager up and running in minutes with Docker Compose.

Prerequisites

  • Docker & Docker Compose - For containerized development
  • Git - To clone the repository

Optional (for local development):

  • Go 1.25.0 or higher
  • Node.js 20+ and npm
  • PostgreSQL 14+

Installation

1. Clone the Repository

bash
git clone https://github.com/ProductifyFW/manager.git
cd manager

2. Configure

Create your local configuration from the example:

bash
cp config.example.yml config.local.yml

Edit config.local.yml with your settings (or use defaults for quick start):

yaml
env: development
run_mode: both # Run both API and executor
port: 8080
db:
  host: db
  port: 5432
  user: postgres
  password: password
  dbname: productify

TIP

config.local.yml is gitignored to prevent committing sensitive data. Always use config.example.yml as the template.

3. Start Services

bash
docker-compose up

This starts:

  • PostgreSQL database on port 5432
  • Manager API on port 8080
  • Frontend UI on port 5173

4. Access the Application

Development Mode

For active development with hot reloading:

Backend (Go)

bash
# Install Air for live reload
go install github.com/cosmtrek/air@latest

# Run with Air
air

Frontend (Vue)

bash
cd ui
npm install
npm run dev

The frontend development server will start on http://localhost:5173 with hot module replacement.

Running Tests

bash
# Run all tests
go test ./...

# Run with race detection
go test -race ./...

# Run specific package
go test ./pkg/machineuser/...

# With coverage
go test -cover ./...

Code Generation

Manager uses code generation for GraphQL and database models:

bash
# Generate all (Ent + GraphQL)
go generate ./...

# Or use Make
make generate

WARNING

Run code generation after modifying:

  • GraphQL schema files in graph/*.graphql
  • Ent schema files in ent/schema/

Environment Variables

Override configuration with environment variables prefixed with PFY_:

bash
export PFY_ENV=development
export PFY_PORT=8080
export PFY_DB_HOST=localhost
export PFY_DB_PASSWORD=secret
export PFY_RUN_MODE=both

Next Steps

Troubleshooting

Port Already in Use

If port 8080 or 5173 is already in use:

bash
# Change in config.local.yml
port: 8090  # Use different port

# Or with environment variable
PFY_PORT=8090 docker-compose up

Database Connection Issues

Ensure PostgreSQL is running and credentials match:

bash
# Check database logs
docker-compose logs db

# Reset database
docker-compose down -v
docker-compose up

Frontend Build Failures

bash
cd ui
rm -rf node_modules package-lock.json
npm install
npm run dev