Skip to content

Releases

v0.45.1

Choose a tag to compare

@github-actions github-actions released this 27 Nov 06:20

Bun first in the docs and installer, and the rally on the home page

Changed

  • The nevela command's own hints follow your package manager: nevela --help, and its messages when the command isn't installed or an app has no name, say bun add -g create-nevela and bun create nevela@latest my-app where Bun is installed, the pnpm forms when run through pnpm, and npm's otherwise. Before, they always said npm or pnpm.
  • The docs and READMEs install the command with Bun first, bun add -g create-nevela, with npm's npm install -g create-nevela beside it for computers without Bun. The Laravel Cloud guide builds the web app with whichever package manager made it, by its lock file: an app made with 0.45.0's Bun default has bun.lock, not pnpm-lock.yaml.
  • The speed rally's charts, laid out after Grit's: a tab for each scenario, the rivals' logos, a pair of bars a rival in the order they finished, on the Benchmarks page and on the docs' home page.

v0.45.0

Choose a tag to compare

@github-actions github-actions released this 27 Nov 05:06

The activity log sealed, what was turned away shown, Bun by default

Added

  • What was turned away, shown (step 11, part 4). What was turned away in the docs.
    • The log: under the block list in the admin and on the phone, the last week of probes, requests over the per-address limit, many accounts tried, sign-ins locked, requests from blocked addresses, and blocks made and cleared with who did it (GET /api/_nevela/security-events, ?days=, ?address=). One line per address, kind and hour with a count: each request is one increment in the cache, and the line is written as the count reaches 1, 2, 5, 10, 20, 50, 100… It keeps the method, the path without its query and the browser; never headers or a body. Kept 30 days (NEVELA_SECURITY_LOG_DAYS).
    • The bell, and a push: whoever may see the block list is told when an address blocks itself, at most 5 times an hour (NEVELA_NOTIFY_BLOCKS_PER_HOUR), and once an hour when about 300 requests are turned away within five minutes (NEVELA_SPIKE_AFTER). A tap on the phone opens the block list.
    • A new table: run php nevela migrate.
  • The activity log, sealed (step 11, part 5, after Grit's audit chain). The activity log, sealed in the docs.
    • Each entry is written once and sealed with HMAC-SHA256 over the entry and the hash before it, under NEVELA_AUDIT_KEY or a key derived from APP_KEY (APP_PREVIOUS_KEYS keeps older entries checkable). An entry changed, deleted, or written in by hand, the newest deleted, or a forged prune record shows.
    • php nevela deploy:check checks the whole log, and says where it breaks.
    • Pruning removes the oldest as a run, and a sealed record says where the log now starts. Entries from before the chain are kept unsealed.
    • What it doesn't catch, said plainly in the docs: someone holding the key, a database put back to an earlier copy, and entries from before.
    • New columns and two small tables: run php nevela migrate.
  • Security at the edge, in the Laravel Cloud guide (step 11, part 6): what Cloud's Cloudflare-backed edge does on every plan and on which plans the rest is, set beside what Nevela does in the app on all of them; the visitor's address (no TrustedProxies in the API, NEVELA_TRUSTED_PROXIES=1 in the web apps); your own Cloudflare in front; and a maximum replica count so an attack can't scale the bill. Security at the edge.
  • The speed rally (step 12): Nevela against Rust, Bun, Grit, Next.js and Laravel, each answering the same products API on one CPU, with a chart for each rival on the Benchmarks page, in the order they finished. Nevela finished last, and the page says why: its writes cost most, since the activity log was sealed, and that is the next speed step. The harness in benchmarks/ now runs all nine apps, Rust (Axum and sqlx) and Next.js among them.

Changed

  • Breaking, for code that reads nevela_activity itself: rows are no longer merged. Each request's changes are one entry, never updated after, with a group_id the page joins them by, so "Ada deleted 20 products" is still one line on the page, the phone and through GET /api/_nevela/activity. A line is as recent as its latest entry.
  • New apps install with Bun by default, where it is installed: nevela new runs bun install for the web apps and the phone app, several times faster than npm, and the app's scripts and hints use bun run and bunx expo start. npm is used where Bun isn't installed, and --pm npm or --pm pnpm still picks either; run through pnpm create, yarn create or bun create, that one. Before, the default was pnpm when installed. The web apps still run on Node in production: Bun installs and runs scripts. nevela dev prints the phone app's start command for the app's own package manager.
  • nevela new tries a failed install of the web apps' or the phone app's packages once more, since a first install downloads everything and one dropped download fails the lot. If the second fails too, it shows the end of what the package manager said, instead of only that it didn't finish.

v0.44.0

Choose a tag to compare

@github-actions github-actions released this 26 Nov 09:31

Repeat offenders blocked, and wrong passwords locked out per address

Added

  • Repeat offenders blocked (step 11, part 2). A scanner's probe, and a request beyond the per-address limit, are strikes: 20 within 10 minutes block the address for an hour (NEVELA_BLOCK_AFTER, NEVELA_BLOCK_WINDOW, NEVELA_BLOCK_MINUTES). A blocked address gets 403 with code: "ADDRESS_BLOCKED" and until on every request, before the app does any work, and a visitor of the web apps gets a page that says so.
    • The web app's own server is never counted or blocked, only the visitor it speaks for. IPv6 is counted and blocked by its /64. This computer, and the addresses and ranges in NEVELA_EXEMPT, never are.
    • The block list, under Blocked addresses in the admin and on the phone: see what is blocked and why, block an address for an hour, a day, a week or until cleared, and clear one. A new permission, Blocked addresses (view, create, delete), held by administrators. Blocking and clearing ask for confirmation where the app asks for it. Nobody can block this server, the exempt list, or their own address.
    • The way back in: php nevela security blocked, security unblock <address> and security block <address>, on the server.
    • Blocks that have ended are removed in the nightly scheduler run. A new table: run php nevela migrate.
  • Wrong passwords counted by address and account together (step 11, part 3). Wrong passwords in the docs.
    • The lockout: ten wrong passwords from one address lock that address out of that account for 15 minutes, right password or not (429 with code: "SIGN_IN_LOCKED", retryAfter and Retry-After). The owner elsewhere, and everyone else at the same address, sign in as ever. The account itself is never locked, so nobody can lock someone out just by knowing their email (NEVELA_SIGN_IN_LOCK_AFTER, NEVELA_SIGN_IN_LOCK_MINUTES).
    • The person check: after three wrong from one address, or 20 for one account in an hour from anywhere, the web sign-in shows Cloudflare Turnstile before it checks another password (428 with code: "CAPTCHA_REQUIRED", NEVELA_SIGN_IN_CAPTCHA_AFTER). Only where Turnstile is set up, and only on a web app built with NEXT_PUBLIC_TURNSTILE_SITE_KEY: set it in the admin's environment too. The phone, and anything else calling the API itself, goes on to the lockout.
    • Trying a list: wrong passwords for more than 10 different accounts from one address within 10 minutes. Each further account is a strike, which soon blocks the address; the same account again isn't.
    • Resetting the password lifts the lockout for that address. An emailed code, a sign-in link and a passkey are never locked.
    • An email with no account is counted and answered the same. The sign-in route's own limit of ten a minute is now per address and account, not per account alone.

v0.43.0

Choose a tag to compare

@github-actions github-actions released this 26 Nov 07:29

A limit on the signed-in API, and scanners turned away

Added

  • Security in the app itself, on any host (step 11 of the roadmap, after Grit's Sentinel). Security in the docs.
    • A limit on the signed-in API: lists, records, actions and Nevela's own screens, 600 requests a minute per person and 1,200 per address (NEVELA_API_PER_PERSON, NEVELA_API_PER_ADDRESS). Beyond it, 429 with when to try again, in words and in Retry-After. A request the web app makes for a visitor counts against the visitor's address, not the web app's server.
    • Scanners turned away: /.env and its cousins, a .git folder, WordPress, phpMyAdmin, PHPUnit's script and database dumps answer 404 at once, before the app does any work, and count against the address (NEVELA_SCANNERS, and security.scanner_paths for more).

v0.42.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 20:37

What matters asks you to confirm it's you, every time

Added

  • Confirming it's you again, before something that matters. Such a request answers 428 with a challenge until the person confirms with their password, a code emailed to them, their authenticator app's code, or on the web a passkey (POST /api/auth/confirm). It is asked only once the request is allowed and valid. The API asks, so a script can't skip what the dashboard's dialog asks.
    • A resource action marked "sensitive": true (a transfer, a refund) asks every time. The confirmation is a token for that one request: by the same person on the same sign-in, with the same body, once, within 5 minutes. A token for refunding 10 doesn't refund 10,000.
    • Changing who can sign in asks once for 5 minutes on that sign-in (NEVELA_CONFIRM_WINDOW): adding, changing (email, password, roles, switching off), deleting and signing out people; making, changing and deleting roles; restoring and removing deleted accounts; unblocking an email. On for new apps (NEVELA_CONFIRM_ACCESS=true). An app made before it turns it on once its dashboard and phone app are up to date: older ones can't answer the question.
    • The dashboard and the phone app ask, in one dialog, and send what the person was doing again. The dashboard keeps the confirmation in a cookie the page can't read.

v0.41.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 17:20

A public site and a staff admin on one API, by default

Added

  • The API side of two web apps on one API (step 9 of the roadmap, the triple tier: a public site and customer area in apps/web, the staff's admin in apps/admin). Nothing changes for an app with one web app.

    • NEVELA_ADMIN_PATH (admin_path, ../admin): where a project has an admin app (a Next.js app in that folder), the dashboard's pages are generated there, the descriptors and sign-in settings in both apps, and the blog in the site. nevela resource:remove and nevela adopt look in both.
    • NEVELA_ADMIN_URL (auth.admin_url): the admin app's address. Each web app says which it is, so a sign-in, verification or reset link goes to the app it was asked from, and a passkey is tied to it. A link to a dashboard page always goes to the admin. deploy:check checks it in production.
    • nevela dev runs the admin app on port 3001, beside the site on 3000.
    • staff on the signed-in user (GET /auth/me): false for a customer, an account that holds only the role people sign up with. One rule for every app. The phone app goes by it.
  • The web apps of the triple tier, from one template (apps/web/nevela-split.json says what each leaves out):

    • The site (apps/web): the public pages, sign-in (and sign-up, where NEVELA_REGISTRATION is on), and the customer area at /account: profile, password, two-step sign-in, passkeys, connected accounts, devices and closing the account. No dashboard: customers never download its code. Staff who sign in there are offered the way to the admin.
    • The admin (apps/admin): the dashboard, and no public pages or sign-up. / is the dashboard. A customer who signs in is kept to their own account's pages, with a link to the site, as in Grit: the door isn't slammed, and Laravel checks every request whatever is shown. Its sign-in cookies have names of their own, so on localhost signing in to one app doesn't sign the other out.
    • Each app's .nevela.json says which it is, and next.config.ts builds it so (NEVELA_APP). nevela upgrade and --undo work on both, leaving out of each what it leaves out, as the version it upgrades to lists it. nevela status shows both.
  • The site's customer area (the triple tier) has what the phone's customer app has, beside the account:

    • Records, at /account/records: each resource the customer's role may view, its records and each record, read only. Which records are theirs is Laravel's to say: where a resource has an owner, a customer sees their own and nobody else's.
    • Notifications, at /account/notifications: what the phone's bell shows, marked read one at a time or all at once.
    • A link Laravel stored for the dashboard (/dashboard/orders/7, in a notice or an old email) leads to the same thing in the customer area (/account/records/orders/7).
  • Links follow who reads them. With an admin app beside the site, a customer's sign-in and verification links land on their account on the site, and staff's on the dashboard. nevela user --link prints a link to the admin for staff and to the site for a customer.

  • What the admin asks of staff, none of it of customers:

    • Two-step sign-in: staff without it on see only their account's security page in the admin until they turn it on. Required in production by default (NEVELA_STAFF_TWO_FACTOR: true asks for it on your computer too, false never).
    • Shorter sign-ins: a sign-in to the admin ends 12 hours after it began (NEVELA_SESSION_ADMIN_ABSOLUTE, in minutes). The site and the phone keep the app's own limits.
    • Stricter headers: never shown inside another site's frame, forms posted only to itself, no plugins, and the address of the page someone came from kept to itself.
  • nevela deploy:check checks the site and the admin each: that each answers at its address as the app it should be, shares the secret and reaches the API, and that the admin sends customers to the site (NEXT_PUBLIC_SITE_URL, set where it is built). It says what the admin asks of staff, and with Google or GitHub on, the two callback addresses to register.

  • The site and the admin in the docs: who goes where, the customer area, what the admin asks of staff, deploying both, closing the admin off with an allow-list, a VPN or Cloudflare Access, and splitting an app you already have. Laravel Cloud, deploying, project structure, configuration and Google and GitHub sign-in are written for three apps.

Changed

  • Breaking for scripts that run nevela new: the default tier, --tier web (and both, and --mobile), makes two web apps: the site in apps/web and the admin in apps/admin, on ports 3000 and 3001. Staff sign in to the admin. --tier admin is new: the API and the admin alone, for an internal tool, with the admin on port 3000. --tier mobile is as it was. Existing apps keep their one web app, and nevela upgrade never splits one.

v0.40.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 11:47

The phone does what the dashboard does, and CI keeps it that way

Added

  • The phone app does what the dashboard does on these screens, for apps with no dashboard above all:
    • Close account, under Account, with the password. App Store and Google Play ask for this in any app where people make an account.
    • Deleted accounts, below People: restore a closed account, remove one for good, and let a blocked address sign up again.
    • Connected accounts, on the Security screen: the Google and GitHub accounts that sign in to yours, and disconnecting one.
    • A record's files open, in the phone's browser. Private files too.
    • Rich text is typed as paragraphs. Text with formatting the phone can't edit is kept as it is, unless the person chooses to drop it.
  • POST /api/_nevela/private/{slug}/{id}/{field}/link: a signed path that opens a private file without a token for five minutes, for someone who may view the record. Only for that file: replaced or trashed, it opens nothing.
  • Web and phone in the docs: what the dashboard and the phone each do, screen by screen, and why one does something the other doesn't. In the repository, every API route is listed with which app uses it (scripts/parity.json). CI fails on a new route with no line, and on a line the apps' code says isn't true.

Fixed

  • On the phone, deleting a record said it could be restored from the dashboard. It says Account → Trash, which the phone has.

v0.39.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 10:09

A forgotten password reset from the phone, by emailed code

Added

  • A forgotten password can be reset from the phone. "Forgot your password?" on the sign-in screen emails a 6-digit code. The person enters it with a new password, and the phone signs in with it, through the second step where the account has one. Every other sign-in the account had ends. POST /auth/password/forgot sends a code with "method": "code", and always in an app with no dashboard; POST /auth/password/reset takes the email and code as well as the link's token. A wrong code counts against a few tries. See the API reference.

Changed

  • An app with no dashboard no longer answers a forgotten password with 404 NO_DASHBOARD: it emails a code instead.
  • Sign-in emails go out after the answer, not before it: codes, links, verification and password resets. Before, a request for a real account waited for the mail server and one for an unknown address didn't, so how long the answer took could say which addresses have an account.

v0.38.0

Choose a tag to compare

@github-actions github-actions released this 24 Nov 20:39

Push to every phone, on PHP 8.5 and Laravel 13

Added

  • Every bell notice is also a push notification to the phones of the people it is for. Tapping it in the phone app opens its record. A phone is registered when someone signs in on it, and gets pushes only while that sign-in lasts. It stops at once when the sign-in ends: signing out, being revoked from the Devices screen, a new password, a closed account, or lapsing. Push::send sends one with no notice. In an app that upgraded, run php artisan migrate first. See Push notifications.

  • nevela push <email> sends a test push and shows its receipt. A missing or wrong Firebase key shows only in the receipt, not in Expo's first answer.

  • The phone app is ready for push and for updates without a new build:

    • expo-notifications, with an Android notification channel;
    • an Android notification icon (a white silhouette, 96 by 96) and its colour;
    • expo-updates, with runtimeVersion set to the app version;
    • an eas.json whose preview and production builds each have an update channel;
    • npm run update:preview and update:production.

    What each app sets up for itself (its EAS project, Firebase and the FCM key) is in What an Android build needs. An existing app's apps/mobile isn't upgraded.

Changed

  • Breaking: Nevela runs on the latest PHP, 8.5 or newer.

    • The package (nevela/laravel) now requires "php": "^8.5".
    • nevela new refuses an older PHP, and a new app's composer.json asks for ^8.5.
    • nevela upgrade on an older PHP says why it can't reach this release: Composer stays on the last one that runs there. On 8.5 it raises "php" in apps/api/composer.json to ^8.5 itself.
    • nevela status and deploy:check show the running PHP, and flag anything below 8.5.
    • CI runs everything on 8.5.

    Laravel Cloud and Sevalla both run 8.5 and default to it. To move an app: install PHP 8.5 (in Herd, choose it under PHP), run nevela upgrade, and choose 8.5 for the server. See Set up your computer.

  • Breaking: Nevela needs Laravel 13. The package required Laravel 11, 12 or 13; it now requires 13, the latest, and nothing older is tested. The repository's own app is on Laravel 13.44, with its other Composer packages updated to their latest versions, and the package's tests run on PHPUnit 12.

    An app whose apps/api/composer.json still requires Laravel 12 or older moves to 13 first, with Laravel's upgrade guide, then runs nevela upgrade. nevela upgrade says so when it sees one. It doesn't make that change itself, since a major Laravel upgrade can need changes to the app's own code. Until then, on an older PHP or Laravel, it leaves the app's Nevela range where Composer can still install it. See When it finishes on an older version.

v0.37.0

Choose a tag to compare

@github-actions github-actions released this 23 Nov 12:33

Home leads with the business, and both apps share one layout

Added

  • The home screen leads with the business, in an app with a shop. Both the dashboard and the phone show today's orders against the same time last week, how many are waiting, and sales over the last seven days against the seven before. Cancelled orders are left out of sales. They come from a new endpoint, GET /_nevela/shop-figures, which counts the orders the person may see. See Shop figures.

  • The dashboard and the phone app share packages/shared: the brand (the app's name and tagline), the themes and the layout. Your own code imports them as @shared/…. A new app has the folder, and nevela upgrade adds it to an older one. It writes only files the app hasn't got, never changing brand.ts or layout.ts once they're there. An older app's brand.ts starts with the name and tagline from its own lib/site.ts. The phone app's tagline is now the brand's. See Project structure.

  • Staff see the same layout in both apps: Home, Orders, Catalogue, More. In a shop, the phone's tabs for staff are Home, the orders, what is sold, and More, which holds the account, every record, security, appearance and About. The dashboard's sidebar starts with the same tabs under Home. With no shop it is Home, Records, More. packages/shared/layout.ts names other tabs if you want them.

Changed

  • The dashboard builds with the project folder as its root, so it can import packages/shared (turbopack.root in apps/web/next.config.ts). If you changed that file, upgrade keeps yours and says which lines to add, and status flags it until they're there. See The shared folder.
  • The sidebar's "Overview" is now "Home", as on the phone.
  • The phone's home no longer shows "Nevela x.y.z is out". Whoever runs the business can't act on it, so an administrator now finds it under Settings → About, marked as being for whoever builds the app. The dashboard's bell is unchanged.