Quick Start¶
Get ProductGraph running locally in under 5 minutes.
Prerequisites¶
- Go 1.22+
- Docker & Docker Compose
- Make
Start the Development Environment¶
1. Clone the Repository¶
2. Start PostgreSQL¶
This starts a PostgreSQL 16 container with:
- Database:
productgraph - User:
pg - Password:
pg - Port:
5432
3. Run the Ingestion Service¶
The service starts on http://localhost:8080 with debug logging enabled.
4. Verify Health¶
Expected response:
Send Your First Event¶
curl -X POST http://localhost:8080/v1/events \
-H "Content-Type: application/json" \
-d '{
"events": [{
"event_id": "evt_001",
"project_id": "proj_demo",
"session.id": "sess_001",
"event.type": "page.view",
"event.timestamp": "2024-01-15T10:30:00Z",
"page.path": "/checkout",
"page.title": "Checkout"
}]
}'
Expected response:
Send a Batch of Events¶
curl -X POST http://localhost:8080/v1/events \
-H "Content-Type: application/json" \
-d '{
"events": [
{
"event_id": "evt_002",
"project_id": "proj_demo",
"session.id": "sess_001",
"event.type": "page.view",
"event.timestamp": "2024-01-15T10:30:00Z",
"page.path": "/products",
"page.title": "Products"
},
{
"event_id": "evt_003",
"project_id": "proj_demo",
"session.id": "sess_001",
"event.type": "ui.click",
"event.timestamp": "2024-01-15T10:30:15Z",
"page.path": "/products",
"ui.component.name": "AddToCartButton",
"ui.action": "click"
},
{
"event_id": "evt_004",
"project_id": "proj_demo",
"session.id": "sess_001",
"event.type": "page.view",
"event.timestamp": "2024-01-15T10:30:20Z",
"page.path": "/cart",
"page.title": "Shopping Cart"
}
]
}'
Stop the Environment¶
To remove all data:
Next Steps¶
- Installation - Production deployment options
- Event Ingestion API - Full API reference
- Architecture Overview - Understand the system