106 lines
4.6 KiB
Markdown
106 lines
4.6 KiB
Markdown
# Recyvio
|
|
|
|
A cross-platform subscription tracker for iOS, Android, and web.
|
|
The application has one Expo Router screen for adding, editing, and deleting subscriptions
|
|
in memory. SQLite initialization is connected; persistent subscription storage and financial
|
|
calculations are not implemented yet.
|
|
|
|
## Language
|
|
|
|
Use English for all UI text, documentation, comments, and other project content.
|
|
Support for additional languages may be added later.
|
|
|
|
## Environment
|
|
|
|
- Windows / PowerShell.
|
|
- Node.js 22 LTS, version 22.13.0 or newer; npm 10 or newer.
|
|
- Expo SDK 57, React 19.2.3, React Native 0.86.3.
|
|
|
|
Base dependency versions follow the [official SDK 57 template](https://github.com/expo/expo/blob/sdk-57/templates/expo-template-default/package.json).
|
|
The minimum Node.js version is listed in the [Expo compatibility table](https://docs.expo.dev/versions/v57.0.0/).
|
|
Routing follows the [Expo Router installation guide](https://docs.expo.dev/router/installation/).
|
|
|
|
## Getting started
|
|
|
|
After installing Node.js 22, open a new terminal in the project root:
|
|
|
|
```powershell
|
|
node --version
|
|
npm ci
|
|
npx expo install --check
|
|
npx expo-doctor
|
|
npm run web
|
|
```
|
|
|
|
Use `npm ci` to install dependencies from `package-lock.json`. When changing dependencies,
|
|
use `npm install` and keep the lockfile in sync.
|
|
|
|
For Android with a configured emulator, run `npm run android`.
|
|
For a physical phone, run `npm start` and open the project in a compatible Expo Go app.
|
|
The phone and computer must be able to reach each other over the network. Confirm that the
|
|
installed Expo Go version supports SDK 57 on the device. On Windows, test iOS on a physical
|
|
iPhone; future custom builds can use EAS cloud builds.
|
|
|
|
## Local database
|
|
|
|
`DatabaseProvider` opens `recyvio.db` and runs `SELECT 1` before displaying the application.
|
|
It shows a loading screen during initialization and offers `Try again` if opening fails.
|
|
The database connection is shared through React Context and closed when the provider unmounts.
|
|
No subscription tables or repository implementation exist yet; subscriptions still live only
|
|
in memory and are lost on reload.
|
|
|
|
Web uses WASM support configured in `metro.config.js`. The application currently uses
|
|
asynchronous SQLite APIs. Synchronous APIs additionally require cross-origin isolation:
|
|
serve HTML with `Cross-Origin-Embedder-Policy: credentialless` and
|
|
`Cross-Origin-Opener-Policy: same-origin`. Header settings are included for Metro and Expo
|
|
hosting, but verify the actual HTML response before using synchronous APIs; the SPA
|
|
development server does not apply these headers to HTML.
|
|
See the [Expo SQLite web setup](https://docs.expo.dev/versions/v57.0.0/sdk/sqlite/#web-setup).
|
|
|
|
Web uses client-side rendering (`web.output: "single"` in `app.json`). This avoids the
|
|
`Worker chunk not found` development bundler error affecting static output in the installed
|
|
SDK 57 packages. Run `npm run web` for development with automatic updates after code changes.
|
|
Restart the Expo server after changing `app.json` or Metro configuration.
|
|
|
|
To preview a production build instead:
|
|
|
|
```powershell
|
|
npm run web:preview
|
|
```
|
|
|
|
Open the URL printed by Expo. This exports and serves `dist/`; rerun it after code changes.
|
|
Native device initialization must be verified separately on Android and iOS.
|
|
|
|
## Checks
|
|
|
|
```powershell
|
|
npm run typecheck
|
|
npm run lint
|
|
npm test
|
|
npm run export:web
|
|
```
|
|
|
|
## Application structure
|
|
|
|
- `src/app/_layout.tsx`: shared route layout. `Slot` renders the current screen;
|
|
`SafeAreaProvider` supplies information about safe areas on mobile devices.
|
|
- `src/app/index.tsx`: the screen at `/`. A React component describes the UI using JSX.
|
|
`useColorScheme` subscribes the component to the system theme; React updates the screen
|
|
when the theme changes.
|
|
- `src/__tests__/home-route.test.tsx`: verifies that the root route opens and displays an accessible heading.
|
|
- `tsconfig.json`: strict type checking; ESLint also prohibits explicit `any`.
|
|
|
|
The screen uses local React state; the root layout provides the initialized database through Context.
|
|
See [docs/IMPLEMENTATION_PLAN.md](docs/IMPLEMENTATION_PLAN.md) for planned milestones.
|
|
|
|
## Project status
|
|
|
|
The application shell runs, as confirmed by the project owner. Dependencies and
|
|
`package-lock.json` are present. The initial setup limitations recorded in the implementation
|
|
plan describe the environment on 2026-10-17, rather than the current setup.
|
|
Use the validation commands above to check your environment; device compatibility still
|
|
needs to be checked on each target platform.
|
|
|
|
The original `Subscriptions.xlsx` is preserved and excluded from future Git tracking through
|
|
`.gitignore`. Git is not initialized; no commits or pushes have been made.
|