Skip to content
ES (Español)Let’s talk

own project · applied AI

CertEngine

Practice for certifications with questions that adapt to your level, generated by an AI running on a self-hosted server.

Online at cert.ericmartinezf.dev. It isn’t taking new users for now while it’s being updated.

1 · The idea

What it solves and who it’s for

Studying for technical certifications is often inefficient. Practice platforms have a fixed question bank, don’t tell you which topic you’re weakest in, and don’t explain why an answer is wrong.

CertEngine generates new questions from the official documentation and from your performance, and explains every answer. The AI runs on a self-hosted server, so the data never leaves it.

For anyone preparing technical certifications. It started with n8n and Power Platform.

Official documentationof the certificationThe AI writes questionswith that contextYou practice and reviewbased on your results
runs on a self-hosted server

2 · The case

Started as my own problem

Preparing for my n8n and Power Platform certifications, I tried several available practice platforms. They all had the same problem: a fixed question bank that never changes, no diagnosis of which domain you’re weakest in, and no explanations that actually teach you why an answer is wrong.

The obvious solution was to build something that generated new questions based on my performance. And while building it, I got more interested in the underlying technical problem: how to connect an LLM to a real certification documentation corpus so the generated questions are relevant, not hallucinated.

CertEngine started to solve my own problem. It ended up being the most complete full-stack AI development exercise I’ve done, and it runs in production on the same homelab where I experiment with everything else.

Browser or app (PWA)Cloudflare Tunnel + Traefikcertengine-webNginx + Reactcertengine-apiFastAPIPostgreSQL+ pgvectorRedis+ RQ workerOllamaQwen 2.5 7Bit all runs on my homelab

How it’s built

CertEngine doesn’t have its own server: it uses the homelab’s shared infrastructure. stack_postgres, stack_redis and stack_ollama are the same containers used by Gitea, Outline and GlitchTip. That reduces the RAM footprint and simplifies backups: pg_dump covers all schemas in a single command.

8 decisions with documented trade-offs

  1. 01

    FastAPI over Django

    Chose:
    FastAPI
    Why
    Native async for Ollama calls (3–10 s latency). Auto-generated OpenAPI serves as spec during development. More explicit than Django for pure APIs.
    Trade-off
    Less “batteries included.” More developer responsibility for configuring auth, ORM and middleware.
  2. 02

    React + Vite over Next.js

    Chose:
    React + Vite
    Why
    CertEngine doesn’t need SEO: it’s a private-use SPA. Next.js adds SSR, App Router and RSC, which are unnecessary complexity for this case.
    Trade-off
    If a public landing page with SEO is ever needed, a migration or a separate static page would be required.
  3. 03

    RQ over Celery

    Chose:
    RQ
    Why
    Jobs are few and predictable: generating questions and scraping certifications. Celery adds a beat scheduler and multiple queues that are unnecessary at this volume.
    Trade-off
    RQ is less scalable. If volume grows to 50+ concurrent jobs, migrating to Celery would be needed.
  4. 04

    SM-2 over FSRS

    Chose:
    SM-2
    Why
    Well documented, works for 100–500 cards. FSRS is more accurate but needs user training data to calibrate, which isn’t available in the MVP.
    Trade-off
    SM-2 is less accurate for long-term memory. Migrating to FSRS is possible in v2 without schema changes.
  5. 05

    BeautifulSoup over Playwright

    Chose:
    BeautifulSoup
    Why
    Microsoft Learn and Google Cloud pages render server-side. No headless browser needed: ~0.5 s per page vs ~3–5 s for Playwright just to start.
    Trade-off
    If a provider moves to a client-rendered SPA, a PlaywrightScraper fallback would be needed.
  6. 06

    JWT in httpOnly cookies

    Chose:
    httpOnly cookies
    Why
    Mitigates XSS: frontend JavaScript can’t read the token. More secure than localStorage, where any injected script can access it.
    Trade-off
    More complexity with CORS and SameSite. Requires configuring the nginx proxy to pass cookies.
  7. 07

    pgvector as optional

    Chose:
    pgvector (NULL = no embedding)
    Why
    Enables semantic search when an embedding is present. If NULL, core functionality is unaffected: it’s an enhancement, not a prerequisite.
    Trade-off
    Generating embeddings requires running an additional model (nomic-embed-text). Intentional technical debt.
  8. 08

    Local Ollama over an external API

    Chose:
    Ollama + RTX 3070
    Why
    Full privacy: data never leaves the server. 83 tok/s vs ~8 tok/s on CPU. No dependency on paid external APIs.
    Trade-off
    The local model (Qwen 2.5 7B) is less capable than GPT-4 or Claude. Requires specific hardware for acceptable inference.

What I didn’t know before building this

  1. The RAG bottleneck isn’t the model

    It’s the quality of the context you pass it. Questions generated from clean scraped content are dramatically better than those from unprocessed text. The difference isn’t in the prompt: it’s in the input.

  2. Async in FastAPI isn’t magic, it’s discipline

    A single synchronous blocking function in the critical path can cancel all async benefits. Learning to spot them was the steepest learning curve of the project.

  3. Designing pgvector as optional from day 0 was right

    Designing the feature as gracefully degradable kept core development unblocked while the embeddings pipeline wasn’t ready. A pattern I’ll repeat: design features as optional enhancements, not dependencies.

3 · The code

The repository, the demo and the full stack.

The complete stack

LayerTechnology
BackendFastAPI 0.115 + Python 3.12 (native async)
ORMSQLAlchemy 2.0 async + Alembic 1.13
ValidationPydantic v2
Authpython-jose + passlib + Google OAuth (authlib)
QueueRedis + RQ workers (generate_questions_task)
FrontendReact 18 + Vite 5 + TypeScript 5
StylesTailwindCSS + shadcn/ui
Data fetchingTanStack Query v5
RouterReact Router v6
PWAvite-plugin-pwa 0.20
DatabasePostgreSQL 16 (shared stack_postgres)
Vector searchpgvector 0.7 (optional embeddings)
LLMOllama · Qwen 2.5 7B Q4_K_M · RTX 3070

Have a process that could be solved like this?

Tell me the problem; we’ll see together whether AI makes sense, and where.

Tell me about your problem