
Following the signals: building UrbanPulse
With UrbanPulse, I wanted to build a city view that brought weather, air quality and bike availability together. My projects tend to take me into different fields, and this was a chance to put my own touch on both the engineering and the way the application felt.
I invited Wissal Charkaoui to help with the engineering side. She was interested in data engineering, and working together gave me more room to work on the rest of the application. Mohamed Arkid is also part of the UrbanPulse team.
Paris and Casablanca became the two cities in the app. Their coverage isn't identical, which made the question of what to show a little more awkward than simply putting three numbers on a page. I needed to keep track of what each number meant, where it came from and when the source had actually reported it.
Starting with the feeds
I used Open-Meteo for current and hourly weather, and its air-quality API for CAMS data. Paris bike availability comes from the Vélib' GBFS feed. Those sources gave me the three views of the city I wanted, but they don't describe the city in the same way.
CAMS provides modeled air conditions at a grid location. It isn't a sensor on a particular street. A bike count belongs to a station snapshot, while weather has its own valid time. Putting them beside each other doesn't make those differences disappear, so I kept the source names, units and timestamps available in the interface.
For GBFS, I start at the discovery endpoint and find the station information and status feeds there. That keeps provider URLs out of the rest of the application. Each adapter then turns its payload into weather, air or mobility records before the API reads them.
Keeping the originals
I save the raw JSON before writing normalized observations. If a value looks wrong later, I'd rather have the provider's response to inspect than just the number my code produced. The payload stays connected to the pipeline run and its quality results.
Repeated delivery needs a little care. The source, city, mode and payload form a SHA-256 content ID, and the observation tables have unique keys too. Together, they let the same event pass through again without creating duplicate records. Retries are bounded, and collection failures are recorded when they can't be recovered.
For production storage, I kept PostgreSQL with PostGIS. The app needs time-window queries, station positions and hourly aggregates. A separate analytical database or geospatial service would add deployment and synchronization work without a measured need for it yet, so one store was a reasonable fit.
SQLite is still useful for local development and tests when Docker isn't running. It doesn't provide the PostGIS part of the platform, though. Production requires PostgreSQL and live mode; the local path isn't a substitute for checking that setup.
Replay reads the observations I've actually retained, with a time cutoff. Its history grows as the collector saves snapshots. Gaps stay gaps, which is less tidy than a continuous animation but keeps the replay tied to something I can inspect.
Keeping the first deployment small
The repository includes Kafka, Airflow and dbt. I kept them in an optional platform profile rather than making all three a requirement for serving the website. In that profile, Kafka separates frequent mobility collection from downstream processing, Airflow schedules the work, and dbt builds the analytical models.
That separation comes with some work of its own. At-least-once delivery can give the consumer the same event more than once, which is why persistence has to remain idempotent. The consumer only commits its offset after normalization and the quality pass have committed. Streaming the slower weather and air feeds would add machinery without the same benefit.
For the first Oracle deployment, I chose the smaller path: a direct Python collector, FastAPI, PostgreSQL/PostGIS, Next.js and Caddy. Weather and air collection run every thirty minutes, and Paris mobility runs every five. The optional platform is still there when I need to work with those boundaries.
The dbt switch is explicit as well. The API reads the hourly mart only when DBT_ENABLED is enabled. The small production stack leaves it disabled and reads normalized data, so a partially configured database can't quietly pretend a model has been built.
At this point in the project, the Docker setup and deployment guide were ready, but moving the live stack onto the Oracle VM was still ahead of me.
Not quite that simple
One feed mismatch was Vélib's status timestamp. The document uses lastUpdatedOther, while the adapter also needs to handle the usual GBFS last_updated field. I made it accept either, then fall back to the newest station last_reported value if neither is present.
That detail matters because a successful request can still retrieve an old snapshot. Collection time tells me when my code fetched it; it doesn't tell me when the source observed it. Freshness follows the source-reported time, and I keep the individual station report times in the raw payload for investigation.
Casablanca has a different limitation. Weather and modeled air are configured, but I haven't verified a public GBFS feed for it. Mobility, the station layer and replay therefore stay unavailable there. I can't fix that by borrowing Paris data or filling the space with demo values.
Demo fixtures are useful in development and tests. They go through the normalization path, are labeled in the interface and stay separate from live rows by mode. Production rejects demo mode. A missing live source still needs to look missing.
Making the interface feel like a place
I built the frontend with Next.js, React and TypeScript, and used MapLibre for the city maps. Getting the data onto the screen was only part of the work. On mobile, the hero felt too much like a stack of elements, and I wanted to give the map more room.
I moved the hero copy toward the bottom of the phone screen. Weather, environment and mobility sit in a horizontal signal strip, while the larger sections appear in sequence as you move down the page. GSAP and ScrollTrigger handle those transitions.
Some interactions needed a simpler approach. The cards under the city animation used to expand, and changing their height moved the section beneath them. I changed them to full-card links with their explanations already visible. That keeps the layout steady and gives touch and keyboard users the same content without depending on hover.
The source context still matters more than the animation. The quality and pipeline screens expose missing fields, freshness and collection runs. I can make a map easier to read, but I can't make an observation more current by presenting it nicely.
Where it goes from here
The limits of this version are fairly concrete. Casablanca still needs a verified mobility source, modeled air isn't a local sensor measurement, and the default seven-day retention window limits replay history.
I'd need to revisit retention and storage for a longer replay window. For another city, I'd start by checking its providers. Neither change needs a bigger architecture before there's a reason for it.
Keeping the original payloads, source times and collection results together gives me something to work from when a reading needs explaining. I'd keep those boundaries in the next version too.
Update: October 2026
The live stack is now running on Oracle. It uses the smaller Compose setup described above: the direct collector, FastAPI, PostgreSQL/PostGIS, Next.js and Caddy. Kafka, Airflow and dbt remain optional.
The deployment changes where the application runs, but it doesn't remove the source limits. The next useful addition is still a verified mobility feed for Casablanca, alongside whatever retention the available replay history actually needs.