2024
Internal Inventory API
Replaced a shared spreadsheet with a proper API so three internal tools could read and update stock levels without overwriting each other.
Role
Backend Engineer
Status
Internal
Context
Multiple internal tools updated the same inventory spreadsheet directly, which regularly caused overwritten changes and incorrect stock counts.
My responsibility
Designed and built the API and database that replaced the spreadsheet as the single source of truth.
Constraints
The three existing tools couldn't be rewritten at the same time as the API, so it had to support a gradual migration rather than a single cutover.
System
Engineering decisions
Optimistic locking on stock updates
Each update includes a version number, so concurrent writes fail loudly instead of silently overwriting each other.
Dual-write compatibility layer
During migration, a compatibility endpoint kept the old spreadsheet export working for tools that hadn't switched over yet.
Problems encountered
Data drift during migration
The reconciliation job occasionally flagged mismatches between the spreadsheet export and the API's stock counts during the transition period.
Solution
Added a daily reconciliation report that surfaced mismatches for manual review until every tool was fully migrated.
Result
[Add measurable result once available]
Technology
FastAPI, Python, MySQL, Docker
Reflection — what I learned
A gradual migration path took longer to build than a clean rewrite would have, but it meant the tools never had a hard cutover date that could go wrong.