Skip to content

Developer Onboarding & Local Environment Setup

This guide outlines how to configure a local development workstation to run and test the Planovi Microservices.


1. Prerequisites

Ensure your workstation has the following tools installed:

  • PHP: v8.3+ with extensions php-curl, php-json, php-mbstring, php-openssl.
  • Composer: v2.x+ (PHP dependency manager).
  • Node.js: v18+ or v20+ (for running and building the Docs-as-Code documentation portal).

2. Repository Cloning & Dependency Installation

Terminal window
# Clone the repository
git clone https://github.com/PA-IDEAS/planovi-microservices.git
cd planovi-microservices
# Install Composer dependencies for the Scheduler microservice
cd scheduler
composer install
cd ..

3. Environment Configuration (.env)

Create a .env file in the root of the repository:

# .env (Place in planovi-microservices root)
# API Secret Key for internal Dealflow endpoints
DEALFLOW_API_SECRET=your_secure_random_api_secret_key
# Public URLs
DEALFLOW_FRONTEND_URL=http://localhost:8080/dealflow
SCHEDULER_FRONTEND_URL=http://localhost:8080/scheduler
# Supabase Integration (matches planovi-backend)
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=eyJhbGciOiJIUz...

4. Running the Microservices Locally

You can run the microservices using PHP’s built-in development web server:

Terminal window
# From the repository root (planovi-microservices)
php -S localhost:8080 -t .

You can now test the microservices in your browser:

  • Dealflow Questionnaire: http://localhost:8080/dealflow/inquiry.php
  • Scheduler Interface: http://localhost:8080/scheduler/index.php?id=default
  • Dealflow Offer View: http://localhost:8080/dealflow/offer.php?id=test_normal_1780056624

5. Running the Docs-as-Code Portal Locally

The documentation portal is powered by Astro and Starlight:

Terminal window
cd docs
npm install
npm run dev

The documentation portal will start with hot-reloading at: http://localhost:4321/