Hey everyone!
For the past couple of years, we've all been witnessing a revolution led by Large Language Models. We were promised a future where AI writes our code. We've all tried asking GPT-4 or Claude to build a web app. And we've all hit the same, harsh reality.
AI is a phenomenal code generator, but a terrible maintainer. It loses context, mixes up variables, writes tons of boilerplate, and makes tiny but critical mistakes that take hours to debug. It's like a brilliant but incredibly absent-minded junior developer who needs constant supervision.
I thought about this for a long time and realized: what if the problem isn't the AI, but our approach? What if, instead of asking it to lay bricks (write imperative code), we gave it the entire building's blueprint and asked it to work as an architect?
This very idea is what led to the creation of Serverokey.
Serverokey is a paradigm shift.
Serverokey is a declarative Node.js engine that takes away the responsibility of writing "HOW" to do something and instead asks the developer (or the AI) to describe "WHAT" needs to be done.
The entire architecture, all the logic, every component, and all data sources of your application are described in a single, central file: manifest.js
. This isn't just a config file. It's the architectural blueprint of your application.
// manifest.js (snippet)
'POST /action/addItem': {
type: 'action',
reads: ['positions', 'receipt'],
writes: ['receipt'],
update: 'receipt',
steps: [
// ... all business logic is declaratively described here
]
}
This allows the AI (and you!) to see the entire picture at once, without losing context or getting bogged down in implementation details.
What makes Serverokey special?
I've built this project around a few core ideas that I believe are game-changers:
📜 Declarative Logic on Steroids (steps
)
Forget about controllers scattered across your project. Complex business logic is described as a sequence of simple "steps" right in the manifest. Conditionals, loops, external API calls—it all becomes part of the architectural blueprint.
// Want to apply a discount if the order total is over 500? Easy.
{
"if": "data.receipt.total > 500",
"then": [{ "set": "data.receipt.discountPercent", "to": 10 }]
}
⚡️ Real-time "Out of the Box"
Want a change in one user's shopping cart to instantly appear for everyone else? This usually requires complex WebSocket code. In Serverokey, you just describe what to watch:
sockets: {
"receipt-updates": {
"watch": "receipt", // Watch this data source
"emit": { "event": "receipt-changed" } // And emit this event
}
}
And that's it. It just works.
🖥️ Web ⇄ Desktop in a Single Line
This is my favorite feature. You've built a web app, and now you want a desktop version for Windows/macOS/Linux? No problem. Just change one line in your manifest:
launch: {
"mode": "native", // was "server"
"window": { "title": "My Desktop App" }
}
The next time you run your app, Serverokey will launch it in an isolated Chromium window. No Electron, no complex setup. Your web app just became a desktop app.
🛡️ Your Personal "Super-Validator"
I know how easy it is to make a typo. For an AI, it's an even bigger problem. That's why I created a powerful static analyzer. Before running your app, just execute npm run validate
. It will check your manifest.js
for dozens of potential errors, from simple typos to complex logical inconsistencies, and will even give you a hint: Did you mean "receipt"?
It's your best friend and a safety net that saves hours of debugging.
Enough talk, show me the code!
I've prepared a demo application, "Atomic POS," so you can experience the power firsthand.
-
Clone the repo:
git clone https://github.com/Xzdes/serverokey.git cd serverokey
-
Install dependencies (this might take a minute as it downloads Chromium):
npm install
-
Navigate to the example and run it:
cd packages/kassa-app-example npm run seed npm run dev
You'll see a native desktop application launch on your screen. Play around with it, then open manifest.js
to see how simply and elegantly its entire functionality is described.
Serverokey is my answer to the challenges of a new era in development. It's an experiment and an invitation to a dialogue about how we can build software systems more reliably and predictably, working in tandem with artificial intelligence.
I would be thrilled to hear your feedback, ideas, and of course, contributions to the project.
Give Serverokey a try. Let's start architecting, not just coding.
- GitHub: https://github.com/Xzdes/serverokey
- Contact Me: xzdes@yandex.ru
Top comments (0)