Live data from Hacker News

Show HN: I built a backend so simple that it fits in a YAML file

manifest.build

51–60 of 80 posts

Re: Show HN: I built a backend so simple that it fits in a YAML file

#51

I can’t think of a single time where my backend was literally just a crud api over entities. These toys fall apart beyond a hello world app. No validation, no authorization, no authentication, no property level permission, no events, no auditing… the list of what is actually needed for a real application goes on.

[deleted]

Re: Show HN: I built a backend so simple that it fits in a YAML file

#53
post #15

Any plan to plug this into an LLM and generate a backend in virtually any stack/platform? The idea seems cool, provided it supports more features like authentication type, generic middlewares, rate limiting, etc.

Definitely in my mind! Actually with Copilot you already have pretty good suggestions on autocomplete or with a prompt. But I am not sure of what would be an appropriate UI for a full-AI backend generator.

Even a "direct" mapping between yaml and PocketBase/SupaBase/Firebase would be helpful, LLMs currently hallucinate too much.

Another bit worth adding to the yaml config on a collection basis: seed data

Re: Show HN: I built a backend so simple that it fits in a YAML file

#54
Hey very useful app, I'll be watching this. I once wanted to set up backend apps during automated CI jobs in order to facilitate e2e tests and ended up making an utility kind of similar - but yours truly goes beyond.

https://dhuan.github.io/mock/

With mock you can set up backend APIs completely from configuration files or even from command-line parameters - such as

$ mock serve --port 3000 --route 'say_hi/{name}' --method GET --response 'Hello world! My name is ${name}.' --route "what_time_is_it" --method GET --exec 'printf "Now it is %s" $(date +"%H:%M") > $MOCK_RESPONSE_BODY'

Re: Show HN: I built a backend so simple that it fits in a YAML file

#56
post #55

I have made a similar solution in-house. I kinda agree with the YAML nay-sayers. I settled on KDL instead as the description language ( https://kdl.dev/ ) ; maybe give it a try ?

Also, you should consider migrations to be the first-class citizen and entities to be derived on it. On our system, we have

migration "create-users-table" { create-table "users" { column "id" "number" dbtype="increments" } }

migration "add-user-last-device" { alter-table "users" { column "last_device" "string" } }

This implicitly defines an "User" entity which has two fields, "id" and "lastDevice". But now we can also generate migrations (in our case, knex migrations). It’s harder and less reliable to go the other way, starting from current database schema + current description to migration.

Re: Show HN: I built a backend so simple that it fits in a YAML file

#59

Earlier quoted context omitted.

This is absolutely true. The magical "write a model, get an app" approach is so tempting. But it's focusing on the wrong problem - optimizing for the initial tutorial experience, not the lifecycle of a production app. That initial scaffolding takes, what, an hour or two? Getting that down to a minute or two is not a high priority, considering 99.9% of the lifecycle of the app is dominated afterwards by what that stru…

Hi perrygeo, Manifest dev here, I totally agree with you: quick starts can be harmful in the middle/long term so most of the times I would probably accept to invest more time in the beginning building something flexible. However, you are talking here as a senior/expert developer - as you were already coding in 2010 ;) - but junior devs OR frontend devs may not be able to create that Django+DB+API app so easily. That…

[deleted]
Post reply on HN