Production-ready landing hub for the Innersync platform with a dark, neural aesthetic and the App → Alphapy → Mind → Core hero morph.

prefers-reduced-motion.PORT and serves the standalone Next.js output./status page (/api/health, /api/metrics).@tailwindcss/typographypnpm install
pnpm dev
Then visit http://localhost:3000.
This repo now contains shared data contracts under schemas/:
schemas/typescript – TypeScript type definitions you can import directly or publish as @innersync/schemas.schemas/python – Pydantic models for server and worker workloads.See schemas/README.md for details on how to consume them inside the other Innersync services.
The core-api/ directory contains a separate FastAPI service that provides backend data APIs. This is deployed as a separate Railway service at api.innersync.tech.
Local Development:
cd core-api
uvicorn app.main:app --reload
Available Routes:
GET /health – service heartbeatGET /users/me, /profiles/me, /reflections, /trades, /insights – per-user resources (require auth)GET /dashboard/summary – combined payload (user + profile + reflections/trades/insights + stats)GET /api/metrics – real-time telemetry with direct database connectionSee the Railway Deployment section below for deployment details.
Initial SQL to provision the shared profiles, reflections, trades and insights tables (plus RLS policies) lives in supabase/0001_core_tables.sql. Execute it inside the Supabase SQL editor or through supabase db push before wiring up the Core API or the Alphapy sync jobs.
Copy .env.example to .env.local and adjust if needed:
NEXT_PUBLIC_CORE_BASE=https://innersync.tech
NEXT_PUBLIC_APP_URL=https://app.innersync.tech
NEXT_PUBLIC_MIND_URL=https://mind.innersync.tech
NEXT_PUBLIC_ALPHAPY_URL=https://alphapy.innersync.tech
SUPABASE_SERVICE_ROLE_KEY=
BUILD_TIME=
COMMIT_SHA=
Key values:
NEXT_PUBLIC_CORE_BASE anchors links rendered on the marketing surface.NEXT_PUBLIC_CORE_API_URL points to the FastAPI deployment (api.innersync.tech) used for CTA and status links.NEXT_PUBLIC_APP_URL, NEXT_PUBLIC_MIND_URL, and NEXT_PUBLIC_ALPHAPY_URL power cross-site navigation.SUPABASE_SERVICE_ROLE_KEY laat Core (en Mind) schrijven/lezen in het gedeelde telemetry schema.BUILD_TIME en COMMIT_SHA zijn optionele overrides voor de health endpoint; defaults worden automatisch ingevuld.pnpm dev – run the local dev server on port 3000pnpm build – compile the Next.js app (output: standalone)pnpm start – serve the production buildpnpm lint – run ESLint (Next + Prettier config)pnpm format – check formatting with PrettierThis repository contains two separate services that should be deployed as two separate Railway services:
core.innersync.techPurpose: Marketing/landing page, documentation, and status dashboard
Tech: Next.js 15, Node.js
Dockerfile: Dockerfile.dashboard
Railway Config: railway.toml
This service is deployed as a submodule within the main Alphapy repository. Configure Railway manually:
/shared/innersync-core/railway.toml/shared/innersync-core/shared/innersync-core/**Dockerfile.dashboard (auto-detected)PORT; container exposes 8080/api/health (Next.js API route)GET /api/health → { status, commitSha, buildTime }GET /api/metrics → Mock/aggregated telemetry (for status page display)api.innersync.techPurpose: Backend data API for user resources and telemetry
Tech: FastAPI, Python 3.12, asyncpg
Dockerfile: core-api/Dockerfile
Railway Config: core-api/railway.toml
Deploy as a separate Railway service:
core-api/railway.tomlcore-api/ if needed)core-api/DockerfileSUPABASE_URL=https://<project-ref>.supabase.co
SUPABASE_ANON_KEY=<public-anon-key>
SUPABASE_SERVICE_ROLE_KEY=<service-role-key> # Required for telemetry persistence
SUPABASE_DB_URL=postgresql://<user>:<password>@<host>:6543/postgres
CORS_ALLOWED_ORIGINS=https://app.innersync.tech,https://mind.innersync.tech,https://core.innersync.tech,https://alphapy.innersync.tech
ALPHAPY_SERVICE_KEY=<service-api-key> # Required for ingress endpoints (same value as ALPHAPY_SERVICE_KEY in Alphapy)
INGRESS_SERVICE_KEY=<service-api-key> # Optional fallback (Alphapy uses ALPHAPY_SERVICE_KEY)
RATE_LIMIT_CLEANUP_INTERVAL=600 # Optional: rate limit cleanup interval in seconds (default: 600)
/health (FastAPI endpoint)User Endpoints (require Supabase Bearer token):
GET /health → { status, service, timestamp }GET /users/me → Current user info (requires auth)GET /profiles/me → User profile (requires auth)GET /reflections → User reflections (requires auth)GET /trades → User trades (requires auth)GET /insights → User insights (requires auth)GET /dashboard/summary → Combined dashboard payload (requires auth)GET /api/metrics → Real telemetry with direct DB connectionIngress Endpoints (require X-API-Key header):
POST /ingress/telemetry → Ingest telemetry snapshots (rate limit: 60/min)POST /ingress/operational-events → Ingest operational events (rate limit: 200/min)Core (Next.js):
node:20-alpine → pnpm 10.19.0 (corepack)
deps → install dependencies
build → pnpm build (standalone output)
run → copy .next/standalone + static + public, run `node server.js`
Core API (FastAPI):
python:3.12-alpine
deps → pip install requirements.txt
run → uvicorn app.main:app --host 0.0.0.0 --port 8080
prefers-reduced-motion is set.og.png preview.GET /api/health → { status, commitSha, buildTime }GET /api/metrics → unified telemetry snapshot for Core, API, and Alphapy (see types/telemetry.ts)/status polls both endpoints every 15 seconds. The metrics endpoint returns a payload shaped like:
{
"generatedAt": "2025-01-05T10:52:00.000Z",
"summary": {
"overallStatus": "operational",
"incidentsOpen": 0,
"totalRequests24h": 172800
},
"subsystems": {
"core": {
"id": "core",
"label": "Core",
"status": "operational",
"uptimeSeconds": 268000,
"throughputPerMinute": 184,
"errorRate": 0.42,
"latencyP50": 108,
"latencyP95": 162,
"queueDepth": 7,
"notes": "Event bus nominal",
"lastUpdated": "2025-01-05T10:52:00.000Z"
},
"api": { "...": "..." },
"alphapy": { "...": "..." }
},
"trends": {
"throughput": [{ "timestamp": "2025-01-05T10:48:00.000Z", "value": 480 }],
"errorRate": [{ "timestamp": "2025-01-05T10:48:00.000Z", "value": 0.6 }]
}
}
Mind (and other services) can publish real metrics in this format; the marketing surface renders it immediately without a schema switch.
Both services connect to the same Supabase instance but serve different purposes:
Important: Add the
telemetryschema to Exposed Schemas in Supabase Studio (Settings → API). Otherwise PostgREST only acceptspublicandgraphql_public, causing 406 errors.
The Core API provides two ingress endpoints for external services (like Alphapy) to submit telemetry data:
Both endpoints require the X-API-Key header with a service key:
ALPHAPY_SERVICE_KEY environment variableINGRESS_SERVICE_KEY environment variableThe same key value should be used in both Core API and the external service (e.g., Alphapy).
Rate limit exceeded responses include a Retry-After header indicating seconds until retry.
Ingest telemetry snapshots from external services.
Request Body:
{
"snapshots": [
{
"subsystem": "alphapy",
"label": "Alphapy Agents",
"status": "operational",
"uptime_seconds": 3600,
"throughput_per_minute": 90,
"error_rate": 0.8,
"latency_p50": 110,
"latency_p95": 165,
"last_updated": "2025-02-12T10:00:00Z",
"computed_at": "2025-02-12T10:00:00Z",
"queue_depth": null,
"active_bots": 42,
"notes": "Most recent playbook sets are green"
}
]
}
Response: {"count": 1}
Notes:
{"snapshots": []} → {"count": 0} (200 OK)ON CONFLICT (subsystem) DO UPDATE for upsert behaviorIngest operational events from external services.
Request Body:
{
"events": [
{
"timestamp": "2025-02-12T10:00:00Z",
"event_type": "BOT_READY",
"guild_id": "123456789",
"message": "Bot connected successfully",
"details": {
"version": "1.0.0",
"guild_count": 5
}
}
]
}
Event Types:
BOT_READYBOT_RECONNECTBOT_DISCONNECTGUILD_SYNCONBOARDING_ERRORSETTINGS_CHANGEDCOG_ERRORResponse: {"count": 1}
Notes:
{"events": []} → {"count": 0} (200 OK)guild_id is converted from int to string automatically{"detail": "Invalid API key"}
{"detail": "Batch size exceeds maximum of 1000"}
{"detail": "Rate limit exceeded"}
Includes Retry-After header with seconds until retry.
{"detail": "Internal server error"}
# Telemetry endpoint
curl -X POST https://api.innersync.tech/ingress/telemetry \
-H "X-API-Key: your-service-key" \
-H "Content-Type: application/json" \
-d '{
"snapshots": [{
"subsystem": "alphapy",
"label": "Alphapy Agents",
"status": "operational",
"uptime_seconds": 3600,
"throughput_per_minute": 90,
"error_rate": 0.8,
"latency_p50": 110,
"latency_p95": 165,
"last_updated": "2025-02-12T10:00:00Z",
"computed_at": "2025-02-12T10:00:00Z"
}]
}'
# Operational events endpoint
curl -X POST https://api.innersync.tech/ingress/operational-events \
-H "X-API-Key: your-service-key" \
-H "Content-Type: application/json" \
-d '{
"events": [{
"timestamp": "2025-02-12T10:00:00Z",
"event_type": "BOT_READY",
"message": "Bot connected successfully",
"details": {}
}]
}'
See LICENSE for project licensing details.