A simple CRUD (Create, Read, Update, Delete) web application built with Bnlang using:
- π§ route-on β lightweight web framework for routing and rendering
- πΎ bnlang-sqlite β SQLite database connector
- π¨ Tailwind CSS β for modern UI styling (via CDN)
- π§© BHTML view engine β HTML templating
bnlang-crud/
ββ index.bnl
ββ db.bnl
ββ data.sqlite
ββ bnl_package.json
ββ /views
β ββ layout.bhtml
β ββ items-index.bhtml
β ββ items-new.bhtml
β ββ items-edit.bhtml
β ββ items-show.bhtml
β
SQLite database using raw queries
β
Dynamic views rendered via BHTML
β
Full CRUD: Create, Read, Update, Delete
β
Tailwind UI (no build step, via CDN)
β
Clean and dependency-light Bnlang app
# 1. Install dependencies
bpm install
# 2. Run the app
bnl index.bnl
# or
bpm run startThen open your browser at http://localhost:3000.
index.bnl: Main server file β defines routes, CRUD logic, and rendering.db.bnl: Initializes SQLite database and schema./views: Contains.bhtmltemplates for pages (layout, list, form, details)./public: Static folder for CSS, JS, or images if needed.
| Method | Path | Description |
|---|---|---|
GET |
/items |
Show all items |
GET |
/items/new |
Create form |
POST |
/items |
Add new item |
GET |
/items/:id |
View item |
GET |
/items/:id/edit |
Edit form |
POST |
/items/:id |
Update item |
POST |
/items/:id/delete |
Delete item |
Tailwind CDN is used directly inside layout.bhtml:
<script src="https://cdn.tailwindcss.com"></script>This allows you to use Tailwind classes instantly without any build tools.
Developed with β€οΈ using Bnlang
https://bnlang.dev