This folder is the future Expo/React Native client for AssRep. The goal is a single, strictly typed codebase that mirrors the Telegram student journey while keeping the architecture and tooling clean from day one.
- Expo-managed app (Android / iOS / Web from one codebase) with TypeScript strict compliance.
- Feature-first layers (
src/features,src/entities,src/shared,src/screens) so new functionality plugs into predictable folders. - Reusable UI kit (
shared/components) with consistentButton,Text,Input,Card, and design tokens (shared/constants/tokens). - Shared API client in
shared/api(one entrypoint + typed responses) so UI never callsfetch/axiosdirectly. - Global state via a single solution (Zustand or Redux Toolkit; TBD) with selectors outside components.
- i18n-ready strings, accessibility-aware props, centralized logging, and an Error Boundary.
- Language: TypeScript strict flags (
noImplicitAny,strictNullChecks, etc.). - Formatting: Prettier (one config in the repo root).
- Linting: ESLint + shared config (extendable by features).
- Pre-commit: Husky + lint-staged (
pnpm fmt,pnpm linton staged files). - Package manager:
pnpm. - Testing: Unit tests targeting API layer and business logic (
jest/vitestas appropriate). - CI baseline:
pnpm lint,pnpm test,pnpm build(via EAS for Android when ready). - Beta delivery: OTA (
EAS Update) + Android Internal Track + TestFlight via.github/workflows/mobile-beta-distribution.yml.
src/
├── entities/ # core domain models + types (User, Tutor, Slot, Notification)
├── features/ # feature-centric folders (e.g., subjects, tutors, slots, auth)
│ └── <feature>/
│ ├── hooks/ # hooks encapsulating feature logic
│ ├── components/
│ └── screens/ # feature screens
├── screens/ # routing-level screens (if separate from features)
└── shared/
├── api/ # single API client + response types
├── components/ # reusable UI kit (Button, Text, Input, Card, Layout)
├── constants/ # colors, spacing, typography, strings
├── hooks/ # shared hooks (useAuth, useNotifications, etc.)
├── state/ # Zustand/Redux slices + selectors
├── utils/ # helpers, logger, error boundary wrapper
└── config/ # navigation, theming, i18n setup
pnpm installpnpm expo start(runs Metro + dev server).pnpm lintpnpm fmtpnpm testpnpm test:smoke(critical role flows in mock mode)
- Before running mock mode, stop previously running Metro instances for this repo.
- Run UI-only mode with rich mock data and in-memory mutations:
make local-mock-up- or
pnpm start:mock
- Demo accounts in mock mode:
- Student:
+7 999 000-00-01/123456 - Tutor:
+7 999 000-00-02/123456 - Admin tutor:
+7 999 000-00-03/123456
- Student:
Use pnpm typecheck (via tsc --noEmit) once the feature modules exist.
Use pnpm test:smoke to validate critical student/tutor/admin flows against mock API.
- Copy
.env.exampleto.env.localand setAPI_BASE_URLto the IP/port where your backend runs (e.g.,http://192.168.1.42:8000/apiwhile your Mac is on the same Wi-Fi as the phone). - Keep
APP_ENV=localfor local work. Later you can create.env.stageand runAPP_ENV=stage pnpm expo startto target staging services. - For staging/beta values use
.env.stage.exampleas a template. - To reach your Mac from the phone, start Expo with both the tunnel and your host IP:
This makes Metro and the backend reachable via the same LAN address.
EXPO_PACKAGER_HOSTNAME=$(ipconfig getifaddr en0) pnpm start:local - Keep
.env.localout of git (.gitignorealready covers it); commit only.env.example.
- Connect your Android device or start an emulator.
- Run
pnpm expo start --androidorpnpm expo androidto push the bundle to the device. - For convenience, expose the development server to the device by running Metro with
--host tunnelor usingEXPO_DEVTOOLS_LISTEN_ADDRESS=0.0.0.0. - Keep
EXPO_PACKAGER_HOSTNAMEpointed to your machine IP if necessary so the device can fetch bundles. - Document any required env (API base URL, auth tokens) in a
.env.example.
- All network calls go through
shared/api/client.ts(to be created) so error handling, auth headers, retries, and serialization stay in one place. - Auth context (tokens, role) lives in
shared/state/authStore.ts. - Notifications (in-app and push-ready) come through a shared
shared/hooks/useNotifications.ts.
- Use a shared logger (e.g.,
shared/utils/logger.ts) for warnings/errors; never log raw exceptions to UI. - Wrap root navigator with an Error Boundary components to display user-friendly fallback screens.
- Sketch the student flow: Subjects → Tutors → Tutor Profile → Slots → Reviews.
- Connect the API client to the backend endpoints and wire auth + notifications.
- Build shared UI tokens (colors/spacing/typography) plus reusable components.
- Add Husky + lint-staged, ensure
pnpm lint/test/buildruns cleanly. - Document how to run Android tests and keep this README in sync as the app grows.
- Workflow:
.github/workflows/mobile-beta-distribution.yml - Full runbook:
docs/beta-distribution.md - EAS profile config:
eas.json(previewfor internal beta,betafor store/TestFlight submission)