Case study

AlerteConso

A public search interface over French RappelConso notices. It imports official records into PostgreSQL and preserves a direct link to each source notice.

AlerteConso mascot logo
Core stack
Go · PostgreSQL · HTML · CSS

Problem

Official data, difficult lookup

The official dataset contains the identifiers and dates needed to verify a recall, but its source shape is not designed for quick consumer search or combined filters.

My work

Ingestion, query and delivery

I implemented the data fetch and validation pipeline, PostgreSQL persistence, repeatable upserts, search and filter queries, read-only API routes, server-rendered pages, deployment configuration and tests.

Implementation

Repeatable imports and local queries

The importer downloads the official dataset, normalises flexible source fields and validates publication dates. Records are upserted by official ID. The API and interface query the local copy and always link back to the source notice.

  1. 01Fetch the public RappelConso dataset
  2. 02Decode flexible source fields and validate dates
  3. 03Insert or update records in PostgreSQL
  4. 04Serve search results with official notice links

Local query model

Store a queryable copy

PostgreSQL supports fast combined search, exact filters and pagination without depending on the upstream service for every page view. The trade-off is clear: AlerteConso becomes responsible for import repeatability and for communicating source freshness.

Idempotent imports

Upsert by official record ID

Imports use ON CONFLICT (id) DO UPDATE. Re-running an import refreshes an existing notice instead of creating duplicates. Source URLs and publication dates remain first-class fields rather than reconstructed metadata.

Failure handling

Invalid or unavailable source data

A record with an invalid publication date is skipped and counted as an error while valid records continue. If the upstream request fails, the import stops before any writes. The service does not yet show a last-sync timestamp, so an empty result is never proof that a product is safe.

Verification

Parsing and query behaviour

  • Go tests for source-shape decoding and date normalisation
  • Query tests for combined search, filters and pagination
  • Handler tests for API links, validation and response limits
  • Health and database-readiness endpoints for deployment