DEV Community

Cover image for Low-code Framework Concept for Node.js 🥑
Can Mingir for Nucleoid

Posted on • Edited on

7 3

Low-code Framework Concept for Node.js 🥑

We've launched a project that it can automate data and logic in Node.js, so that it can organically reduce code lines.

Nucleoid Low-code Framework works with underlying declarative runtime environment that re-renders very same JavaScript codes makes a connections in the graph and eventually save the JavaScript state so that it doesn't require external database.

Hello World

app.post("/test", () => {
  var a =  1
  var b = a + 2;
  var c = b + 3;
})

app.get("/test", () => {
    return b;
})
Enter fullscreen mode Exit fullscreen mode

This 👆 will save and return variables without external database even if the program restarted.

The Nucleoid runtime environment tracks JavaScript state like variables, object, class, etc. that it can control all technical codes like pooling, connections, in meanwhile, developers can focus to build up business logic with vanilla JavaScript.

Example with actual objects:

class User {
  constructor(name) {
    this.name = name;
  }
}

app.post("/users", () => new User("Daphne"));

app.get("/users", () => {
  return User.filter((user) => user.name === "Daphne")
});
Enter fullscreen mode Exit fullscreen mode

Theory

Applying declarative programming at the runtime gives us ability to include data management in the same process.

In different words, the main objective of the project is to manage both of data and logic under the same runtime, at the same time, we can also stream/export data to external database like NoSQL.

How it works

nucleoid.run(() => {
  var a = 1;
  var b = a + 2;
  var c = b + 3;
});
Enter fullscreen mode Exit fullscreen mode

Once a variable is defined like var a = 1, the runtime does 3 major things. First, it places the var a in the graph and makes the connection between dependent variables.

Variable Graph

Second, updates state with new values in order get affect

State
var a 1
var b 3
var c 6

However, actual execution is different since variables are tracked in the graph.

state.a = 1;
state.b = state.a + 2;
state.c = state.b + 3;
Enter fullscreen mode Exit fullscreen mode

and finally stores statements in the runtime-managed fs.

IDE (OpenAPI Editor)

The framework works with Express.js, we also made small UI that builds up the very same codes with OpenAPI, package and run on CodeSandbox.

Go to Nucleoid IDE

Screenshot


This paradigm is still a part of the declarative programming, but applied at the runtime unlike Prolog or Haskell. As we are still discovering what we can do with this powerful programming model, please join us with any types of contribution!

Learn more at https://github.com/NucleoidJS/Nucleoid

Nucleoid Logo

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (3)

Collapse
 
gulshanaggarwal profile image
Gulshan Aggarwal •

Nice Can, looking to contribute very soon!

Collapse
 
joestomopolous profile image
Collapse
 
redcometvictory profile image
Jor-EL Sanchez •

lookin like a cool project!

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up