Show HN: I built a backend so simple that it fits in a YAML file
manifest.build
manifest.build
1) put the “# Short syntax for string type.” comment in your docs on your homepage example. When I first saw the “price” element I thought it was a jsonb field or something
2) why the emojis? So confused. Are those an alternative to a “dash” for entities? Do I need todo those? Do they set the favicon for that rest page? Note: it looks like it messes up indentation alignment. If it’s trying to be cute, I would deprioritize it
3) a “curl” command example on the homepage would make it a bit easier to grok the value of how simple your backend is
4) where does the data get stored? SQLite? Duckdb?
Emojis caused a lot of ink to flow. I am a very visual person so I think emojis can help me when working (like icons of every app) but I noticed too that it changes the indentations, it can be disturbing. As of today they are just stripped from the title because it is just a PoC but they can be integrated in the admin panel later on.
Good guess the DB is SQLite! Fastest way to go up and running for users. It was a good choice for the proof-of-concept but we may need to change later.
It's primarily headless CMS but it produces solid db schema and sensible rest API.
Entities can be defined in json or in UI.
You get OAuth, admin panel, plugin ecosystem.
And now they can come up with 11!
__halt_compiler() is fantastic for this (mixing code + data). I've done it a few times.
Buddy and I are currently building an app on Pocketbase and are thoroughly enjoying it. I like your idea of starting from a config file rather than a UI.
Tip: it didn't take us long to need to tap into PB's hooks and "use as a framework" concept. Probably good to keep that front of mind.
I love pocketbase it is a really enjoyable product, very neat. Manifest can be seen as a different approach, using code rather than UI.
Yes the "hook part" is tricky to consider as I am scared that I will have to trade-off some simplicity in order to cover more features/use cases.
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'
One of the big benefits that they all share is that they use a mainstream DB in the back (Supabase -> Postgres, Pocketbase -> SQLite) so you have a possible upgrade path if you need it - Is this the case here? I can't even easily tell what it uses as a DB, SQLite?
Also Authentication and more importantly Authorization are so prominent in the other BaaS I mentioned - completely missing here.
Not to disregard what this project is doing, but it might be better suited as a CMS that has some backend features... like for forms or appointment booking. Nevertheless, if I find a need for it in the future, I'll surely try it out.
Yes, the DB is SQLite. We chose it among others as it is file based and thus you get get up and running in seconds.
Authentication and authorization are key features, I agree. They were not integrated in the POC but they will come very soon. There actually is auth for the admin panel, I just need to standardize it for other entities.
I got it for the CMS use case, Manifest's aim is not to be a competitor of large frameworks that gives you the control of everything. We rather think that it will fit for another typology of projects. You can use it as a headless CMS, but there already is products like Strapi or Directus that get the job done. I am thinking more about projects with more "app" logic, but the next step is adding custom logic to it.
in the oss self-host world, countless things that are just file servers (with some sugar) are far more difficult to host than they should be: immich, nextcloud are examples. standard notes is an extreme example, its compose.yml is like the vhs tape from the ring
same in closed in-house backends; at best people store some static files in s3, but we use databases way too much
'your files contain entities' vs 'your files are entities' is a split; this project is the former but I kind of want the latter
also permissions is kind of the hard part as other posts have mentioned here
but hope to see more stuff in this area
I don't get this one, the sentence "their no-code approach generates awful code". If it's no-code, why do you care about code ?
Also, in what way are you relying on "coding" ? No information on this on the front page, to me it seems just like a config file only. Are you saying that the config only generates the boilerplate that the user will modify afterwards ? If that's the case, it's really not obvious.
You asked an interesting question: "should you care about code quality if you use no-code tools?": As a developer, I would say definitely say yes because not understanding your own code (or your team's code) will soon or late lead to issues. If you work on a team with PR validations or similar, how can you validate your teammates' code if the code is unreadable ?
Congrats on shipping, this looks nice and well thought-out
One possible correction: the only code we generate for a user is either SQL migrations or TS types (if devs want to use the TS client). I’m not sure many would classify Supabase as NoCode, and we strongly recommend users use CI/CD development with our CLI and database migrations
https://supabase.com/docs/guides/cli/local-development#datab...
This is insane to me.
Almost nobody uses explicit typing in yaml.
The fact you need features like folding strings or chomp characters is a symptom that yaml is trying to work around limitations that shouldn't be there to begin with.
I think about having a set of hooks that trigger the code logic hosted somewhere. Language-agnostic / serverless, that kind of stuff maybe... Any ideas ?
I use Prisma and I like that I can define my tables in a simple file, and also use it with Express to add some middleware or auth or various backend things if I want. This API seems pretty similar to Prisma as well.
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.
I like the chain able queries, like:
``` const cats = await manifest .from('cats') .where('breed = siamese') .andWhere('active = true') .andWhere('birthDate > 2020-01-01') .find() ```
What is it inspired by?
I also like the idea of transposing ORM-style queries in the browser to abstract the whole API response-request part.
Limits would be a good name I think for that rule.
The idea seems cool, provided it supports more features like authentication type, generic middlewares, rate limiting, etc.
Another bit worth adding to the yaml config on a collection basis: seed data
A easy system might be very complexly built, but presents and easy interface for you to use. If complex it would be hard to understand how it is built and how to modify.
Basically simple describes how the system is built, while easy describes how much you need to know to use it.
They are orthogonal, so a system can be both complex and easy, both simple and hard.
If the use of "pickup" instead of "pick up" was intentional, that's hilarious.
Also https://noyaml.com/
Don't gatekeep.
And I hate YAML with a passion, too, an opinion which I feel I'm entitled to.
Can't disagree with you there! Though I do struggle to find something else to recommend.
JSON5 is probably my favoured format - JSON is very clear and simple but the lack of comments is a catastrophic flaw. Unfortunately JSON5 has pretty poor adoption in the ecosystem (IDE support, libraries etc).
I guess you meant with not will?
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.
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 structure allows. Coding yourself into a corner on purpose, just to save a few minutes on launch, is a strange tradeoff.
I know because I've made that tradeoff dozens of times and cursed myself every time. I built a web framework that did auto UI based on Django models, postgres and jquery. It was active 2010-2014 and I built dozens of production apps with it. That initial "wow" factor of going from a model in your head to a full user interface is very compelling! I did live demos with clients where we'd code up a model and launch a site in real time. Cool, right! The problem was the structure only fit certain types of applications and as we stretched it into adjacent domains, we had to break it down and effectively "eject" from the framework, making each instance a custom app - which is what we should have started anyways.
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 is an important point to consider.
If it's there as an option it means eventually it will be used and there's usually no easy way to go back...
The unsettling part is wondering if you made the right choice at that point which usually is a non-problem but the point of a framework is to establish convention and order.
This is a proof of concept only so it sticks to a simple CRUD set of endpoints.
Some of the features that you evoke are already on the pipe (Auth, permissions ABAC/RBAC...) but obviously it will still have limitations for more complex use cases...
I am thinking about a nice hook system to add this kind of logic somewhere else like on edge functions or external APIs. The point is to keep things simple and allow more use-cases without too much trade-off. Hard choices.
I'm curious how you see the project evolving as you add those things. How do you see it differentiating itself from rails or django?