Discussion
Loading...

#Tag

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Aral Balkan
Aral Balkan
@aral@mastodon.ar.al  ·  activity timestamp 8 hours ago

🥳 JavaScript Database (JSDB)¹ version 7.0.0 released

- *Breaking change* JSTable.PERSIST event now uses a parameter object with properties for `type`, `keypath`, `value`, `change`, and `table`. This should make listening for events on your databases much nicer to author. e.g., a snippet from Catalyst² I’m working on:

```js
const settingsTable = db.settings['__table__']
const JSTable = settingsTable.constructor

settingsTable.addListener(JSTable.PERSIST, ({ keypath, value }) => {
switch (keypath) {
case 'servers.serverPoolSize':
console.info('New server pool size requested', value)
this.updateServerPool()
break
// etc.
}
})
```

This new version of JSDB is not in the latest Kitten³ yet as it is a breaking change and I want to make sure I update my sites/apps first if needed. I should have it integrated tomorrow.

To see the simple use case for JSDB in Kitten (the default untyped database that’s easy to get started with and perfect for quick experiments, little sites, etc.), see: https://kitten.small-web.org/tutorials/persistence/

For a more advanced tutorial for creating your own typed databases in Kitten, see the Database App Modules tutorial: https://kitten.small-web.org/tutorials/database-app-modules/

For another example, see: https://codeberg.org/small-tech/jsdb/#table-events

Full change log: https://codeberg.org/small-tech/jsdb/src/branch/main/CHANGELOG.md#7-0-0-2026-02-10

Enjoy!

💕

¹ https://codeberg.org/small-tech/jsdb#readme
² https://catalyst.small-web.org
³ https://kitten.small-web.org

#JavaScriptDatabase #JavaScript #appendOnlyLog #JS #JSDB #JSDBUpdates #SmallTech #SmallWeb #Kitten #Catalyst

Codeberg.org

jsdb

A zero-dependency, transparent, in-memory, streaming write-on-update JavaScript database for the Small Web that persists to a JavaScript transaction log.
Codeberg.org

jsdb/CHANGELOG.md at main

jsdb - A zero-dependency, transparent, in-memory, streaming write-on-update JavaScript database for the Small Web that persists to a JavaScript transaction log.
Codeberg.org

jsdb

A zero-dependency, transparent, in-memory, streaming write-on-update JavaScript database for the Small Web that persists to a JavaScript transaction log.

Kitten: Tutorials

Kitten: Tutorials

  • Copy link
  • Flag this post
  • Block
Aral Balkan
Aral Balkan
@aral@mastodon.ar.al  ·  activity timestamp 2 weeks ago

The built-in database backup and restore feature in Kitten¹ (that actually works and is in the Kitten Settings section of every Kitten app) just saved my ass (again) :)

Thank you, past me ;)

¹ https://kitten.small-web.org

#Kitten #JSDB #backups #SmallWeb #SmallTech

Screenshot of web page at https://gaza-verified.org/🐱/settings/backup-and-restore.

Main section:

Backup and restore

Backup

This will download a full backup of your data, including:

- Internal database (_db)
- App database (db)
- Uploads

Download backup

Restore

This will restore your Small Web place from a full backup of your data. That includes your internal database (so your identity, secret, etc.) as well as the app database and uploads (if any).

Label: Data backup file (.kitten.data.tar.gz)
File upload control: [Choose file] button. No file chosen
Restore button

Navigation (partly visible):

General
- Kitten
- Domain
- App
- Evergreen Web

Security
- ldentity
- Secrets

State
- Overview
- Sessions
- Pages
- Requests
Screenshot of web page at https://gaza-verified.org/🐱/settings/backup-and-restore. Main section: Backup and restore Backup This will download a full backup of your data, including: - Internal database (_db) - App database (db) - Uploads Download backup Restore This will restore your Small Web place from a full backup of your data. That includes your internal database (so your identity, secret, etc.) as well as the app database and uploads (if any). Label: Data backup file (.kitten.data.tar.gz) File upload control: [Choose file] button. No file chosen Restore button Navigation (partly visible): General - Kitten - Domain - App - Evergreen Web Security - ldentity - Secrets State - Overview - Sessions - Pages - Requests
Screenshot of web page at https://gaza-verified.org/🐱/settings/backup-and-restore. Main section: Backup and restore Backup This will download a full backup of your data, including: - Internal database (_db) - App database (db) - Uploads Download backup Restore This will restore your Small Web place from a full backup of your data. That includes your internal database (so your identity, secret, etc.) as well as the app database and uploads (if any). Label: Data backup file (.kitten.data.tar.gz) File upload control: [Choose file] button. No file chosen Restore button Navigation (partly visible): General - Kitten - Domain - App - Evergreen Web Security - ldentity - Secrets State - Overview - Sessions - Pages - Requests
  • Copy link
  • Flag this post
  • Block
