This project is a simple local-first habit tracking example app built with Expo, Expo SQLite, Drizzle, and Drizzle Kit. The app allows users to track their habits efficiently and effectively, ensuring that they can monitor their progress over time without relying on a constant internet connection.
For a detailed guide on building this local-first app, check out the accompanying Building local-first apps with Expo SQLite and Drizzle blog post.
Expo is a powerful framework for building cross-platform React Native applications. It simplifies the development process and provides a rich set of tools and libraries.
Expo SQLite is a library that allows you to access a SQLite database, enabling you to store data locally on the device. This is crucial for local-first applications, as it ensures that users can access their data anytime.
Drizzle is a TypeScript ORM for SQL databases that simplifies database interactions. It provides a clean and intuitive API for querying and manipulating data.
Drizzle Kit is a CLI tool for managing database migrations, making it easier to evolve your database schema over time.
- Local-First: The app stores data locally on the device using SQLite, ensuring that users can access their habit data anytime, anywhere.
- Habit Tracking: Users can easily add, edit, and delete habits, as well as mark them as completed.
- Data Management: Utilizes Drizzle and Drizzle Kit for data access.
To get started:
-
Clone the repository:
git clone https://github.com/israataha/expo-sqlite-drizzle.git
-
Navigate to the project directory:
cd expo-sqlite-drizzle -
Install the dependencies:
npm install
-
Start the development server:
npx expo start
-
Run on emulator or physical device
Once the app is running, you can:
- Create or Delete habits from the Settings tab.
- Mark habits as completed from the Habits tab.