1 · Architecture
Two pieces: a static portfolio on DreamHost shared hosting, and an ASP.NET Core 8 minimal API (MercatusCartelRobot) on the VPS. The robot exposes three endpoints and loads its system prompt from MERCATUS_CARTEL_SYSTEM_PROMPT.md at boot.
- GET /health
- POST /api/mercatus-cartel/chat
- POST /api/mercatus-cartel/assist
The AI Studio workspace (screenshots below) is a separate multimodal prototype — same Blueprint brief, different runtime.
2 · Gemini call shape
The robot uses an OpenAI-compatible chat/completions body (model + temperature + messages) so the provider is swappable via config (Llm:BaseUrl, Llm:Model, Llm:ApiKey — the key lives in server env, never in this page). Retries: up to 4 attempts on 429/502/503/504 or "UNAVAILABLE / high demand" bodies, exponential backoff ~0.6 s → 1.2 s → 2.4 s with jitter.
Pick an endpoint and scenario to see the request and response shapes:
3 · Assist bridge
The HTTPS portfolio never calls a raw HTTP IP. Mercatus Assist probes health, then routes chat through a same-origin PHP proxy:
- Browser · mensmercatus.online
- →
- /api/cartel/index.php?path=…
- →
- VPS nginx
- →
- ASP.NET Core :5080
- →
- LLM chat/completions
If /health fails, Assist mounts DEMO keyword coaching instead — the chat never dead-ends. Open Assist →
4 · Deploy note
- Static site → DreamHost shared (files 644, dirs 755; additive uploads, never a wipe).
- .NET robot → VPS as a systemd service behind nginx; DreamHost's grsec kernel kills CoreCLR, so it cannot run there.
- Secrets stay in server env files; health reports
llmConfigured as a boolean, never the key.
- Rollback: restore the latest pre-deploy tarball on the shared host; restart the systemd unit on the VPS.