Tinylib
DiscoverDocsSign in
Sign in
Tinylib
AboutDiscoverDocsMake an appPricingTermsPrivacyDeveloper TermsContact

Start

  • Quickstart
  • How Tinylib works

Guides

  • Data
  • Rooms and rules
  • Games
  • Friends
  • Places and links
  • Reminders and notifications
  • Publishing
  • Errors and offline
  • Platforms

Client API

  • tinylib
  • tinylib.data
  • tinylib.rooms
  • tinylib.invitations
  • tinylib.friends
  • tinylib.places
  • tinylib.reminders
  • Types
  • tinylib-sdk/kits

Rules API

  • Kinds
  • ctx

Reference

  • tinylib.json
  • Command line
  • Limits
    • Apps and versions
    • tinylib.json
    • Users
    • Rooms
    • The rules
    • Notifications
    • Reminders

Plain text

  • llms.txt
  • llms-full.txt

Limits

A value's size is its JSON in UTF-8 bytes. Pro, Tinylib's paid plan for developers, raises how many apps you can have, and that row shows its Pro value in parentheses.

Apps and versions

npx tinylib-sdk publish and preview refuse a folder past one of these.

An app you unpublish still counts toward your apps until you delete it.

LimitValue
Apps per developer
Value
3 (25 on Pro)
New versions
Value
30 per hour
Previews
Value
30 per hour
Size of a version
Value
5 MB
Files in a version
Value
500
A file's path
Value
255 characters
Bundled rules, with their source map
Value
1 MB
Icon file
Value
256 KB
Icon's shortest side, at least
Value
512 pixels
Testers per preview
Value
25
How long a preview lasts after the last preview
Value
14 days

tinylib.json

npx tinylib-sdk dev reports a field past its limit, and publish refuses it.

LimitValue
slug
Value
40 characters
name
Value
20 characters
description
Value
120 characters
Entries in rulesKeys
Value
100
A key in rulesKeys
Value
128 bytes

Users

Past the data limit, tinylib.data.set throws a TinylibError with code limit. For a key that's too long, it throws a TypeError. A write by your rules past their limit is skipped and shows as an error on the developer page.

A call past a limit on calls, rooms, short codes, or invitations rejects with limit. A room counts toward the user's rooms until it ends or they leave it.

Saves past their rate wait on the user's device and sync when the rate allows them.

LimitValue
A user's data, written by your client
Value
1 MB
A user's data, written by your rules
Value
64 KB
A key in a user's data
Value
128 bytes
Saves a user makes in your app
Value
300 per 10 seconds
Calls your page makes to Tinylib for a user
Value
600 per minute
Rooms a user is in, in your app
Value
50
Rooms your page has open at once
Value
10
Rooms a user creates in your app
Value
60 per hour
Short codes a user tries in your app
Value
10 per minute
Invitations a user sends from your app
Value
60 per hour
Friends a user can have
Value
200

Rooms

tinylib.rooms.create with options too large, and room.act with an action too large or too frequent, reject with limit. room.relay sent too often throws limit.

A room is full when it has its most members. Joining a full room rejects with limit and a sentence such as "This room is full."

Any input that would leave a room's state or room data past its limit changes nothing. tinylib.rooms.create and room.act reject with limit, and any other handler's changes are dropped and show on the developer page.

Tinylib ends a room when nobody has had it open, acted in it, joined it, or left it for its kind's idleMs.

LimitValue
Members
Value
64
State
Value
1 MB
State of an offline kind
Value
256 KB
Room data
Value
256 KB
Options a room is created with
Value
16 KB
An action's data
Value
16 KB
Actions per second, from each member
Value
30 per second
Numbers in one relay
Value
32
Relays per second, from each client
Value
30 per second
Relays per second a room takes, from all its members
Value
1920 per second
How far a relay's at can read ahead of Tinylib's clock
Value
100 milliseconds
People without an account joining by the room's link
Value
128 per hour
Default idleMs
Value
7 days
Shortest idleMs
Value
1 minute
Longest idleMs
Value
365 days
How long a room's link and short code work
Value
7 days
How long a member has the room closed everywhere before presence runs
Value
5 seconds

The rules

A handler that runs past its CPU time fails as if it had thrown. An event, view, status, or room name past its limit isn't sent or set, and shows as an error on the developer page. A sentence given to ctx.refuse past its limit is cut short. A timer set sooner than the shortest delay goes off at that delay.

LimitValue
CPU time to handle one input
Value
50 milliseconds
An event from ctx.emit, or one member's view
Value
64 KB
A member's status
Value
200 characters
A room's name, from ctx.setName
Value
60 characters
The sentence given to ctx.refuse
Value
300 characters
Shortest delay of a timer set by a timer handler or beat
Value
1 second
Shortest beatMs
Value
50 milliseconds
Longest beatMs
Value
1 second

Notifications

ctx.notify with a title or text past its length sends nothing and shows as an error on the developer page. Past either rate, Tinylib drops the room's notifications silently.

LimitValue
Title
Value
80 characters
Text
Value
300 characters
Notifications from one room to one member
Value
60 per hour
Notifications from one room
Value
300 per hour

Reminders

tinylib.reminders.set rejects with limit when the user already has the most reminders your app may set, and with refused for a field past its length.

A reminder that can't go off within its lateness limit, for example because the device was off, skips to its next time.

LimitValue
Reminders a user has waiting, in your app
Value
32
A reminder's name
Value
64 characters
A reminder's title
Value
80 characters
A reminder's text
Value
200 characters
A reminder's address
Value
100 characters
How late a reminder still goes off
Value
1 hour
PreviousCommand line

On this page

  • Apps and versions
  • tinylib.json
  • Users
  • Rooms
  • The rules
  • Notifications
  • Reminders