What NSRAD is
nsrad is Nacarsoft’s rapid web application development framework, written in Go and targeting database environments (ADABAS, Oracle, PostgreSQL, SQLite, DB2). Applications are defined with YAML files — forms, listings, dynamic menus and REST-API services — plus scheduled tasks (crontab), without repetitive coding. Access control is role-based (RBAC: users, groups, roles and permissions).
Application, file and data names in the examples are fictional.
Use cases
1. Management application on ADABAS with forms and listings
Create a maintenance app (e.g. a fictional policy-admin) on the configured ADABAS file.
./build/nsrad init /tmp/myproject
./build/nsrad start /tmp/myproject
# → listening on http://127.0.0.1:9090
Web flow (http://localhost:9090, admin / admin123): create the application under apps/, define its screens (forms, listings) in YAML, point to the configured database or a Natural entity, and browse the dynamic menus in the browser.
2. Exposing business data as a JSON REST-API
Expose an entity (e.g. fictional customers) as an endpoint with authentication and role control.
curl -s -X POST http://localhost:9090/api/auth/login \
-H 'Content-Type: application/json' \
-d '{"username":"admin","password":"admin123"}'
Web flow: define the entity in the application YAML; consume GET /api/<app>/<entity> with the JWT from login; each role authorizes specific actions on applications and data.
3. Automating a nightly report with scheduled tasks
Generate a nightly report or sync (e.g. a fictional policy summary) via the application crontab.
./build/nsrad status /tmp/myproject
# → nsrad is running (PID 12345) — listening on http://127.0.0.1:9090
Web flow: declare the task (report, sync) in the application YAML; check the environment logs/ to confirm the scheduled run completed.
4. Multi-language prototype with several environments
Run development and production environments with the same binary and serve the UI in Spanish and English.
./build/nsrad init /tmp/dev && ./build/nsrad start /tmp/dev
./build/nsrad init /tmp/prod && ./build/nsrad start /tmp/prod
./build/nsrad status /tmp/prod
Web flow: adjust i18n.supported_languages and ui.default_theme in each config.yaml; verify language and theme in the browser; stop with ./build/nsrad stop /tmp/dev.
Interface


Reference
CLI commands (verified with --help, v1.0.0 build 679)
| Command / flag | Description |
|---|---|
init [dir] | Initialize a new environment (config.yaml + db/ + logs/, plus themes/, apps/, certs/, i18n/) |
start [dir] | Start the server in background |
stop [dir] | Stop the background server |
status [dir] | Status: running/not running, PID, uptime, memory, URL and config in use |
license | Show license status and exit |
--config <dir> | Alias for [dir] (environment directory, not a file) |
--version, -v | Show version and build info |
--help, -h | Show help |
Note: the reference manual lists
--direnv,--port,--host,--start/--stop/--restartflags; the real binary usesinit/start/stop/statussubcommands with a positional[dir]. Follow this table.
Main config.yaml options (see config.example.yaml)
| Option | Description |
|---|---|
server.port | HTTP port (default 9090) |
server.read_timeout / write_timeout / shutdown_timeout | Server timeouts |
server.logo_path, app_name, copyright | Header branding |
security_db.path | Security SQLite (db/security.db): users, groups, roles |
auth.jwt_secret | JWT secret — change it in production (or AUTH__JWT_SECRET env var) |
auth.jwt_expiry / refresh_expiry | Token (15m) and refresh (24h) lifetimes |
auth.ldap_enabled, ldap_host, ldap_port, ldap_base_dn | Optional LDAP authentication |
smtp.* | Mail for password reset and notifications (host, port, username, password, from, security) |
logging.log_dir, level, keep_days | Log directory and retention |
mdi.max_open_tabs, tab_state_cookie | Concurrent MDI desktop tabs |
maps.source, yaml_path, keyboard.* | Map source and shortcuts (F3 close, F5 refresh, F6 new, F8 next) |
i18n.default_language, supported_languages | Languages (en, es, fr, de, it, pt) and language cookie |
menu.max_depth | Maximum menu depth |
ui.default_theme, theme_cookie | Default theme and theme cookie |
pagination.default_page_size, max_page_size | Pagination (20 / 100) |
ai.enabled, provider, model, api_key, base_url | Built-in AI assistant |
license.trial_days | Trial period in days (30) |
Environment layout (mydata/): config.yaml (port, themes, database), apps/ (platform applications), repositories/ (Natural/ADABAS objects).
Web UI areas
| Area | What it does |
|---|---|
| Login | Authentication (initial admin/admin123); issues the JWT used by the API (POST /api/auth/login) |
| MDI desktop | Concurrent work tabs (mdi.max_open_tabs limit), state persisted in a cookie |
| Dynamic menus | Navigation across applications and screens defined in apps/ (menu.max_depth depth) |
| Forms and listings | Record create, edit and query against the configured database or Natural entities |
| REST-API | Entities exposed as GET /api/<app>/<entity> JSON, with authentication and roles |
| Scheduled tasks | Reports and syncs declared in the application YAML (application crontab) |
| RBAC administration | Management of users, groups, roles and permissions over applications and data |
| Themes and languages | Theme (ui) and language (i18n: en, es, fr, de, it, pt) selectors |
Commented examples
# 1. New environment and startup (uses ./mydata if present and no [dir] given)
./build/nsrad init /tmp/myproject
./build/nsrad start /tmp/myproject
./build/nsrad status /tmp/myproject
# 2. Health check and API login
curl -s http://localhost:9090/api/health
curl -s -X POST http://localhost:9090/api/auth/login \
-H 'Content-Type: application/json' \
-d '{"username":"admin","password":"admin123"}'
# 3. License status and version
./build/nsrad license
./build/nsrad --version
# 4. Two environments with the same binary
./build/nsrad init /tmp/prod && ./build/nsrad start /tmp/prod
./build/nsrad status /tmp/prod
./build/nsrad stop /tmp/myproject
FAQ
Which port does it listen on and how do I change it? 9090 by default (server.port in [dir]/config.yaml); restart with stop + start after editing.
Where does the license go and what happens without one? At /opt/ns/licenses/nsrad.key; without a license it runs in 30-day trial (license shows the status).
What are the initial credentials? admin / admin123 at http://localhost:9090; the admin user is created by migration and cannot be deleted.
It won’t connect to ADABAS or the application doesn’t show? Check the database section of config.yaml (real DBID/FNR — manual values are fictional) and that the environment apps/ layout is correct; if the port is busy, change server.port.