GitHunt
PR

pro804/Read-and-Write-with-SQLite-App

A simple and educational React Native User Form application built with Expo that demonstrates how to read from and write to a local SQLite database on a mobile device.

๐Ÿ“ฑ Read-and-Write-with-SQLite-App

A simple and educational React Native application built with Expo that demonstrates how to read from and write to a local SQLite database on a mobile device. This app is intended for learners and developers who want a practical example of integrating SQLite with React Native using the Expo ecosystem.

โœจ Designed for clarity and ease-of-use, this app is perfect for those new to mobile development with Expo and local data storage.

Expo
React Native
License: MIT

App Preview

๐Ÿ“š Table of Contents


๐Ÿงญ Introduction

This project was created to help developers understand how to implement local persistent storage using SQLite within an Expo-based React Native app. It provides a minimal yet functional example of creating and managing a user database โ€” ideal for use cases like contact lists, offline storage, and user data management.


โœจ Features

  • ๐Ÿ“ฆ Add new user records to a local SQLite database.
  • ๐Ÿ“„ Display a real-time list of all users stored in the database.
  • ๐Ÿ’พ Uses device-local SQLite storage (offline functionality).
  • ๐Ÿš€ Built using Expo for fast development and easy deployment.
  • ๐ŸŽจ Clean UI with user-friendly icons.

โš™๏ธ Installation

  1. Clone the repository:

    git clone https://github.com/your-username/Read-and-Write-with-SQLite-App.git
    cd Read-and-Write-with-SQLite-App
  2. Install dependencies:

    npm install
  3. Start the Expo development server:

    npm start

โ–ถ๏ธ Usage

  1. Open the Expo Go app on your Android/iOS device.
  2. Scan the QR code generated in the terminal or browser.
  3. Use the interface to:
    • Add a new user by entering their name.
    • View a list of all saved users.

๐Ÿ’ก The app runs entirely on the local device โ€” no network required!


๐Ÿ“ฆ Dependencies

  • React Native (via Expo)
  • Expo SQLite โ€“ for database access
  • Expo CLI โ€“ for development and testing

All dependencies are installed via npm install.


๐Ÿ”ง Configuration

No additional configuration is required. SQLite creates a local .db file on the device, and the database setup is handled automatically when the app starts.

If you wish to modify the schema:

  • Edit database.js to change the table creation logic.
  • Reinstall the app to reset the database.

๐Ÿ› ๏ธ Troubleshooting

  • If the app fails to start, try clearing Expoโ€™s cache:

    npm start -- --clear
  • Ensure you have the Expo Go app installed on your device.

  • For Android emulators, ensure they are set up with Google Play services for Expo.


๐Ÿค Contributing

Contributions are welcome! If you have suggestions, feature requests, or improvements:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-name).
  3. Make your changes.
  4. Submit a pull request.

๐Ÿ“ License

This project is licensed under the MIT License.