DEV Community

Florian
Florian

Posted on

Week 8 of 40 – Giving CatAtlas a Real Identity (and Tests)

Objective of the week

Strengthen the CatAtlas foundation by introducing a real identity layer and a new dimension of data, while adding automated tests for the first time.

The goal was to move beyond individual sightings and start modeling cats as entities, supported by AI-assisted summaries and backed by tests so the system can evolve safely.


What I built

This week I extended CatAtlas in several important ways:

  • Introduced an explicit Cat identity (cats table) separate from sightings
  • Turned entries into true sightings, optionally linked to a cat
  • Added photo support (via photo URLs for now)
  • Built a GenAI-style cat profile that aggregates multiple sightings into a single, readable description
  • Added automated tests using pytest and FastAPI’s TestClient

CatAtlas now has:

  • facts (sightings),
  • identities (cats),
  • derived knowledge (AI enrichment and profiles),
  • and guardrails (tests).

What I learned

  • Why separating observations from identity is critical in AI-assisted systems
  • How to evolve a database schema incrementally without breaking existing data
  • How to introduce a new data dimension (photos) without overengineering uploads
  • How GenAI-style features often start as aggregation + templating, not models
  • How to write integration-style tests against real FastAPI endpoints
  • How to make a codebase safer to change by testing behavior, not implementation

What was hard / surprising

  • Managing TypeScript and backend contracts as the data model grew
  • Understanding where identity decisions should live in the system
  • Debugging test import paths and environment-specific database behavior
  • Realizing how quickly complexity increases once entities relate to each other

The biggest challenge wasn’t writing code — it was keeping the mental model clean.


What I’ll do next week

Next week, I want to build on this foundation by making CatAtlas more visual and interactive.

Possible directions:

  • real photo uploads instead of URLs,
  • basic UI flows for assigning sightings to cats,
  • or preparing the system for actual vision-based matching.

The focus will stay on structure first, intelligence second.

Top comments (0)