Next.js developer in Madrid

Next.js for businesses in Madrid, delivered remotely by one developer.

Next.js developer

My place in the WordPress community

  • I have had a wordpress.org account since 2006.
  • I contributed to WordPress core for versions 7.0 and 7.1.
  • I maintain 30 plugins on wordpress.org.
  • I organise and speak at WordCamps.
  • I have attended every WordCamp Europe from 2017 to 2026.

My WordPress.org profile

A tender monitor for Spanish public contracts starts with data that already exists in the open. The Plataforma de Contratación del Sector Público (PLACSP) publishes it as open data, and this page covers how that data is organised, what an entry holds, and where a Next.js app fits. I am not a lawyer, and reuse conditions are for you and your adviser to confirm.

Puerta de Alcalá in Madrid

The Puerta de Alcalá in Madrid, seen from the Plaza de la Independencia side. Photo: Selbymay, CC BY-SA 3.0, Wikimedia Commons.

#What open data does Spain’s procurement platform publish?

The PLACSP open data page lists four datasets, all in open, machine-readable formats:

  • tenders published on buyer profiles hosted on PLACSP, excluding minor contracts
  • tenders published on PLACSP through aggregation, which covers regional platforms that run their own systems
  • minor contracts published on buyer profiles hosted on PLACSP
  • the buyer profiles of the contracting bodies themselves

The page says the files are published on the open data portal of the Ministerio de Hacienda, prepared by the Subdirección General de Coordinación de la Contratación Electrónica. That portal did not answer my automated requests, so I did not read its page on file naming and conditions. Everything below about file layout comes from the PLACSP page, the official OpenPLACSP manual and the live feed itself.

The same page offers OpenPLACSP, a tool that turns the open data into spreadsheets. It runs on Windows or Linux with a Java virtual machine and is distributed under the EUPL 1.2. A Next.js project does not need it, but its manual is the best public description of the file layout.

#How is the PLACSP Atom feed organised?

The OpenPLACSP manual (version 2.2, dated 12 May 2025) states that the open data are presented as Atom/XML following RFC 4287. The key points for an ingestion job:

  • Data are grouped in zip files by year, and the current year is provided monthly.
  • The zip of the latest month is updated daily.
  • Syndication 643 holds the tenders published on PLACSP buyer profiles, excluding minor contracts.
  • Each zip holds many Atom files. They store entries in chronological order, and each Atom carries a reference to the next file to process.
  • The base file of syndication 643 is licitacionesPerfilesContratanteCompleto3.atom, and every monthly zip has a base file with the same name. The manual warns to unzip the oldest month first so the newest base file overwrites the older ones.
  • Monthly files follow a pattern such as licitacionesPerfilesContratanteCompleto3_202101.zip under sindicacion/sindicacion_643/.

The manual also says entries contain updates with data on the tenders. One tender can therefore appear several times, and the monitor keeps the latest state.

#What is inside a feed entry?

I fetched the base file of syndication 643 on 4 December 2026. Its header declared an updated value of 30 November 2026, linked itself as self and first, and pointed to a timestamped file as next. That first page held 183 entries and about 5 MB. An entry in that page had these parts:

  • an id and a link to the tender detail page on PLACSP
  • a human-readable summary: tender ID, contracting body, amount in EUR and status
  • a title and an updated timestamp
  • a ContractFolderStatus block in the CODICE vocabulary, with the contract folder ID, the status code and the contracting party, including its name, tax ID and address
  • the procurement project: name, contract type, budget amounts, CPV classification and place of execution with a NUTS code
  • the tendering process and, where present, the TenderSubmissionDeadlinePeriod with an end date and time

The status codes come from the official code list SyndicationContractFolderStatusCode 2.04:

CodeSpanish name in the list
PREAnuncio previo
PUBEn plazo
EVPendiente de adjudicación
ADJAdjudicada
RESResuelta
ANULAnulada

The feed header also declares the Atom tombstone namespace. I saw no deleted entries on the page I read, and I could not reach the syndication specification that the manual cites, so how removals are signalled is a question to settle before relying on the feed.

