How metin-aksu/kelimatik works
Project type and purpose
• This is a cross-platform mobile application built with React Native (TypeScript), named “Kelimatik.”
• It embeds a pre-populated SQLite database (Kelimeler.db) in the native assets and exposes it to the JavaScript layer via a native bridge or community SQLite module.
• No remote backend is present; all data lives locally.
File structure
• Top-level app code:
• App.tsx, index.js — entry points for the JS bundle.
• Native containers:
• android/ — Gradle build, MainActivity.kt, MainApplication.kt, assets/www/Kelimeler.db.
• ios/ — Xcode project, AppDelegate, Info.plist, embedded DB under src/db too (for possible code-side copy).
• Tooling & config:
• metro.config.js, babel.config.js — bundler configuration.
• jest.config.js and __tests__ — unit testing setup.
• package.json, Gemfile — npm/Yarn and Ruby (cocoa pods) dependencies.
README for additional insights
• Confirms use of Metro Bundler for JS, running on Android Emulator or iOS Simulator.
• No mention of remote APIs—app runs entirely locally.
Main components
a. Developer environment
• Code editor/IDE
• CLI tools (npm/Yarn, Metro)
• Android Studio / Xcode
b. Bundler & build
• Metro Bundler → produces a single JavaScript bundle
• Platform-specific build systems (Gradle for Android, CocoaPods + Xcode for iOS)
c. Runtime stack on device/emulator
• JavaScriptCore (iOS) or Hermes/V8 (Android)
• Native modules (Activity/AppDelegate, UI Manager)
d. Application code
• UI layer: React components in src/screens/
• Business logic & state: React Context or hooks in App.tsx & database.ts
• Data layer: SQLite DB exposed through a native SQLite plugin
e. Database
• Pre-populated Kelimeler.db packaged into native assets
• File copied on first launch to device storage; accessed via native module
f. Testing
• Jest runs unit tests against JS components and database wrappers
Relationships and interactions
• Developer writes TS/JS → Metro bundles → bundle loaded into JS engine at runtime.
• JS UI components call into native modules via the React Native bridge to open/read the SQLite DB.
• Native code (Android Activity or iOS AppDelegate) bootstraps the JS runtime and registers database modules.
• User gestures on the UI → event handlers in JS → queries against SQLite → results rendered back into the UI.
Architectural patterns & design principles
• Component-based UI: screens and subcomponents under src/screens/.
• Layered separation: Presentation (React components), Business Logic (TypeScript services/hooks), Data Access (database.ts + native SQLite).
• Single-page application model within a native container.
Relevant technologies & frameworks
• React Native (JS + bridge to native)
• TypeScript
• Metro Bundler
• SQLite (via community/native plugin)
• Gradle (Android), CocoaPods + Xcode (iOS)
• Jest (testing)
Detail without overcomplicating
• Major components, even if simple (e.g., list the .db file as its own component).
• Both build-time relationships (CLI → bundler → build system) and run-time interactions (JS ↔ native, JS → DB).