PowerSync TypeScript Skill
Sync engine for local-first apps with real-time sync between client SQLite and backend databases.
When to Use
- Offline-first/local-first applications
- Real-time sync between client and server
- Instant UI responsiveness with background sync
Installation
| Platform |
Package |
| Web |
@powersync/web + @journeyapps/wa-sqlite |
| React Native |
@powersync/react-native + @powersync/op-sqlite |
| React hooks |
@powersync/react |
| Vue composables |
@powersync/vue |
| Node.js |
@powersync/node |
| Kysely ORM |
@powersync/kysely-driver |
| Drizzle ORM |
@powersync/drizzle-driver |
Core Setup
- Schema → docs · example
- Database → docs · example
- Connector → docs · example
API Quick Reference
| Operation |
Method |
| Get one |
db.get(sql, params) / db.getOptional(sql, params) |
| Get all |
db.getAll(sql, params) |
| Execute |
db.execute(sql, params) |
| Transaction |
db.writeTransaction(async (tx) => { ... }) |
| Watch |
db.query({sql, parameters}).watch() |
| Diff watch |
db.query({sql, parameters}).differentialWatch() |
Full CRUD: docs
React Hooks
| Hook |
Purpose |
useQuery |
Query with loading/error states |
useSuspenseQuery |
Query with Suspense |
useStatus |
Connection status |
usePowerSync |
Database instance |
Docs: React · Vue
ORM Integration
Documentation
Local References
references/sync-rules.md - Sync Rules configuration
references/examples.md - All official example projects
GitHub Source
powersync-ja/powersync-js