Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

367 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TOP app (Toezicht op pad) v2

De TOP app verzorgt de informatievoorziening voor toezichthouders op pad. Door middel van een variabele configuratie kunnen zij een looplijst van adressen samenstellen.

Install

Clone this repository and install its dependencies:

git clone https://github.com/Amsterdam/top-frontend-v2.git
cd top-frontend-v2
npm install

Running

Using the acceptance backend is easiest:

npm start

PWA

The app now exposes a web app manifest and service worker so it can be installed as a PWA.

  • Installed launches open directly on /lijst-instellingen, the first step.
  • Offline support depends on having opened the app online at least once so the shell and cached API responses are available.

Caching strategy

  • App shell / static assets: precached at build time by Workbox.
  • Runtime config (/config/env.js): NetworkFirst, so the app prefers the latest environment config but can still boot from a cached copy offline.
  • All API GET requests: NetworkFirst.
    • This applies to requests under /api/v1/ on any host, including the main backend and the separate puntenteller backend.
    • PDOK search requests are also NetworkFirst.
    • If the network is unavailable, the last successful cached GET response is used when available.
  • Mutating API requests (POST, PUT, PATCH, DELETE): always network only. They are not cached by the service worker.
  • Retention: runtime API caches are kept for up to 24 hours.

Deploying

The main branch is automatically deployed to acceptance.

Tag any branch, but preferably main, with a tag like v1.0.0 to deploy that specific commit to production.

Update generated API Scheme

Generate typings in __generated__ directory.

npm run generate:api-schema:acc

Directory tree structure

tree -I "node_modules|.next|.git" -L 10 > directory-tree.txt

Install local ee-ads-rhf package

  1. Go to the ee-ads-rhf repo.
  2. Run npm run build
  3. Copy paste the .tgz file to this repo.
  4. Install:
npm install ./amsterdam-ee-ads-rhf-lib-0.0.0.tgz

About

Toezicht op pad

Resources

Code of conduct

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages