AlexandrAI AGENTS.md
agents-md

Local Link Kr Mobile Agent Guide

Project-specific AGENTS.md guidance for the Local Link Kr Expo React Native app, live server data boundary, biometric token unlock, and verification gate.

AGENTS.md

Guidance for coding agents working on Local Link Kr Mobile, the Expo React Native client.

Project Overview

The mobile app calls the sibling server API for list, signup, login, and session behavior. It does not include mock data or offline signup fallbacks. Biometrics unlock a previously issued server session token stored on the device; they do not create an offline authentication path.

Key paths:

  • App.tsx: orchestration shell only.
  • src/types/: app types.
  • src/i18n/: localized copy and locale helpers.
  • src/api/: timeout-bounded HTTP core and endpoint modules.
  • src/features//: hooks, screens, and domain helpers.
  • src/providers/: persisted settings and app-wide providers.
  • src/components/: reusable presentational components.
  • src/theme/: tokens and visual constants.
  • scripts/live-data-check.mjs: server/database integration check.

Setup Commands

bashcd <project-root>/mobile
npm install
npm start
npm run typecheck
npm test
npm run verify

For live data verification, start the suite first and then run:

bashcd <project-root>/mobile
EXPO_PUBLIC_API_BASE_URL=<SERVER_URL> npm run test:live-data

Use <SERVER_URL> in examples. Real devices need a reachable API host supplied at runtime.

Code Style

  • Keep App.tsx as orchestration only.
  • Split files before they grow past 400 lines.
  • Put HTTP concerns in src/api/, not directly inside screens.
  • Put feature-specific state and screens under src/features//.
  • Keep reusable visual components in src/components/ and shared tokens in src/theme/.
  • Keep localized copy in src/i18n/; do not hardcode user-facing strings across screens.

Auth And Data Rules

  • Signup must call server email verification endpoints.
  • Do not call or invent a direct user creation endpoint.
  • Password login must call the server auth API.
  • Biometric login must use Expo LocalAuthentication plus SecureStore to unlock a saved server session token.
  • Do not add mock/offline signup data as a convenience path.

Testing

  • npm run verify is the normal completion gate.
  • Add Jest coverage for API modules, i18n behavior, config parsing, and feature hooks.
  • Use live-data checks only when the server and database stack are intentionally running.

Security

  • SecureStore holds tokens; do not persist session secrets in plain AsyncStorage or logs.
  • Redact tokens, verification codes, and API credentials from error output.
  • Keep API base URL runtime-configured.