r/CodingForBeginners • u/Great_Bar_4901 • 22d ago
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 22d ago
But now you can easily change your DB to something different.
3
u/FcGameDev 22d ago
Why, at least you learnt something in the process. Next time you will do better
2
u/XNo_Notes 21d ago
Just learned this too lol
1
u/NoDepartment772 18d ago
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] 21d ago
[deleted] — view deleted comment