@nexa-stack/framework
v1.2.12
Published
Nexa Stack — a schema-driven TypeScript backend with REST, JWT authentication and a Nexa UI-powered admin.
Maintainers
Readme
Nexa
Write little → ship a full backend. Goal: hours, not weeks.
Nexa Stack is the backend package. Its UI companion is a separate package:
import {nexa} from '@nexa-stack/ui';
import '@nexa-stack/ui/styles.css';Nexa Stack serves a minimal Welcome page, REST API and a schema-driven admin at /admin.
For custom pages, use the independent @nexa-stack/ui package and nexa="..." commands.
Runs on Node.js ≥ 20 (Hostinger-friendly). Default UI language is English.
Quick start
npx @nexa-stack/framework new my-app
cd my-app
npm install
npm run serve→ http://localhost:3333
→ http://localhost:3333/admin
→ Login: [email protected] / 123456
The idea
import { resource, string, money, belongsTo, select } from "@nexa-stack/framework";
resource("orders", {
client: belongsTo("clients").required().label("Client"),
total: money().required().label("Total"),
status: select(["new", "paid"]).label("Status"),
}, { label: "Orders" }).admin();That gives you: database table + REST API + admin panel.
Optional power tools:
await db.from("orders").where("status", "paid").with("client").get();Commands
| Command | What it does |
|---------|----------------|
| nexa serve | Start server |
| nexa new X | Scaffold a project |
| nexa make:resource X | Add resources/X.ts (auto-loaded) |
Localization
- Default:
APP_LOCALE=en - Arabic UI: set
APP_LOCALE=arand uselang/ar.json - Admin has EN / عربي switch either way
Hostinger / production
Prefer MySQL on shared hosting:
DATABASE_URL=mysql://user:pass@localhost:3306/dbname
APP_SECRET=long-random-secret-at-least-32-chars
NODE_ENV=productionSQLite uses sql.js (no Visual Studio / node-gyp).
Docs
- docs/START.md — start here
- docs/REFERENCE.md — full API reference
- After
nexa serve: http://localhost:3333/docs
Package: @nexa-stack/framework
