Skip to content

Commit

Permalink
Add some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vimto committed Nov 30, 2023
1 parent b4f453c commit 147f642
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 22 deletions.
4 changes: 4 additions & 0 deletions packages/IngestAPI/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# EOP IngestAPI

The EOP IngestAPI accepts envrionmental data from various councils and posts it onto Kafka topics for subsequent processing by other EOP services. It exposes API endpoints authenticated using HTTP Basic Authentication. These accept JSON data, which is passed onto a Kafka consumer.

It's made up of a simple Spring Boot application written in Kotlin, and packaged up for deployment to ECS as a Docker container.

## Getting Started

### Prerequisites
Expand Down
1 change: 0 additions & 1 deletion packages/PlanLimitsUI/.env.local.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

# Get the latest 90 key from https://basemaps.linz.govt.nz/
VITE_LINZ_API_KEY=<TODO>
47 changes: 47 additions & 0 deletions packages/PlanLimitsUI/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Natural Resources Plan - Water Allocations Viewer

The Water Allocations Viewer is a web app allowing water allocation and usage relating to the Natural Resources Plan areas to be viewed.

It's built using React and React-Router and bundled using Vite.

The app displays a map using react-map-gl showing a base layer from LINZ. It water allocation and usage data the [EOP Manager API](../Manager/) via React-Query.

It makes use of [Nivo](https://nivo.rocks) for more advanved visualisation of the data.

![Screenshot the App](./plan-limits-ui-screenshot.png)

## Getting Started

### Prerequisites

* Node
* The [EOP Manager API](../Manager/) and supporting services

### Setup
- Run `npm install`
- Copy `.env.local.template` to `.env.local`, and populate with a valid [LINZ Basemap Api Key](https://basemaps.linz.govt.nz).

### Running
```bash
npm run dev
```

### Running tests
```bash
npm run test
```

### Code Linting and Formatting
```bash
npm run check
```

Code is formatted using [Prettier](https://github.com/diffplug/spotless)

### Deployment
Deployment is to AWS Amplify which is connected to certain git branches.

- Pushing to the branch `deploy/plan-limits-ui/dev` will deploy to the development envrionment, [https://plan-limits.gw-eop-dev.tech](https://plan-limits.gw-eop-dev.tech).
- Pushing to the branch `deploy/plan-limits-ui/stage` will deploy to the staging envrionment, [https://plan-limits.gw-eop-stage.tech](https://plan-limits.gw-eop-stage.tech).
- Pushing to the branch `deploy/plan-limits-ui/prod` will deploy to the staging envrionment, [https://plan-limits.eop.gw.govt.nz](https://plan-limits.eop.gw.govt.nz).
- Pushing to a branch prefixed with `deploy/plan-limits-ui/review/` will create a new Amplify review envrionment linked to the dev Manager API, which is accessible from a URL with the format `https://deploy-plan-limits-ui-branch-suffix.d2qauh5z55065f.amplifyapp.com/limits/gw/usage`
2 changes: 2 additions & 0 deletions packages/RainfallViewer/.env.local.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Get the latest 90 key from https://basemaps.linz.govt.nz/
NEXT_PUBLIC_LINZ_API_KEY=
44 changes: 23 additions & 21 deletions packages/RainfallViewer/README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
# EOP Rainfall Viewer Prototype (AKA InterRain)

## Getting Started
InterRain is a prototype developed to illustratate the value in aggregating rainfall observations across council boundaries and presenting it in a user-friendly map-based UI.

It's built using [Next.js](https://nextjs.org/) and bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

First, run the development server:
The app displays a map using react-map-gl showing a base layer from LINZ. It fetches rainfall observation data from the [EOP Manager API](../Manager/) via SWR, and renders this using icons. It also allows the user to navigate to different areas and time periods, customise the display, and share the current view via the URL.

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
```
![Screenshot the InterRain](./rainfall-viewer-screenshot.png)

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
Local development depends on the EOP Manager and supporting services. The rest of this doc is the readme generated by create-next-app.

## Getting Started

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
### Prerequisites

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
* Node
* The [EOP Manager API](../Manager/) and supporting services

## Learn More
### Setup
- Run `npm install`
- Copy `.env.local.template` to `.env.local`, and populate with a valid [LINZ Basemap Api Key](https://basemaps.linz.govt.nz).

To learn more about Next.js, take a look at the following resources:
### Running locally
- Run `npm run dev`

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
### Code Linting and Formatting
- Run `npm run lint`

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
### Deployment
Deployment is to AWS Amplify which is connected to certain git branches.

## Deploy on Vercel
Pushing to the branch `deploy/interrain-ui/dev` will deploy to the development envrionment, [https://interrain.gw-eop-dev.tech](https://interrain.gw-eop-dev.tech).

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Pushing to the branch `deploy/interrain-ui/stage` will deploy to the staging envrionment, [https://interrain.gw-eop-stage.tech](https://interrain.gw-eop-stage.tech).

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 147f642

Please sign in to comment.