How minori-ty/expo-schedule works
Project Type and Purpose
• This is a full-stack mobile application built with Expo (React Native) using file-based routing (app/ directory).
• It fetches anime and calendar data via API wrappers (api/), persists data locally in SQLite (db/, drizzle.config.ts), and supports background sync tasks (backgroundTasks/).
File Structure
• app/ – all screens and layout components (file-based routes).
• api/ – wrappers around external anime & calendar REST endpoints.
• components/ – reusable UI controls and Lottie animations.
• db/ + drizzle/ – local SQLite database schema, migrations, ORM config.
• backgroundTasks/ – tasks that run off-thread for periodic sync.
• hooks/, utils/, enums/, constants/, styles/ – support layers.
• configuration files: babel.config.js, tsconfig.json, tailwind.config.js, eas.json, etc.
README
• Confirms Expo project, instructions to run/dev.
Main Components & Their Relationships
a. Mobile Client (Expo App)
• Screens (app/…) and Navigation (Expo Router)
• UI Component Library (components/, styles/, assets/)
• Hooks & State Layer (React Query via utils/react-query, hooks/)
b. Network Layer
• api/ modules call external anime/calendar services over HTTPS
c. Local Persistence
• SQLite via Drizzle ORM (db/, drizzle/*)
d. Background Sync
• backgroundTasks/ runs periodic jobs to refresh data from external API and store in DB
e. Permissions & Native APIs
• permissions/ for runtime permissions
• utils/file.android.ts, nativewind-env.d.ts, metro.config.js for native config
Architectural Patterns & Design Principles
• Layered architecture:
• Presentation (screens & components) → Data Fetch (React Query hooks) → Data Source (Network or Local DB)
• Separation of concerns: file-based routing isolates screen logic, components folder for pure UI, api/ for network, db/ for storage.
• Use of background tasks isolates periodic sync from UI thread.
• Declarative styling via Tailwind CSS (tailwind.config.js, nativewind).
• Typed safety: TypeScript across the stack, enums/, types/.