Prototype for RAG and palm oil fruit ripeness detection UI. Dedicated UI(temp)

Dr-Swopt a519da8d32 docs: update README with project architecture details and submodule management instructions 2 тижнів тому
.github f89afa4362 copilot - added copilot instructions for github copilot 8 місяців тому
.vscode 719e316e2a added launch config 9 місяців тому
build 583f03ad25 update build script 4 місяців тому
cert 25baae2517 update 3 тижнів тому
git 76149bb99f git added pullmaster script to pull from master branch 1 місяць тому
public 8066317a08 service worker update 1 рік тому
src cc3175be4c refactor 2 тижнів тому
.browserslistrc 6098fbb117 update browserlist config 4 місяців тому
.editorconfig ffe731c8ad added Angular content 2 роки тому
.gitignore 78ae764a9c dependency updates 2 роки тому
.gitmodules 81ca9d8656 update submodule branches to swopt-eLeave for angularlib and fis 6 місяців тому
.nvmrc 8b75dad51f update nvmrc file 2 місяців тому
CLAUDE.md cc3175be4c refactor 2 тижнів тому
README.md a519da8d32 docs: update README with project architecture details and submodule management instructions 2 тижнів тому
angular.json 25baae2517 update 3 тижнів тому
clean-project.ps1 84fd168b59 delete package-lock.json file 10 місяців тому
init-project.ps1 0477c18362 remove redundant npm install commands and clean up dp-ui dependency setup 7 місяців тому
ngsw-config.json 8066317a08 service worker update 1 рік тому
package.json 25baae2517 update 3 тижнів тому
tsconfig.app.json 7ad2305cc4 debug and enhancements 2 роки тому
tsconfig.json cc3175be4c refactor 2 тижнів тому
tsconfig.spec.json ffe731c8ad added Angular content 2 роки тому

README.md

FISApp UI

Angular 21 SPA — multi-tenant dashboard with a lazy-loaded PalmVision sub-app for MPOB-standard palm oil fruit bunch (FFB) ripeness detection.

Current Angular version: ^21.1.2
Required Node.js: ^20.19.0 || ^22.12.0 || ^24.0.0


Setup

1. Clone the repository (with submodules)

This project uses Git submodules for shared in-source dependencies (angularlib, dp-ui, fis). Clone recursively to pull them in one step:

git clone --recurse-submodules https://<your-remote>/fisapp-ui.git
cd fisapp-ui

Clone with submodules

git clone --recursive <your-repo-url>

If you already cloned without --recurse-submodules, initialise and fetch the submodules manually:

git submodule update --init --recursive

To pull the latest commits for all submodules after an upstream update:

git submodule update --remote --recursive

2. Install dependencies

npm install

Run npm run clean whenever a new library is added or if you hit Angular cache issues.

3. Start the dev server

npm start
# → http://localhost:4200

The frontend connects to the NestJS backend at https://localhost:3000. Start the backend first:

cd ../server-desktop && npm install && npm run start:dev

Submodules

Alias Path Branch
angularlib/* src/dependencies/angularlib swopt-eLeave
dp-ui/* src/dependencies/dp-ui master
fis/* src/dependencies/fis swopt-eLeave

fis-commons is CDN-hosted and requires no local checkout.


Common Commands

npm start                   # Dev server at 0.0.0.0:4200
npm run build               # Production build → dist/fisapp-ui
npm run build:dev           # Dev build → dist/dev
npm run build:prod          # Prod build → dist/rc
npm run build:leave:prod    # Leave-module variant
npm run build:quot:prod     # Quotation variant
npm run build:maf:quot:prod # MAF quotation variant
npm run test                # Karma + Jasmine unit tests
npm run clean               # Clear Angular + npm caches

Troubleshooting

[ERROR] TS-993004: Unable to import class CommonModule

A stale Angular build cache inside the angularlib submodule. Run:

npm run clean

Or delete the conflicting folder directly:

# Windows PowerShell
rm -r -force src/dependencies/angularlib/node_modules/@angular
# Linux / macOS
rm -rf src/dependencies/angularlib/node_modules/@angular

PalmVision Sub-App

Lazy-loaded at /src.palm.vision. Provides three inference engines:

Engine Mode key Description
Browser ONNX WASM local-onnx Runs YOLOv8 (best.onnx) via onnxruntime-web in a Web Worker
Browser TFLite WASM local-tflite Runs best_float16.tflite via TFLite Web API in a Web Worker
NestJS Remote remote Offloads inference to the server-desktop backend over WebSocket

Connection config: src/src.palm.vision/config/config.json

{ "connection": { "uacp": "https://localhost:3000", "uacp_ws": "wss://localhost:3000/socket.io", "uacpEmulation": "on" } }

Detection classes (MPOB standard): Ripe, Unripe, Underripe, Overripe, Abnormal, Empty_Bunch


Code Scaffolding

ng generate component component-name
ng generate directive|pipe|service|class|guard|interface|enum|module

Further Help