Building LLM Cloud Hub: A Symfony 7 LLM API Comparison Platform from Zero to Production
I shipped llmcloudhub.com in about a week. It's a reference catalog comparing every major LLM API by price, capability, context window, and compliance β built on Symfony 7.4 + Doctrine ORM 3 + Tailwind v4 + Imagick, deployed to Uberspace via one idempotent shell script. This post is the honest dev-journal version: tech choices, architectural calls, what worked, what I'd rethink.
Why this exists
The LLM API market fragments faster than anyone can track. OpenAI, Anthropic, Google, DeepSeek, Mistral, Cohere, Meta, AI21, MoonshotAI, x.ai β each ships new pricing tiers and capabilities monthly. Existing comparison sites are either ad-laden, out of date, missing the wedge features (compliance, self-hosting cost, alternatives by similarity), or all three.
The goal: a zero-friction reference site that's accurate to the hour, opinionated about which APIs fit which workload, and structurally optimized so Google and AI Overviews can ingest it.
Tech stack and why
| Layer | Choice | Why |
|---|---|---|
| Framework | Symfony 7.4 | Mature, ergonomic, AsyncResolver everywhere, Doctrine 3 finally clean |
| ORM | Doctrine ORM 3 | Migrations + Schema validation + native lazy objects on the way |
| DB | MariaDB 10.6 | What Uberspace ships; PostgreSQL would have been nicer but adds infra complexity |
| Frontend | Tailwind v4 (CSS-first) + Stimulus + AssetMapper | No Node toolchain in production, fewer moving parts |
| Components | TwigComponent + LiveComponent | Server-rendered HTML with surgical reactivity |
| Image processing | Imagick (Uberspace ships it) | Dynamic OG images for every model/compare/provider page, file-cached on disk |
| Hosting | Uberspace 7 | Apache + per-account PHP, ~β¬10/mo, German jurisdiction |
| Deploy | Bash + rsync + ssh | One script, idempotent, ~140 seconds end-to-end |
I deliberately avoided React/Vue/Next.js. The interactivity surface is small (cost calculator, consent banner, accordion FAQs); native HTML and Stimulus cover it without a build pipeline. Page weight stays low, every URL is a real HTTP route, and there's no hydration jitter.
Architecture
The data flow is intentionally boring:
Nightly cron @ 02:17 β app:fetch-openrouter
β
OpenRouter public catalog (JSON)
β
ModelSyncService.sync()
- Insert new providers/models
- Detect pricing changes
- Append pricing history rows
β
MariaDB
β
HTTP requests render from live DB
The single source of truth is OpenRouter's public catalog. They aggregate official pricing from every provider and expose it as a free, no-auth JSON endpoint. My sync command pulls nightly, diffs against MariaDB, and appends new ModelPricing rows when prices change β so price history is queryable and the homepage can surface "what changed in the last 48h" automatically.
A tilde-prefix bug almost shipped to production: OpenRouter exposes "rolling latest" aliases like ~anthropic/claude-sonnet-latest. The leading ~ leaked into derived provider names via ucfirst(), creating duplicate ~anthropic provider rows in the DB. One-line fix in the fetcher (ltrim($slug, '~')), one test, one cleanup migration on the live DB. The whole class of "subtle data-shape bugs" is why I shipped fixtures-based integration tests early.
The wedge features
Most LLM comparison sites do "price per million tokens" and stop. The wedges I built:
Compliance filter. Every provider is flagged for EU-hosted, HIPAA BAA, SOC 2 Type II, GDPR DPA, ISO 27001. Procurement teams searching "HIPAA LLM API" find a curated list, not 40 vendor blog posts.
Cost calculator. Plug in your monthly input/output token volumes, get $/month per model. Far more decision-relevant than a per-token sticker price, because workload shape (input-heavy summarization vs. output-heavy generation) changes the cheapest model dramatically.
Alternatives finder. Given any model, surfaces the closest cross-provider competitors ranked by capability overlap (Jaccard on capability arrays), context-window proximity (log-space distance), and per-million-token price proximity. Used both as a UX feature (/alternatives/openai/gpt-4o) and as an SEO wedge β ~365 long-tail pages, one per model.
Self-hosting comparison. For open-weight models (Llama, Qwen, DeepSeek), shows API cost vs. self-hosting cost at varying utilization. Most teams who consider self-hosting underestimate the break-even point.
Use-case-driven recommendations. "Best LLM for coding", "best LLM for RAG", "best LLM for translation" β each ranks the catalog by a use-case-specific cost+capability scoring function, with workload defaults tuned for the use case. Hand-curated content explains why certain capability profiles matter.
SEO foundations
The site is 7 days old at the time of writing. It already ranks #1 for "llm cloud hub" and page 5 for niche queries like "Gryphe LLM". The compounding work that got it there:
Structured data on every page type. Service schema for models (not Product β that triggers Google's Merchant Listings parser, which then demands shipping/returns fields). Organization for providers. ItemList for compare pages. FAQPage everywhere β model, compare, alternatives, provider, compliance, best-LLM-for, home. BreadcrumbList for site structure. WebSite with SearchAction for the eventual sitelinks search box. Combined into single @graph envelopes per page.
Dynamic FAQs derived from real data. No LLM calls, no fabrication β template-driven generators that interpolate live DB values into natural-language Q&As. "What is GPT-4o?", "How much does GPT-4o cost?", "Can I self-host GPT-4o?". Templates fixed; answers update when nightly sync changes the underlying data. Cheap, fast, hallucination-free.
Dynamic OG images. 1200Γ630 PNG generated per model/compare/provider via Imagick, cached on disk with cache keys including pricing-changed timestamps so price updates auto-invalidate. Bundled DejaVu Sans for byte-identical renders across dev/prod.
Three sitemaps. Machine-readable sitemap.xml (with XSL stylesheet for human curiosity), individual sub-sitemaps per category, and a hand-built HTML sitemap at /sitemap for both humans and internal link distribution. Resolves SEMrush's "pages with only one incoming internal link" warning at scale.
llms.txt. New convention for AI crawler hints. Single Markdown file at /llms.txt describing what the site is, key URLs, and content categories. Cheap insurance against the next round of AI-crawler discovery protocols.
Privacy-first analytics
Google Tag Manager loads only after explicit consent. Default-deny via Consent Mode v2 in the <head> inline script before GTM is allowed near the page. The consent banner is built in Stimulus, persists decisions to localStorage with a versioned schema, and surfaces a footer "Cookie settings" trigger so users can revoke at any time. EU users (the majority of the site's target audience) see a fully GDPR-compliant flow that doesn't lie about defaults.
GTM's Container Quality dashboard flags this as "Urgent: 0% consent rate detected" because their heuristic assumes 100% denial means broken setup. It's actually correct behavior β the warning will resolve naturally once real users start clicking Accept. I considered switching to Advanced Consent Mode (which loads GTM immediately with cookieless pings) but kept Basic to preserve the site's privacy posture as a wedge feature alongside the compliance filter.
Deployment
One bash script. ./deploy.sh does:
- SSH preflight
- Abort on uncommitted changes (overridable)
- Run PHPUnit locally (must pass)
- Build Tailwind locally
- Rsync to Uberspace, excluding dev artifacts
- Remote:
composer install --no-dev,composer dump-env prod,asset-map:compile,doctrine:migrations:migrate,cache:clear,doctrine:schema:validate, refresh crontab (3 lines: nightly sync, weekly review, weekly GSC digest) - Smoke-test the live URL + API endpoint
End-to-end: ~140 seconds. The whole stack β code, assets, migrations, cron β is one command. Idempotent: rerunning when nothing changed is a no-op. The script lives in the repo; deployment is reviewable.
What I'd rethink
MariaDB over PostgreSQL. I went with what Uberspace ships, but PostgreSQL's JSONB indexing would have been useful for the capability/compliance arrays.
Tailwind v4's CSS-first config. Fast and clean, but documentation for v4 patterns is still thin β I burned 30 minutes debugging an @theme interaction with Stimulus controllers.
Earlier OG image rollout. I shipped OG images on day 4. The first LinkedIn shares (which I tested with) cached without images and the cache TTL is ~30 days. Should have shipped them on day 1.
Provider-level editorial content. Every model page has FAQs; provider pages have FAQs derived from data but no hand-written intro paragraphs. For "Gryphe LLM" type queries, the editorial intro is the difference between page 2 and page 5. Coming in v1.1.
Resources
- Live site: llmcloudhub.com
- Public JSON API: llmcloudhub.com/api/v1/models
- Sitemap: llmcloudhub.com/sitemap
- llms.txt: llmcloudhub.com/llms.txt
If you're building something adjacent β pricing catalogs, capability dashboards, anything where the data refreshes nightly and rich snippets matter β feel free to reach out. The full structural foundation (FAQ generators, JSON-LD @graph envelopes, sitemap fan-out, deploy script) is reusable in spirit, if not in code.
Author Amer Malik Mohammed
Full-Stack Developer with 2+ years of experience in object-oriented PHP development (Symfony), JavaScript and MySQL. Specialized in e-commerce solutions (Shopware 5/6), REST API development and process automation in agile teams.
Contact author