52 lines
3.3 KiB
Markdown
52 lines
3.3 KiB
Markdown
# Repository Guidelines
|
|
|
|
## Project Structure & Module Organization
|
|
|
|
Recyvio is an Expo subscription tracker for iOS, Android, and web. The home screen displays a static example subscription; storage and calculations are planned.
|
|
|
|
- `src/app/`: Expo Router routes. `index.tsx` serves `/`; `_layout.tsx` provides shared safe-area and status-bar setup.
|
|
- `src/features/subscriptions/components/`: subscription UI, including `SubscriptionCard`.
|
|
- `src/__tests__/`: route and UI tests.
|
|
- `docs/IMPLEMENTATION_PLAN.md`: planned architecture, milestones, and workbook analysis.
|
|
- Root configuration: `app.json`, `tsconfig.json`, `eslint.config.js`, and `jest.config.js`.
|
|
|
|
## Build, Test, and Development Commands
|
|
|
|
Use Node.js 22.13.0 or newer and npm 10 or newer; `.nvmrc` selects Node 22.
|
|
|
|
- `npm ci`: install dependencies from the committed or supplied `package-lock.json`.
|
|
- `npm start`: start the Expo development server.
|
|
- `npm run web`: launch web development.
|
|
- `npm run android`: launch with a configured Android emulator or device.
|
|
- `npm run typecheck`: check TypeScript without emitting files.
|
|
- `npm run lint`: run ESLint with Expo rules.
|
|
- `npm test`: run Jest serially.
|
|
- `npm run export:web`: generate the production web export in `dist/`.
|
|
|
|
## Coding Style & Naming Conventions
|
|
|
|
Use two-space indentation, single-quoted strings, semicolons, trailing commas, and double-quoted JSX attributes. Use functional TypeScript components, PascalCase component names, and camelCase variables/functions. Preserve Expo Router filenames.
|
|
|
|
Strict TypeScript and unchecked-index checks are enabled; explicit `any` is forbidden. Use `StyleSheet.create`. No separate formatter is configured.
|
|
|
|
## Testing Guidelines
|
|
|
|
Use Jest (`jest-expo`), React Native Testing Library, and Expo Router testing utilities. Name tests `*.test.ts` or `*.test.tsx` under `src/`, preferably `src/__tests__/`. Test observable behavior and business logic. No coverage threshold is configured. Run typecheck, lint, tests, and web export; report actual results, failures, and unexecuted checks.
|
|
|
|
## Commit & Pull Request Guidelines
|
|
|
|
Git is not initialized; no historical convention exists. Use imperative subjects, e.g. `Add subscription list screen`. PRs should describe changes, link issues or milestones, list validation, and include UI screenshots. Never commit or push without an explicit request.
|
|
|
|
## Security & Configuration
|
|
|
|
Keep `Subscriptions.xlsx` private and unchanged; use synthetic subscription data in tests. Do not commit `.env` files, caches, generated native projects, or build output. Maintain `package-lock.json` alongside dependency changes.
|
|
|
|
## Collaboration & Business Rules
|
|
|
|
- Communicate with the user in Russian; keep all project content in English, including UI, documentation, comments, and tests.
|
|
- Work in the smallest complete steps. Explain significant changes beforehand; avoid unrelated refactoring.
|
|
- Explain new React patterns for a developer experienced in Java/Kotlin who is learning React.
|
|
- Treat Excel as a reference, not an unquestionable specification. Discuss ambiguous financial and billing rules before implementing them; keep calculations independent of React.
|
|
- Summarize what changed, why, verification, and remaining limitations.
|
|
- Propose additions to this guide when important, lasting agreements emerge. Keep temporary issues in task documentation; obtain agreement before adding new standing rules.
|