build-with-tinybase
Ce qu’il fait
Elle explique comment configurer TinyBase pour que les données restent sur l'appareil, avec une synchronisation facultative entre appareils. Elle s'adresse aux développeurs qui créent des applications JavaScript ou TypeScript avec TinyBase.
Quand l’utiliser
- ✓Quand vous voulez créer une application JavaScript ou TypeScript qui conserve ses données dans le navigateur ou sur l'appareil.
- ✓Quand vous voulez configurer la sauvegarde ou la synchronisation d'un store TinyBase.
- ✓Quand vous voulez une nouvelle application TinyBase créée à partir d'un modèle généré.
Lien du skill
https://github.com/tinyplex/tinybase/blob/main/docs/skills/build-with-tinybase/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Crée une petite application de liste de tâches avec TinyBase qui sauvegarde les données dans le navigateur et les synchronise entre deux de mes appareils.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
L'agent lit les guides de référence de TinyBase avant d'écrire du code, puis met en place le store, la couche de sauvegarde et la couche de synchronisation dans le bon ordre. Il vérifie ensuite que le comportement fonctionne.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
Build With TinyBase
Prefer a current generated application over reconstructing TinyBase setup from memory. Preserve persistence and synchronization lifecycle ordering, and verify the behavior the user actually needs.
Read The References
Do not recall TinyBase API details from memory. Read the reference covering the task before writing code:
| Reference | Read it when |
|---|---|
| references/architecture.md | Choosing between Store and MergeableStore, a persistence backend, a synchronization approach, or UI bindings |
| references/import-paths.md | Importing anything outside the tinybase root, or checking which Persisters accept a MergeableStore |
| references/lifecycle.md | Creating, starting, reconnecting, or destroying a Persister or Synchronizer, or setting WebSocket paths and channel Ids |
| references/durable-objects.md | Building or debugging a Cloudflare Durable Object sync server |
Select The Architecture
Read references/architecture.md when choosing between Store and MergeableStore, persistence backends, synchronization, or UI bindings.
Confirm that TinyBase fits the task:
- Keep the active application dataset in a JavaScript runtime.
- Use TinyBase for reactive tabular or key-value data, local-first behavior, persistence, synchronization, or framework bindings.
- Do not present TinyBase as a hosted database service.
- Pair it with another database or service when the authoritative dataset is unbounded, primarily queried on a server, or requires managed backend facilities.
Scaffold A New Application
Inspect the installed generator contract first:
npm create tinybase@latest -- --list-options
Translate the user's requirements into explicit values. Generate unattended projects with every applicable option and always disable automatic installation and server startup:
npm create tinybase@latest -- \
--non-interactive \
--projectName my-tinybase-app \
--appType todos \
--language typescript \
--framework react \
--tinyWidgets false \
--schemas true \
--syncType none \
--persistenceType local-storage \
--prettier true \
--eslint true \
--installAndRun false
Run the generator in the parent directory that should contain the new project. Do not overwrite an existing directory. After generation:
- Read the generated
AGENTS.mdandREADME.md. - Inspect the primary Store file before modifying application code.
- Install dependencies only when authorized and required.
- Make application-specific changes within the generated architecture.
- Run the generated client build.
- Run the server build when server code changed.
Extend An Existing Application
Inspect package.json, TinyBase imports, Store creation, Persister setup, and
Synchronizer setup before editing. Use documentation matching the installed
TinyBase version. Start at https://tinybase.org/llms.txt or retrieve current
TinyBase documentation through Context7 when available.
Keep these boundaries clear:
- Store creation and schemas
- persistence startup and teardown
- synchronization startup and teardown
- framework Provider or context wiring
- application-specific data and UI
Reuse existing imports and patterns when they are current. Import integrations
from their specific tinybase/... subpaths. Avoid adding a second source of
truth in component state for data already owned by TinyBase.
Avoid These Errors
These account for most incorrect TinyBase code. Each is covered in detail by a reference above.
- Passing a Store where a MergeableStore is required. Every Synchronizer, and
every Durable Object Persister, requires
createMergeableStore(). - Importing an integration from
tinybaseinstead of its owntinybase/persisters/...,tinybase/synchronizers/..., ortinybase/schematizers/...subpath. - Starting auto-saving before loading, which overwrites stored data wi
Questions fréquentes
L'agent se fie-t-il à sa mémoire pour les détails de TinyBase ?
Non. La compétence demande de lire les guides de référence avant d'écrire du code.
Les données peuvent-elles se synchroniser entre appareils ?
Oui. La compétence couvre la synchronisation d'un store par WebSockets ou par Cloudflare Durable Objects.
La compétence couvre-t-elle la sauvegarde dans une base de données ?
Oui. Elle couvre la configuration de la persistance dans le navigateur ou dans une base de données.
Détails
Description originale de l’auteur
Scaffold, extend, and verify reactive local-first JavaScript or TypeScript applications with TinyBase. Use when choosing TinyBase for in-memory tabular or key-value state, generating an app with create-tinybase, adding schemas or UI bindings, resolving TinyBase import paths, configuring browser or database persistence, configuring MergeableStore synchronization over WebSockets or Cloudflare Durable Objects, or diagnosing an existing TinyBase application.
repo: tinyplex/tinybase
Popularité
- Étoiles GitHub
- 5.2k
- Position au classement
- #15030
- Licence
- MIT
- Mis à jour
- 22/10/2026
Commentaires
- …
Skills similaires
angular-developer
280kAide votre agent à créer du code Angular et à conseiller sur la structure des projets. Utile pour démarrer, créer des composants ou améliorer performances et accessibilité.
frontend-a11y
280kAide votre agent à rendre les interfaces web accessibles à tous. Il garantit que sites et apps fonctionnent avec les lecteurs d'écran et la navigation au clavier.
frontend-patterns
280kPermet à votre agent d'appliquer les modèles modernes du frontend : optimisation des performances, gestion d'état et bonnes pratiques avec React et Next.js.