Skip to content

Commit

Permalink
docs(client+cms): Improve the GitHub documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
clementprdhomme committed Dec 2, 2024
1 parent b4749e2 commit 1e45315
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 23 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ The platform is divided into 2 Node.js applications:
- a Content Management System (CMS) located in the `/cms` folder
- a client application located in the `/client` folder

More detailed documentation and instructions on how to run the applications are available in each of the folders.
More detailed documentation and instructions on how to run the applications are available in each of the folders.

## Architecture

![The front-end application accesses a Mapbox account, AWS S3 bucket and the CMS. The CMS relies on a PostgreSQL database. Everything but the Mapbox account are hosted on AWS. The general public can access the front-end application while administrators can access the CMS. Mapbox stores and serves the basemap, vector and some raster layers. AWS S3 stores and serves the pre-computed static and animated raster tiles. PostgreSQL stores data such as the locations, dataset metadata and layer confifiguration. It does not store any geospatial data.](./readme-architecture-diagram.png)
52 changes: 30 additions & 22 deletions client/README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,44 @@
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).
# South Sudan Pilot − Client application

## Getting Started
## Dependencies

First, run the development server:
- Node.js (see version in [.nvmrc](https://github.com/Vizzuality/south-sudan-pilot/blob/staging/client/.nvmrc))
- [Yarn 4](https://yarnpkg.com/) (see version in [package.json](https://github.com/Vizzuality/south-sudan-pilot/blob/staging/client/package.json))

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
## Install & run

### Native execution

Be sure to set the required environment variables before running the application - see the Environment variables section below for more details.

To install the dependencies, use:

```
yarn
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
To run the application in development mode, use:

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

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
To run the application in production mode, use:

## Learn More
```
yarn build
yarn start
```

To learn more about Next.js, take a look at the following resources:
### Docker

- [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.
This project includes 2 docker configuration files:

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
- [Dockerfile](https://github.com/Vizzuality/south-sudan-pilot/blob/staging/client/Dockerfile) aimed at development environments (may require tuning to work on different environments)
- [Dockerfile.prod](https://github.com/Vizzuality/south-sudan-pilot/blob/staging/client/Dockerfile.prod) aimed at production environments

## Deploy on Vercel
You can use either file to build a Docker image for this application. Be sure to set the required environment variables when running the container.

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.
## Environment variables

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
See [src/env.ts](https://github.com/Vizzuality/south-sudan-pilot/blob/staging/client/src/env.ts).
Binary file added readme-architecture-diagram.png
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 1e45315

Please sign in to comment.