From 8643f7eae5b515e0cc7da9f42864d8a68dd0329d Mon Sep 17 00:00:00 2001
From: Mark <mark@openappstack.net>
Date: Wed, 4 Dec 2019 14:43:43 +0100
Subject: [PATCH] Make README more explicit

---
 frontend/README.md | 42 ++++++++++++++++++++++++++++++++----------
 1 file changed, 32 insertions(+), 10 deletions(-)

diff --git a/frontend/README.md b/frontend/README.md
index 6923ecd..9522ead 100644
--- a/frontend/README.md
+++ b/frontend/README.md
@@ -1,8 +1,38 @@
-### Installation
+### Prerequisites
+
+In order to run this application, npm (>= 6.9.0) needs to be installed. As the application
+will authenticate it's users using OpenID Connect, an OpenID Connect Provider and an OpenID Client
+needs to be set up.
+This application was developed to be used with [an OpenID Connect single sign on system](https://open.greenhost.net/openappstack/single-sign-on).
 
-After installing `npm` run
+### Configuration
 
+Configuration has to be specified in `nuxt.config.js`. Setting the OpenID Connect parameters
+correctly is essential for the login process to work. Note that there are also environment
+variables that can be set instead of changing the defaults in `nuxt.config.js`.
+In case you want to configure the application by using those variables you have to set and export them like this:
+```
+export HOST=sso.example.net
+export BACKEND_API_URL=http://oas.localhost:5002/graphql
+export BASE_URL=http://sso.example.net:3000
+export HYDRA_BASE_URL=http://oas.example.net:4444
+export AUTHORIZE_URL=http://oas.example.net:4444/oauth2/auth
+export USERINFO_URL=http://oas.example.net:4444/userinfo
+export ACCESS_TOKEN=http://oas.example.net:4444/oauth2/token
+export REDIRECT_URL=http://sso.example.net:3000/callback
+export OAUTH_CLIENT_ID=user-panel
+export OAUTH_CLIENT_SECRET=secret_secret
 ```
+
+Instead of using your own OpenID Provider, you can also use external providers. For details on how
+to configure authentication for external providers like GitHub, please refer to [the nuxt-oauth documentation](https://auth.nuxtjs.org/schemes/oauth2.html)
+
+### Installation
+
+Installation is done with `npm`. Execute the following commands after changing to the user-panel/frontend
+directory.
+```
+cd user-panel/frontend
 npm install --production
 ```
 
@@ -25,14 +55,6 @@ or
 npm build-start
 ```
 
-### Configuration
-
-Configuration has to be specified in `nuxt.config.js`. Setting the OpenID Connect paramaters
-correctly is essential for the login process to work.
-
-For details on how to configure authentication for external providers like GitHub or Facebook
-please refer to [the nuxt-oauth documentation](https://auth.nuxtjs.org/schemes/oauth2.html)
-
 
 ### Usage
 
-- 
GitLab