Aral Balkan
Aral Balkan
@aral@mastodon.ar.al  ·  activity timestamp 2 months ago

🥳 JavaScript Database (JSDB) version 6.1.4 released:

• Adds TypeScript type definitions

Been meaning to do this for a while and finally got round to it :)

https://codeberg.org/small-tech/jsdb#javascript-database-jsdb

#JavaScript #database #JavaScriptDatabase #JSDB #native #data #web #dev #NodeJS #SmallWeb

  • Copy link
  • Flag this post
  • Block
Aral Balkan
Aral Balkan
@aral@mastodon.ar.al  ·  activity timestamp 2 months ago

Ah, the joys of having a built-in native JavaScript database¹ that can persist and load typed JavaScript objects² and an interactive JavaScript shell (REPL)³ in Kitten⁴ :)

:kitten:💕

¹ https://kitten.small-web.org/reference/#database
² https://kitten.small-web.org/tutorials/database-app-modules/
³ https://kitten.small-web.org/reference/#kitten-s-interactive-shell-repl
⁴ https://kitten.small-web.org

#Kitten #SmallWeb #web #development #JavaScript #NodeJS #JSDB

Screenshot of the Kitten shell open in terminal for the currently-running site:

> kitten.db.accounts.findAccountWithHandle('@aral@mastodon.ar.al')

Proxy [
Account {


id: 'ce4c1f2c-2044-47a0-b97e-1bc1a43bfc07',

url: 'https://mastodon.ar.al/@aral',

isVerified: true,

data: Proxy [ [Object], [Object] ],

isScheduled: false,

joinPageIp: undefined,

privatePageIps: Proxy [ [Array], [Object] ],

isTeam: false,

callDays: Proxy [ [Array], [Object] ]
}
get: [Function: bound getHandler], set: [Function: bound setHandler], defineProperty: [Function: bound definePropertyHandler], deleteProperty: [Function: bound deletePropertyHandler]
}
]

> kitten.db.calendar.scheduleInterview(kitten.db.accounts.findAccountWithHandle('@aral@mastodon.ar.al').id)
Screenshot of the Kitten shell open in terminal for the currently-running site: > kitten.db.accounts.findAccountWithHandle('@aral@mastodon.ar.al') Proxy [ Account { id: 'ce4c1f2c-2044-47a0-b97e-1bc1a43bfc07', url: 'https://mastodon.ar.al/@aral', isVerified: true, data: Proxy [ [Object], [Object] ], isScheduled: false, joinPageIp: undefined, privatePageIps: Proxy [ [Array], [Object] ], isTeam: false, callDays: Proxy [ [Array], [Object] ] } get: [Function: bound getHandler], set: [Function: bound setHandler], defineProperty: [Function: bound definePropertyHandler], deleteProperty: [Function: bound deletePropertyHandler] } ] > kitten.db.calendar.scheduleInterview(kitten.db.accounts.findAccountWithHandle('@aral@mastodon.ar.al').id)
Screenshot of the Kitten shell open in terminal for the currently-running site: > kitten.db.accounts.findAccountWithHandle('@aral@mastodon.ar.al') Proxy [ Account { id: 'ce4c1f2c-2044-47a0-b97e-1bc1a43bfc07', url: 'https://mastodon.ar.al/@aral', isVerified: true, data: Proxy [ [Object], [Object] ], isScheduled: false, joinPageIp: undefined, privatePageIps: Proxy [ [Array], [Object] ], isTeam: false, callDays: Proxy [ [Array], [Object] ] } get: [Function: bound getHandler], set: [Function: bound setHandler], defineProperty: [Function: bound definePropertyHandler], deleteProperty: [Function: bound deletePropertyHandler] } ] > kitten.db.calendar.scheduleInterview(kitten.db.accounts.findAccountWithHandle('@aral@mastodon.ar.al').id)
  • Copy link
  • Flag this post
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.2-alpha.7 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct