# Project plan — formulys-mobile-app (Pest Elite mobile)

Evidence date: 2026-10-14.

Source repository: `git@bitbucket.org:overdrive/formulys-mobile-app.git` (`https://bitbucket.org/overdrive/formulys-mobile-app.git`).

Inspected revision: `main` at `8fef7bc` (2024-01-30, Jason Wandrag, "Pesticides CRU and styling updates"). `origin/HEAD` points at `main`. No other remote branches were present. The scan-host path `~/projects/sonar_scan/repos/formulys-mobile-app` was not on this machine. The tree below was read from a clone of that git revision. The app was not installed or run.

This plan describes what the repository contains. It does not decide what the product should become.

## Product

Three names are in git, and they do not match.

| Place | Name |
|---|---|
| Bitbucket slug | `formulys-mobile-app` |
| `package.json` `name` | `formulys-mobile` (`version` `1.0.0`, `private: true`) |
| `app.json` `expo.name` and `expo.slug` | `pestelite-mobile` |
| Android `applicationId` and namespace | `com.siliconoverdrive.pestelite` |
| Android `app_name` | `pestelite-mobile` |
| Root stack title, home heading | `Pest Elite` |
| Home slogan | `Pest Control & Hygiene Service` |
| iOS `bundleIdentifier` | `com.yourcompany.yourappname` |
| `expo.scheme` | `acme` |

The screens a signed-in person can open are three Form.io registers: site inspections (`digimonkv1`), clients (`clientregister`), and pesticides (`pesticidesregister`). Lists are native. Create, view, and edit are Form.io FormView pages inside a WebView.

`README.md` is the stock Expo Router example. It does not mention Pest Elite, Formulys, users, or workflows.

**Inferred** from the slogan, the screen labels, and the overlap with Silicon Ark `pestelite_html`: this repository is a React Native shell for the Pest Elite site, client, and pesticide registers. No product brief in this repository states the customer, the success criteria, or why the repository is named Formulys.

**Unknown / Requires Confirmation:** product owner, whether a store listing or internal APK was ever distributed, and whether this app is meant to replace or sit beside `pestelite_html`.

## Branch reality

| Line | Tip | Date | What it is |
|---|---|---|---|
| `main` (only branch; `origin/HEAD`) | `8fef7bc` | 2024-01-30 | Expo app, Android project, EAS config |

No tags were present at inspection. Every commit is by Jason Wandrag (`jasonwandrag@hotmail.com`). History runs from `a0bc3ea` (2024-01-23, "first commit") to `8fef7bc` (2024-01-30). Nothing has been committed since.

**Discrepancy:** the onboarding scan listed `sonar-project.properties` and `sonarqube_scan.bat` at the repository root. Neither file is in `main`. Provenance: **Unknown** — they may have been untracked files on the scan host. The same scan listed a `%ProgramData%\Microsoft\Windows\UUS\State\_active.uusver` path. That path is a tracked file in this clone and is not application source.

## Objectives (from the implementation, not from a written plan)

No milestone document, roadmap, or issue list is in the repository. The behaviour that was built, in commit order:

- 2024-01-23 — first commit, navigation, a header menu button, and login/register that stores a JWT (`a0bc3ea`, `b10fb04`, `ffe491f`, `de93ec6`).
- 2024-01-24 — styling and AsyncStorage (`8c01a68`).
- 2024-01-25 — styles, storage, and routing (`d4d3cf9`).
- 2024-01-26 — APK build updates (`93cf32a`).
- 2024-01-29 — UI, functionality, and a tidy-up (`dfbeb51`, `b5e75b4`).
- 2024-01-30 — pesticide create/read/update and styling (`8fef7bc`). This is the tip of `main`.

There is no delete flow in the tip. The commit message says "CRU", which matches the code.

## Scope

### In this repository

- Expo Router screens under `app/` for home, login, sign-up, and the dashboard drawer (sites, clients, pesticides).
- Native list cards and FormView WebViews for create, detail, and edit.
- An Android project under `android/` (`applicationId` `com.siliconoverdrive.pestelite`, versionName `1.0.0`, versionCode `1`).
- EAS build profiles in `eas.json` and an EAS project id in `app.json`.
- A tracked `.env` with Form.io base URLs. The routed screens hardcode the same host and do not import `.env`.

### Not in this repository

- The Form.io project at `https://rzkiqpzlxxtfqjl.form.io`. Form definitions are not copied into git.
- An `ios/` directory. `package.json` still has an `ios` script (`expo run:ios`). The iOS bundle id is the Expo placeholder.
- Tests, a Bitbucket pipeline, Docker, Sonar configuration, and a product README.
- Store listing metadata, a production keystore, and any record of a published EAS build.
- `pestelite_html` and `formulys_simpleflow`. Those are separate repositories. They call the same Form.io host. See Relationships.

## System architecture

