Developer runs 1,699-record academic site on JSON files, uncovers silent data bugs
A developer has been running ryzenstudy.com, an exam paper repository with 1,699 records, using flat JSON files instead of a traditional database for several months. The Next.js 15 app stores all data in a single file under one megabyte, with every query handled via JavaScript array filters and every write via a synchronous file operation. After months of smooth operation, the developer discovered 95 uploaded papers were effectively unreachable due to duplicate URL slugs generated from subject name and year alone. The root cause was that the same subject, such as Deep Learning, is issued under different course codes for different university branches, producing identical slugs for distinct exam papers. Unlike a relational database, which would have enforced a unique constraint and flagged the conflict immediately, the JSON approach silently allowed duplicate slugs to accumulate, requiring a custom collision-aware slug generation fix.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in