From zero to a deployed full-stack app

This tutorial builds one thing, step by step: a notes application. It starts as a JSON API you test with curl, grows middleware, sessions, server-rendered pages and WebSockets, and ends deployed behind systemd with a real database — nyx-kv. Every code block on these pages was compiled and run against the current release before publishing.

What you need: a Linux or macOS machine with a C toolchain (clang), and 15–40 minutes depending on how far you go.

The route

  1. Install — one command, verify with nyx --version.
  2. Create a project — nyx init, declare the dependency, understand the layout.
  3. First API — routes, path params, form input, JSON out; test with curl.
  4. Middleware & sessions — the status-0 contract, CORS, login with cookie sessions.
  5. Templates, static & forms — escape-by-default rendering, cached static files.
  6. WebSockets — app_ws routes with {room} params.
  7. Full-stack — sessions + templates + nyx-kv storage, deployed with systemd.
Already know the basics? The API reference lives in the repo: docs/API.md — every public function with its exact signature.