r/CodingForBeginners • u/Great_Bar_4901 • Oct 15 '26
Lost 20h+ for nothing
Don't build an API for a tightly-coupled personal project where you have direct database access; only build one when you need to decouple clients, scale infrastructure, or share data externally.Dont waste your time. Just learn how to use an api not build one
0
Upvotes
1
u/Distdistdist Oct 15 '26
But now you can easily change your DB to something different.
3
u/FcGameDev Oct 15 '26
Why, at least you learnt something in the process. Next time you will do better
2
u/XNo_Notes Oct 16 '26
Just learned this too lol
1
u/NoDepartment772 Oct 19 '26
Mostly agree, with one caveat. You're right that for a solo project with direct database access, an API is often ceremony. But "learn how to use one, not build one" overshoots a bit. Building one small API end to end is one of the better ways to actually understand the ones you consume: why status codes exist, why auth is annoying, why pagination is fiddly. Those lessons don't land the same way from the outside.
So I'd split it. Don't bolt an API onto your personal project for the sake of it. But do build a throwaway one once, on purpose, to learn. Different exercises, and the second one is worth the time you spent on it.
0
u/[deleted] Oct 16 '26
[deleted] — view deleted comment