#How do I filter tenders for Madrid?

The place of execution carries a NUTS code from the list NUTS-2021. In the page I read, an entry for Madrid showed the name “Madrid” with the code ES300. A Madrid filter on that code finds tenders executed in the province. It does not find tenders issued by a Madrid contracting body that are executed elsewhere, because the contracting party is a separate block. A monitor for a Madrid company usually wants both, plus a CPV filter for its own trade and the submission deadline for ordering.

Match status codes on the code, not on the Spanish name, and keep the code list in your repository so that a new code does not break a switch statement.

#Should Next.js read the feed directly?

Not on each request. A first page of about 5 MB, followed by timestamped files, is an ingestion job, not a page render. The Next.js Route Handler documentation says a route file supports GET and POST among other methods, and that cached GET data can be revalidated through the revalidate segment config. That fits the read side: a Route Handler or Server Component reads normalised rows from your database and caches the result.

The write side belongs outside the request path, in a scheduled job or worker that follows the next links and stores entries. The documentation also points to background jobs for long-running work. A sketch of the loop:

// runs as a scheduled job, not inside a request
const FIRST =
  'https://contrataciondelestado.es/sindicacion/sindicacion_643/licitacionesPerfilesContratanteCompleto3.atom'

export async function ingest(since: Date) {
  let url: string | null = FIRST
  while (url) {
    const res = await fetch(url, { headers: { 'User-Agent': 'tender-monitor/1.0' } })
    if (!res.ok) throw new Error(`PLACSP feed returned ${res.status}`)
    const page = parseAtom(await res.text()) // your XML parser: entries, next link
    for (const entry of page.entries) {
      if (entry.updated > since) await upsertByFolderId(entry) // keep the newest state
    }
    if (page.entries.every((e) => e.updated <= since)) break
    url = page.next
  }
}

Stopping only when a whole page is older than the last run stays correct whatever the order inside a page.

#How do I keep the monitor current?

Run the job on a schedule, keep the highest updated value you stored, and read the live feed rather than the monthly zips for daily work. Use the zips for the initial load: download the months in order, oldest first, as the manual says. Store the raw id and updated of each entry next to the parsed fields, so a parsing fix can be replayed without downloading again.

Alerts are the product, not the table. A saved search that matches CPV, NUTS code and amount, plus a status change from PUB to EV or ADJ, is what a bidder reads. Next.js renders the saved searches and the tender pages, and the job decides what counts as a new event.

#What can go wrong with the feed?

  • Size. The base file I read was about 5 MB. Stream or limit memory in the parser, and never parse it in a serverless request.
  • Firewall. The portal rejected one of my plain requests with a “Request Rejected” page and served the same address on another try. Treat that as observed behaviour, send a descriptive User-Agent, retry with a pause and log the status.
  • Duplicates. Entries are updates, so key by contract folder ID and keep the newest.
  • Encoding. The code list file I fetched declares ISO-8859-1. Do not assume UTF-8 for every file the portal serves.
  • Scope. Minor contracts live in a separate dataset. A monitor that must show them reads the minor contracts feed too.

#What about licence and reuse rules?

The PLACSP page lists Ley 37/2007 on the reuse of public sector information among its further reading, together with the Real Decreto 1495/2011 that implements it for the state public sector. I did not reach the conditions on the Hacienda open data portal, so I cannot tell you the licence text or the attribution wording. Read them before you publish a product built on the data, and ask your adviser about personal data in the entries, such as contact names and emails of contracting bodies.

#Where does a tender monitor start?

It starts with one question: which tenders does your company bid on? Send the CPV codes, the provinces, the amount band and the alert channel through the contact page, and I will answer with a written plan for the ingestion job, the database fields and the Next.js screens. The written estimate for the ingestion job and the monitor screens costs nothing. Dashboards and the rest of my application work are described on the Next.js developer page.

Need this service: Next.js developer in Madrid?

Describe your project by e-mail. I reply within 24 hours.

Describe your project

Explore other WordPress services and knowledge base