Automate a job board with Next.js, Prisma, and n8n

Two mobile app screens showing job search interface.

Job boards are a common side project, but the data problem kills most of them. Postings expire fast. Formatting is all over the place. Manual entry does not scale past a few hundred listings. The developer behind WadifaPublic.ma solved this by cutting humans out of the pipeline entirely: no CMS, no manual entry, no custom cron scripts to babysit.

Here is the three-part architecture they built and how each piece connects.

️ The Stack

Three tools do all the work:

  • n8n: handles scheduling, scraping, and API orchestration
  • Prisma: manages the database schema, migrations, and upserts against PostgreSQL
  • Next.js: delivers server-side and statically generated pages optimized for SEO

No traditional CMS sits between the data and the frontend. The pipeline writes directly to the database, and Next.js reads from it at build or request time.

Step 1: Automated Data Collection with n8n

MacBook Pro on top of brown table

The developer chose n8n over custom Python scripts to avoid managing execution failures manually. n8n’s visual workflows make it easier to inspect what broke and why.

The workflow runs on a daily cron trigger and targets public sector portals and company career pages. It extracts raw HTML, parses the relevant nodes (job title, requirements, deadlines), and outputs clean JSON before passing it downstream.

Step 2: LLM-Assisted Structuring and Database Writes

Raw job descriptions are messy by default. Before anything touches the database, the n8n workflow passes the raw text to a local LLM. The model extracts hiring requirements, formats salary expectations, and generates a structured summary.

That structured JSON gets sent via webhook to a Next.js API route. Prisma then validates the payload against the schema and upserts it into PostgreSQL. Duplicate handling is built into the upsert pattern, so re-scraping the same listing does not create duplicate records.

a computer screen with a bunch of code on it

Step 3: Programmatic SEO with Next.js Dynamic Routing

For a job board, search visibility is the distribution strategy. You are not fighting for brand keywords. You are chasing long-tail queries like “Technician jobs in Casablanca 2026.”

Next.js dynamic routing handles this automatically. Every new database entry generates its own optimized page without a developer touching anything. The developer injects Schema.org JobPosting structured data directly into the <head> of each page, which qualifies the listing for the Google Jobs widget in search results.

Pages are delivered via Incremental Static Regeneration (ISR) or server-side rendering, keeping load times fast without requiring a full rebuild on every new listing. Faster pages rank better.

What the Finished Pipeline Looks Like

  1. n8n triggers daily, scrapes target portals, parses HTML into raw JSON
  2. Raw text passes to a local LLM for structuring and summary generation
  3. Structured JSON posts to the Next.js API route via webhook
  4. Prisma validates and upserts the record into PostgreSQL
  5. Next.js ISR or SSR serves the new listing page automatically
  6. Google indexes the new listing within hours of publication

The Result

The live implementation is WadifaPublic.ma, which aggregates public sector jobs in Morocco with zero manual data entry. New listings go from source to Google-indexed page without anyone touching a keyboard between those two points.

If you are building a niche job board, directory, or any content site where SEO is the growth engine, this three-part pattern (n8n for collection, LLM for structuring, Next.js ISR for publishing) is worth borrowing directly.

Stay on top of AI & Automation with BizStack Newsletter
BizStack  —  Entrepreneur’s Business Stack
Logo