Skip to content

Conversation

@yogesh4216
Copy link
Contributor

issue: #123


Description

This PR initializes SQLite for the mobile app to support an offline-first architecture.

On first app launch, a local SQLite database (blob.db) is created and initialized.
A reusable database access layer is added so the connection can be safely used across the app without re-initialization.

The setup is intentionally minimal and focused only on initialization, as required by the issue.

Key points:
• Database is created on first launch
• Initialization is safe to call multiple times
• Uses Expo SDK 54–compatible async SQLite API
• Includes a placeholder schema for future expansion

This lays the groundwork for offline data storage without introducing any business logic or sync behavior.


Dependency changes (if applicable)

Added:
expo-sqlite — for local SQLite support on Expo (SDK 54 compatible)


Summary

This PR initializes SQLite for the mobile app to support an offline-first architecture.

What was done

  • Added expo-sqlite (SDK 54 compatible)
  • Implemented a reusable singleton database connection
  • Ensured database is created on first app launch (blob.db)
  • Added initial schema via migrations
    • Placeholder meta table for future use
  • Initialization is safe to call multiple times

Notes

  • Uses the new async SQLite API (openDatabaseAsync) required by Expo SDK 54
  • No app data or sync logic included (intentionally out of scope)

Checklist

  • SQLite initialized on first launch
  • Reusable DB connection
  • Expo-compatible solution
  • No ORM / CRUD / remote sync (per issue scope)

Screenshots

Screenshot 2026-01-04 at 1 10 16 AM

@OpenGitBot
Copy link

Hey @yogesh4216

Thanks for opening this PR 🚀. Mentor will review your pull request soon and till then, keep contributing and stay calm.

Thanks for contributing in OpenCode'25 ✨✨!

@07CalC 07CalC merged commit ec51bb9 into opencodeiiita:main Jan 4, 2026
@OpenGitBot
Copy link

Hey @yogesh4216

Your PR has been merged 🥳🥳 and you have earned 20 points.

Thanks for contributing in OpenCode'25✨✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants