Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
task(README): Final touches for the README files (#5025)
Browse files Browse the repository at this point in the history
* task(README): Final touches for the README files

* task(README): corrected build steps in README

* task(README): PR comment resolution

* task(README): Typo correction

* task(README): Removed line from README
  • Loading branch information
VWSCoronaDashboard30 authored Jun 7, 2024
1 parent 86d0061 commit e32c09e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The dashboard provides information on the outbreak and prevalence of COVID-19 in
The Netherlands. It combines measured and modelled data from various sources to
give a broad perspective on the subject.

This repository uses .json files in the form of the archive `protos.zip` as source for data visualisation. The `protos.zip` archive is ingested by the front-end application to display all the data on the Coronadashboard. The code for the back-end application can be found **[here](https://github.com/minvws/nl-covid19-data-backend-processing)**.

## Contact

` As of 02-04-2024, the Coronadashboard has been brought offline. This section is not applicable anymore.`
Expand Down Expand Up @@ -43,10 +45,17 @@ You can run these commands to quickly get started. We advise you to read what's

```
$ yarn
$ cp packages/app/.env.local.example packages/app/.env.local
$ yarn bootstrap
$ yarn dev
```

Alternatively, you can create a Docker container image by running the command in the root:

```
$ docker compose up
```

## Usage

In this project, we use Yarn instead of NPM, so the documentation assumes you
Expand Down
4 changes: 2 additions & 2 deletions packages/app/.env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ DISABLE_SITEMAP=true
ACTIVE_DATA_URL=
ARCHIVED_DATA_URL=

NEXT_PUBLIC_SANITY_DATASET=development
NEXT_PUBLIC_SANITY_DATASET=production
NEXT_PUBLIC_SANITY_PROJECT_ID=5mog5ask
NEXT_HOST_URL_STG=
SANITY_API_TOKEN=
Expand All @@ -17,4 +17,4 @@ SANITY_PREVIEW_SECRET=
# set content of version string
NEXT_PUBLIC_COMMIT_ID=n/a

NEXT_PUBLIC_PHASE=develop
NEXT_PUBLIC_PHASE=develop
20 changes: 9 additions & 11 deletions packages/app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ React application uses Next.js as its framework.
First run `yarn install` or simply `yarn` at the root of the repository if you
haven't already. This installs all the dependencies for all of the packages.

For developers only! Make sure you have an `.env.local` file in `packages/app` with correct environment variables. To
Make sure you have an `.env.local` file in `packages/app` with correct environment variables. To
get started, you can copy `.env.local.example`:

```sh
Expand Down Expand Up @@ -40,31 +40,29 @@ JSON data files represent a collection of archived and non-archived "protos" fil

### CMS Dataset

By default, the site builds using the development dataset. If you would like the
production content instead you can create a `.env.local` file in `packages/app`
By default, the site builds using the production dataset. If you would like the
development content instead you can create a `.env.local` file in `packages/app`
with the following content:

```sh
NEXT_PUBLIC_SANITY_DATASET=production
NEXT_PUBLIC_SANITY_DATASET=development
```

The "Lokalize" part of Sanity is exported and consumed by the app as JSON. You will
need to run this script regularly as an outdated JSON file will result in
compile or build-time errors.

`yarn cms:lokalize-import`

Alternatively you can run this from `packages/cms` as `yarn lokalize:import`
`yarn cms:lokalize-import:prd`

To learn more about the rationale behind Lokalize and how it works [read the documentation](/packages/cms/README.md#lokalize-texts).

### Locale

By default, the site builds the Dutch version. If you would like to build the English
version instead, update the following variable in your `packages/app/.env.local` file:
version instead, update the following variable in your `packages/app/next.config.js` file:

```sh
NEXT_PUBLIC_LOCALE=en
```
defaultLocale: 'en'
```

## Running a Production Build
Expand All @@ -78,7 +76,7 @@ NEXT_PUBLIC_COMMIT_ID=__commit_id_placeholder

The value doesn't actually matter, so it can be anything.

To build a production version you can run `yarn build`, and after that `yarn start` to
To build a production version you can run `yarn build:app`, and after that `yarn start` to
serve the built files.

## Available Scripts
Expand Down

0 comments on commit e32c09e

Please sign in to comment.