Quickstart¶
Create and run your first Orbita project in under a minute.
1. Initialize a new project¶
ob init generates:
ob.toml— project manifest for dependencies, scripts, and embedded assets ([embed]).src/main.tyl— starter entry point written in TypeLua.- Appends
.ob/to.gitignoreif one exists.
2. Run your code¶
3. Use the built-in ob:* standard library¶
Update src/main.tyl to use JSON and bundled SQLite:
local json = require("ob:json")
local sqlite = require("ob:sqlite")
local db = sqlite.open(":memory:")
db:exec("CREATE TABLE tasks (id INTEGER PRIMARY KEY, title TEXT)")
db:exec("INSERT INTO tasks (title) VALUES (?)", { "Explore Orbita" })
local rows = db:query("SELECT id, title FROM tasks")
print(json.encode_pretty(rows))
db:close()
Run with hot reload (--watch):
4. Fullstack Web App (--web)¶
Scaffold a complete fullstack web application with ob:router, config.toml, paired .tyl + .html templates, and public/ assets:
ob init my-web-app --web
cd my-web-app
# Generate modular apps, routes, components, and SQL migrations
ob g app tasks
ob g route tasks/index
ob g component tasks/task_card
ob g migration create_tasks
# Run migrations and start the dev server with Live Reload
ob db migrate
ob run --watch --allow-net --allow-read=. --allow-write=storage src/main.tyl
5. Next Steps¶
- Build modular fullstack apps with the Meta-Framework (
ob:router). - Learn about Database (
ob:db) & Migrations and Caching (ob:cache). - Configure environments cleanly with
ob:config&config.toml. - Learn about Security Permissions (
--allow-*). - Package your app into a single binary with
ob build --compile.