Skip to content

React Native Expo app showcasing SQLite integration, database migrations, and web support with AsyncStorage and IndexedDB. Includes integration tests and a multi-platform demo (native & web)

Notifications You must be signed in to change notification settings

amarjanica/react-native-sqlite-expo-demo

Repository files navigation

React Native Expo Demo

A React Native Expo app showcasing:

  • SQLite integration
  • Database migrations
  • Web support with SQL.js and IndexedDB
  • Integration tests
  • Database import and export
  • Multi-platform demo (Android & Web)

This app is a companion to my blog and YouTube tutorials. Each chapter follows a lecture, and I update this README.md as I release new content. If you have suggestions, let me know.

Chapters

1. Database migrations and integration testing

I made first version of the app to showcase how you can to database migrations and configure integration tests to be run in a Node.js environment. Read more about it in my blog post on expo sqlite migrations and integration testing or watch my YT tutorial.
Codebase

2. Web support with SQLite, AsyncStorage and IndexedDB

I've added web support to the app, so it can run on the web. You can dynamically switch between different storage types: SQLite, AsyncStorage and IndexedDB. SQLite is supported on the web via sql.js. Read more about it in my blog post on expo sqlite, indexeddb and asyncstorage on the web or watch my YT tutorial.
Codebase

3. Redux

I've integrated Redux into the app to manage global state more efficiently. Read more about it in my blog post on redux integration in expo router app or watch my YT tutorial.
Codebase

4. Incrementing Expo App Version with release please

Example process of incrementing the app version with release-please and semantic-release. Read more about it in my blog post on incrementing expo app version with release please or watch my YT tutorial.
Codebase

5. Publish to Play from GitHub Actions

Updated Release Please with publish to Play Internal Test Track, after release please bumps expo version. Added a separate manual dispatch workflow that builds development apk and publishes it to GitHub releases. Read more about it in my blog post on publishing expo to play or watch my YT tutorial.
Codebase

6. Publish to TestFlight from GitHub Actions

Updated Release Please with publish to testflight. Added a separate manual dispatch workflow that releases IPA file to TestFlight. Read more about it in my blog post on publishing to testflight from github or watch my YT tutorial.
Codebase

7. Making SQLite work on the web with sql.js and indexeddb

In my previous tutorials I already made SQLite work on the web with sql.js. I also showed you how to use AsyncStorage and IndexedDB on the web. But I didn't show you how to make SQLite persistable between sessions with the help of IndexedDB. Read more about it in making sqlite work on the web or watch my YT tutorial.

8. Import and export SQLite web and native

Added import and export database to native and web part.
Read more about it in how to import & export sqlite. or watch my YT tutorial.
Codebase

App Screenshot

App Screenshot example

Run it on Android

I've tested this demo natively on android emulator.

npm i
# runs on expo go
npm run go:android
# or run on expo dev client
npm run dev:android

Web App Screenshot

Web app Screenshot example

Run it on the web

npm i
npm run web

Tests

Tests don't need an emulator. They're just jest tests that you can run with npm test like any nodejs project.

About

React Native Expo app showcasing SQLite integration, database migrations, and web support with AsyncStorage and IndexedDB. Includes integration tests and a multi-platform demo (native & web)

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published