Skip to content

Quick Start

Get the MetaOne platform running locally in minutes.

Prerequisites

  • Java 21+
  • Maven 3.8+
  • PostgreSQL (or Docker)
  • Docker + Docker Compose (optional)

1. Clone & Build

bash
git clone https://github.com/metaone/metaone-platform.git
cd metaone-platform
mvn clean install -DskipTests

2. Configure Database

Create a PostgreSQL database for the platform:

sql
CREATE DATABASE metaone;
CREATE USER metaone WITH PASSWORD 'secret';
GRANT ALL PRIVILEGES ON DATABASE metaone TO metaone;

3. Set Environment Variables

bash
export METAONE_JWT_SECRET=your-super-secret-key-at-least-32-chars
export SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/metaone
export SPRING_DATASOURCE_USERNAME=metaone
export SPRING_DATASOURCE_PASSWORD=secret
export AUTHORIZED_REDIRECT_URIS=http://localhost:3000/oauth2/callback

4. Run the Platform

bash
cd metaone-core
mvn spring-boot:run

The API is available at http://localhost:8080/api.

5. First API Call

Create an admin user

bash
curl -X POST http://localhost:8080/api/admin/users \
  -H "Content-Type: application/json" \
  -d '{
    "email": "admin@example.com",
    "fullName": "Admin User",
    "password": "password123",
    "roles": ["ADMIN"]
  }'

Login

bash
curl -X POST http://localhost:8080/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "admin@example.com", "password": "password123"}'

Response:

json
{
  "code": "SUCCESS",
  "data": {
    "id": "...",
    "email": "admin@example.com",
    "fullName": "Admin User"
  }
}

The JWT is set as an HTTP-only cookie automatically.

Create a workspace

bash
curl -X POST http://localhost:8080/api/workspaces \
  -H "Content-Type: application/json" \
  -d '{"key": "acme", "name": "Acme Corp"}'

Install an extension

bash
curl -X POST http://localhost:8080/api/admin/workspaces/WORKSPACE_ID/extensions/install \
  -H "Content-Type: application/json" \
  -d '{"extensionKey": "crm-extension", "version": "1.0.0"}'

Invoke a capability

bash
curl -X POST http://localhost:8080/api/workspaces/WORKSPACE_ID/capabilities/crm.product.search \
  -H "Content-Type: application/json" \
  -d '{"query": "laptop"}'

Using Docker Compose

yaml
# docker-compose.dev.yml is included in the repo
docker-compose -f docker-compose.dev.yml up -d

Development Configuration

For local development, the dev profile provides sensible defaults:

bash
mvn spring-boot:run -Dspring-boot.run.profiles=dev

Running Tests

bash
# Full test suite
mvn test

# Single test class
mvn -pl metaone-core -Dtest=ExtensionInstallerServiceTest test

Note: Full mvn test currently requires H2 in PostgreSQL compatibility mode (configured in application-test.yaml for the test profile).

MetaOne Platform Documentation