Skip to content

proustibat/memory-game-ionic

Repository files navigation

Memo Sequence Ionic

Memo Sequence Ionic is an Ionic React port of the original number memory game.

The app currently includes:

  • the core gameplay loop
  • Capacitor Preferences-backed best score persistence
  • Capacitor Preferences-backed sound settings persistence
  • Web Audio digit playback and preview tones
  • post-game score save flow
  • Supabase-backed leaderboard page

Routes

  • /game - game screen
  • /leaderboard - leaderboard page
  • /settings - local game preferences

Environment Variables

Create a local environment file such as .env.local:

VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key

These values are read through import.meta.env.

If they are missing:

  • the game still works locally
  • the save-score modal is not shown
  • the leaderboard page displays a configuration message

Local Development

Install dependencies:

npm install

If you add or update Capacitor plugins, sync the native projects after the web install step:

npx cap sync

Run the app in the browser:

ionic serve

You can also use the Vite dev server directly:

npm run dev

Android Development

Install the Android platform dependency and generate the native project:

npm install @capacitor/android
npx cap add android

After web changes, rebuild and resync before opening Android Studio:

npm run build
npx cap sync android

Open the native project:

npx cap open android

Notes:

  • Android Studio is expected to provide the JDK/Gradle runtime on macOS
  • the first Gradle build may install missing Android SDK components automatically
  • testing can be done either on an Android emulator or on a real Android device with USB debugging enabled
  • the current Android target is phones only in portrait orientation
  • tablet distribution should be excluded at Play Console release time rather than assumed from emulator-only checks

Run checks:

npm run lint
npm run test.unit -- --run
npm run build

iOS Release Prep

Additional iOS release notes live here:

  • docs/IOS_RELEASE_GUIDE.md
  • docs/PRIVACY_POLICY_DRAFT.md
  • docs/index.html
  • docs/support.html
  • docs/privacy-policy.html

Android Release Prep

Additional Android release notes live here:

  • docs/ANDROID_RELEASE_GUIDE.md
  • docs/ANDROID_PLAY_CONSOLE_PREP.md

Supabase Requirements

The app expects a scores table with public read and insert access through Supabase Row Level Security policies.

Expected columns:

  • id
  • player_name
  • score
  • created_at

Recommended rules:

  • score >= 0
  • player_name length between 1 and 24
  • public select
  • public insert
  • no public update
  • no public delete

Store Build Note

For an Ionic + Capacitor app, VITE_* variables are compiled into the web bundle at build time.

That means:

  • they are not fetched dynamically from the App Store or Play Store
  • each environment needs its own build pipeline
  • changing a production value requires shipping a new app build unless you use a separate runtime config mechanism
  • Xcode archives the already-synced web bundle and does not read .env.local on its own

Do not put server secrets in VITE_* variables.

This app also uses @capacitor/preferences for lightweight local persistence.

When you add the iOS platform later, App Store submission will require a privacy manifest entry for UserDefaults access. The Capacitor Preferences documentation currently recommends:

  • NSPrivacyAccessedAPICategoryUserDefaults
  • reason CA92.1

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors