Skip to content

waylis/core

Repository files navigation


logo

Waylis

Tiny Node.js framework with built-in UI

🔍 Documentation   🧩 Examples   💻 Live demo   🚨 Bug report


promo

Waylis is a Node.js package that allows you to quickly and easily build step-based scenes for interacting with your application directly from the browser. It provides a developer-friendly API and a user-friendly web interface.

Define exactly what kind of data you expect with precise validation and constraints. Then work with it as you need and send responses back to users in any formats (such as text, files, tables, charts).

⚡ It’s like Express.js, but instead of exposing an HTTP API for developers — you expose a user-friendly UI for end users.

Warning

Waylis is a new project and currently in beta phase. Updates released before version 1.0 may introduce breaking changes.

Features

  • Wide range of usage: from standalone offline tools to online services.
  • Built-in input validation: accept only data you need from users (strings, numbers, booleans, dates, files).
  • Configurable: comes with flexible server configuration.
  • Pluggable: supports custom databases, file storages, loggers by implementing simple interfaces.
  • No heavy dependencies: all core functions and the HTTP server are written using only the standard Node.js library.
  • Minimalistic web UI: with responsive layout and themes.

Quick start

Install package from NPM:

npm install @waylis/core

Write some code:

import { AppServer, createCommand, createScene, createStep } from "@waylis/core";

const command = createCommand({ value: "hello", label: "Hello World" });

const step = createStep({
    key: "name",
    prompt: { type: "text", content: "What is your name?" },
    reply: { bodyType: "text" },
});

const scene = createScene({
    steps: [step],
    handler: async (answers) => {
        return { type: "text", content: `Hello, ${answers.name}!` };
    },
});

const app = new AppServer();
app.addScene(command, scene);
app.start();

Run it:

node ./main.js

And see the result on http://localhost:7770

Contribution

If you have any suggestions, or you have found some kind of bugs, feel free to create an Issue on GitHub. If you have specific suggestions for making changes to the source code, you can create a Pull Request.

Licence

Released under the MIT License.