@sqliteai/todoapp
v1.0.3
Published
An Expo template for building apps with the SQLite CloudSync extension
Downloads
18
Readme
Expo CloudSync Example
A simple Expo example demonstrating SQLite synchronization with CloudSync. Build cross-platform apps that sync data seamlessly across devices.
🚀 Quick Start
1. Clone the template
Create a new project using this template:
npx create-expo-app MyApp --template @sqliteai/todoapp
cd MyApp2. Database Setup
- Create database in SQLite Cloud Dashboard.
- Execute the exact schema from
to-do-app.sql. - Enable OffSync for all tables on the remote database from the SQLite Cloud Dashboard -> Databases.
3. Environment Configuration
Rename the .env.example into .env and fill with your values.
⚠️ SECURITY WARNING: This example puts database connection strings directly in
.envfiles for demonstration purposes only. Do not use this pattern in production.Why this is unsafe:
- Connection strings contain sensitive credentials
- Client-side apps expose all environment variables to users
- Anyone can inspect your app and extract database credentials
For production apps:
- Use the secure sport-tracker-app pattern with authentication tokens and row-level security
- Never embed database credentials in client applications
4. Build and run the App
npx expo prebuild # run once
npm run ios # or android✨ Features
- Add Tasks - Create new tasks with titles and optional tags.
- Edit Task Status - Update task status when completed.
- Delete Tasks - Remove tasks from your list.
- Dropdown Menu - Select categories for tasks from a predefined list.
- Cross-Platform - Works on iOS and Android
- Offline Support - Works offline, syncs when connection returns