```text
Expo Router app (React Native 0.72, Expo SDK 49)
  app/_layout.js          token gate + stack header
  app/index.js            Pest Elite home
  app/login, app/sign-up  axios POST, AsyncStorage "token"
  app/dashboard/*         drawer + native FlatLists
  app/forms/[id].js       WebView create forms
        |
        |  lists: axios GET, header x-jwt-token
        v
https://rzkiqpzlxxtfqjl.form.io
  user/login/submission
  user/register/submission
  digimonkv1/submission
  clientregister/submission
  pesticidesregister/submission

WebViews (no JWT attached in this repo)
        |
        v
https://pro.formview.io/#/rzkiqpzlxxtfqjl/{form}/...
```

There is no local database, application server, queue, or background worker. `expo-updates` is a dependency, and the Android manifest sets `expo.modules.updates.ENABLED` to `false`.

## Major components

| Component | Role | Evidence |
|---|---|---|
| Root layout | If the route is not login or sign-up, read AsyncStorage `token`. Missing token replaces the route with `/login`. Header title "Pest Elite" and a Logout control | `app/_layout.js` |
| Home | Slogan and two buttons: Site Forms, Clients | `app/index.js` |
| Drawer | Site Inspections, Clients, Pesticides | `app/dashboard/_layout.js` |
| Site / client / pesticide lists | GET the matching `/submission` collection and render cards | `app/dashboard/*/index.js` |
| Detail and edit | WebView of FormView submission and `/edit` URLs | `app/dashboard/*/[id]/` |
| Create | `+` link to `/forms/{key}`, which maps to a FormView URL | `app/forms/[id].js` |
| Android shell | Launcher activity, permissions, Hermes, debug signing for release | `android/` |

`stores/userStore.js`, `stores/siteInspectionStore.js` (empty file), `hooks/useAxios.js`, `hooks/useFetch.js`, `lib/helpers.js` `formioAPI`, and the components under `components/` are not imported by any routed screen. Provenance: **Implemented** as files, **not on the navigation path**.

## Milestones

No milestone dates are written down. The only schedule in git is the eight-day commit span above. Current status: the repository has not changed since 2024-01-30.

Silicon Ark `pestelite_html` records later Form.io `modified` dates on the same paths (`digimonkv1` 2024-02-23, `pesticidesregister` 2024-04-15, `clientregister` 2024-07-12). Those dates were not re-fetched for this inspection. If they are still accurate, the live forms moved after this app's last commit. The WebViews would show the live form. The native cards still read the field names from January 2024. Whether those names still exist is **Unknown / Requires Confirmation**.

## Known dependencies

Runtime (from `package.json`): Expo `~49.0.15`, React Native `0.72.6`, React `18.2.0`, `expo-router` `^2.0.0`, `axios`, `zustand`, AsyncStorage `1.18.2`, `react-native-webview`, `@react-navigation/drawer`, `expo-updates` `~0.18.19`. Dev: `@babel/core`. Babel also lists `babel-preset-expo`, `expo-router/babel`, `react-native-reanimated/plugin`, and `module:react-native-dotenv`.

External:

- Form.io project `rzkiqpzlxxtfqjl` for login, register, and the three collections.
- FormView at `pro.formview.io` for create, detail, and edit.
- EAS project id `d2ffa4b5-2390-43bc-93f6-289744487883` in `app.json`. Whether Expo still has that project is **Unknown**.

## Relationships

| Repository | What is shared | What differs |
|---|---|---|
| `pestelite_html` | Same Form.io host. Paths `digimonkv1`, `clientregister`, `pesticidesregister`. Pest Elite labelling | HTML app logs in through `pestelitelogin`. This app logs in through `user/login`. HTML app also has `pesteliteusers`. This app has no user-admin screen. HTML app is Cordova; this app is Expo |
| `formulys_simpleflow` | Same Form.io host | SimFlow paths (`simflow*`), company/role model, SendGrid. No Pest Elite screens. This app does not call SimFlow paths |

Whether one Form.io project is supposed to serve Pest Elite and SimFlow is **Unknown / Requires Confirmation**. Whether a person who can log into `pestelite_html` can log into this app is **Unknown / Requires Confirmation**, because the login paths differ.

## Implementation plan

There is no forward plan in git. The built plan, as the commits left it, is: authenticate against Form.io's user resource, list three registers natively, and hand create/update/detail to FormView.

## Current project status

| Item | State |
|---|---|
| `main` | Stopped at `8fef7bc` on 2024-01-30 |
| Product README | Expo template only |
| iOS project | Not generated. Bundle id is a placeholder |
| Tests and CI | Absent |
| Sonar files named by the onboarding scan | Absent from git |
| Release signing | Release build type uses the debug signing config (`android/app/build.gradle`) |
| OTA updates | Manifest flag `ENABLED` is `false` |

## Human confirmation

- Is the product Pest Elite, Formulys, or both, and who owns it?
- Is this app still in use, and was an APK or store build shipped from the 2024-01-26 commit?
- Should login use `user/login` (this repo) or `pestelitelogin` (`pestelite_html`)?
- Do the native card fields still match the live Form.io forms?
- Should the iOS placeholder bundle id and the `acme` scheme be treated as unfinished template values?
- Were `sonar-project.properties` and `sonarqube_scan.bat` ever meant to be committed?
