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 manager2. Configure
Create your local configuration from the example:
bash
cp config.example.yml config.local.ymlEdit 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: productifyTIP
config.local.yml is gitignored to prevent committing sensitive data. Always use config.example.yml as the template.
3. Start Services
bash
docker-compose upThis starts:
- PostgreSQL database on port 5432
- Manager API on port 8080
- Frontend UI on port 5173
4. Access the Application
- Frontend UI: http://localhost:5173
- GraphQL Playground: http://localhost:8080/graphql
- Health Check: http://localhost:8081/health
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
airFrontend (Vue)
bash
cd ui
npm install
npm run devThe 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 generateWARNING
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=bothNext Steps
- Configure: Learn about Configuration Options
- Understand Triggers: Read about the Trigger System
- Multi-tenancy: Learn about Multi-tenant Architecture
- Deploy: See Deployment Options
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 upDatabase 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 upFrontend Build Failures
bash
cd ui
rm -rf node_modules package-lock.json
npm install
npm run dev