Tom Petit®
Solid foundations·Reading social network
LivreComment
Rate, review, list your reading and get real recommendations, not just a catalog.
Project in final stages
LivreComment cover

I wanted a reading social network that recommends for real. So I built a recommendation engine, a BNF catalog ingestion pipeline, and an API designed for mobile. The architecture of a system, not a page.

26 500
lines of code
9 300
lines of tests
15
business entities
21
migrations
lvl. 6
PHPStan
From business need to delivered product
The need
No polished French-speaking reading social network, with real recommendations rather than a plain catalog.
What was delivered
A catalog aggregated from 4 sources, a home-built recommender that learns your taste, an API-first design ready for a mobile app, tested component by component.
What the platform actually does

Streaming BNF ingestion

RDF parser on ~10 GB dumps at constant RAM, cross-referenced Wikidata SPARQL resolution, cascading deduplication.

"For you" recommendation engine

Signed taste profile + real IDF + scorer + orchestrator (6 classes), cache invalidated by taste signature. No ML library.

Multi-source search

Google Books + Open Library, deduplicated by canonical key, re-ranked by popularity.

API-first (API Platform 4)

Stable versioned DTO (public ULID), HTTP cache, JWT ready for future mobile.

Full social network

Follows, lists, reviews, likes, notifications, activity feed, 6 permission voters.

Defensive quality

PHPStan level 6, 85 test files (~35%), Argon2id, internal identifiers never exposed.

Under the hood
BNF ingestion with resume: offset checkpoint after interruption.
Formalized home-built recommender: TF-IDF, signed affinities, hard author rejection.
4-source identity resolution: QID → BNF ARK → OL Work ID → canonical key.
DTO decoupled from Doctrine: stable contract for mobile.
Async enrichment: Symfony Messenger (covers, descriptions).
Rector + PHPStan lvl. 6: tooled quality.
Stack & technical choices
Framework & ORMSymfony 7.4Doctrine 3
API & authAPI Platform 4Lexik JWTNelmio CORSArgon2id
Data & searchMySQL 8Meilisearch
Async & frontSymfony MessengerTwig/Stimulus/Turbo
QualityPHPUnit 12PHPStan lvl. 6Rector