Skip to content

Commit

Permalink
Merging changes with personal repo copy
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidOkulski committed Dec 19, 2024
1 parent 5b99673 commit 5c0435f
Show file tree
Hide file tree
Showing 60 changed files with 5,919 additions and 2,644 deletions.
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ POSTGRES_DB=form_templates
POSTGRES_PORT=5432
POSTGRES_HOST=db

SSO_URL=
SSO_REALM=
SSO_CLIENT_ID=
SSO_CLIENT_SECRET=
SSO_AUTH_SERVER_URL=https://dev.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect
SSO_AUTH_SERVER_URL=
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Template Repository
Template repository for the FormFoundry.

Template repository for the FormFoundry. Allows developers to upload JSON templates and preview them in [Kiln](https://github.com/bcgov/kiln)

## Setup Instructions

Requirements:

- [Docker](https://docs.docker.com/engine/install/)
- [Pathfinder SSO](https://digital.gov.bc.ca/bcgov-common-components/pathfinder-sso/)
- [Kiln](https://github.com/bcgov/kiln)
- [Insomnia](https://insomnia.rest/download) (Or use any REST API Client)

Clone the repository:
Expand All @@ -24,13 +27,13 @@ cd template-respository

## Configuration

Copy and rename `.env.example` file to `.env`
Copy and rename `.env.example` file to `.env` both in the root and in /app/client:

```
Copy-Item .env.example .env
```

Update `SSO_CLIENT_ID` and `SSO_CLIENT_SECRET` variables in `.env` file with your credentials.
Update variables in `.env` files with your credentials and congifurations.

## Docker Deployment

Expand All @@ -44,9 +47,20 @@ docker-compose build
docker-compose up
```
Server should be listening on `localhost:3000`

## User Interface

To log into Template Repository, you need to have a valid IDIR, create and assign the 'Developer' role to the IDIR in Pathfinder SSO.

Once logged in you can:
- Upload form templates
- View templates that have been uploaded in a tabular format
- Change the 'Deployment Status' of a template
- Preview a template in Kiln

## API Calls

Ensure your REST API client has `Client Credentials` authentication configured:
Ensure your REST API client has SSO authentication configured:

```
ACCESS TOKEN URL:
Expand All @@ -70,4 +84,4 @@ http://localhost:3000/api/forms/form_id/{form_id}
```
// GET request to list all form templates
http://localhost:3000/api/forms-list
```
```
4 changes: 4 additions & 0 deletions app/client/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
REACT_APP_ENV=dev
REACT_APP_SSO_URL=http://somelocalhost
REACT_APP_KILN_PREVIEW_URL=http://somelocalhost/preview
REACT_APP_KILN_URL=http://somelocalhost
3 changes: 1 addition & 2 deletions app/client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@

# testing
/coverage

# production
#/build
/build

# misc
.DS_Store
Expand Down
26 changes: 6 additions & 20 deletions app/client/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,13 @@
{
"files": {
"main.css": "/static/css/main.1fd3d798.css",
"main.js": "/static/js/main.fa1ce5bd.js",
"static/js/453.419a5d54.chunk.js": "/static/js/453.419a5d54.chunk.js",
"static/media/BCSans-Regular.woff": "/static/media/BCSans-Regular.f5dc3fe0266e943f919a.woff",
"static/media/BCSans-Light.woff": "/static/media/BCSans-Light.da391b9efe35162ec766.woff",
"static/media/BCSans-BoldItalic.woff": "/static/media/BCSans-BoldItalic.3e0ad839c21ed503a782.woff",
"static/media/BCSans-Bold.woff": "/static/media/BCSans-Bold.e8313acee8c46a6af21f.woff",
"static/media/BCSans-Italic.woff": "/static/media/BCSans-Italic.f48cfbe1f83de23efac6.woff",
"static/media/BCSans-LightItalic.woff": "/static/media/BCSans-LightItalic.d5e4ab46feef44fb9fcb.woff",
"static/media/BCSans-Regular.woff2": "/static/media/BCSans-Regular.907e1e3d9ed599095d49.woff2",
"static/media/BCSans-Light.woff2": "/static/media/BCSans-Light.9e36f96492585ee1795e.woff2",
"static/media/BCSans-BoldItalic.woff2": "/static/media/BCSans-BoldItalic.bc56fa27e856aec204df.woff2",
"static/media/BCSans-Bold.woff2": "/static/media/BCSans-Bold.8f6d33daf96396e5b815.woff2",
"static/media/BCSans-Italic.woff2": "/static/media/BCSans-Italic.035a3cc8cebbad26dd01.woff2",
"static/media/BCSans-LightItalic.woff2": "/static/media/BCSans-LightItalic.cc6b0797290d252bfd79.woff2",
"main.css": "/static/css/main.2dd93031.css",
"main.js": "/static/js/main.00d1c474.js",
"index.html": "/index.html",
"main.1fd3d798.css.map": "/static/css/main.1fd3d798.css.map",
"main.fa1ce5bd.js.map": "/static/js/main.fa1ce5bd.js.map",
"453.419a5d54.chunk.js.map": "/static/js/453.419a5d54.chunk.js.map"
"main.2dd93031.css.map": "/static/css/main.2dd93031.css.map",
"main.00d1c474.js.map": "/static/js/main.00d1c474.js.map"
},
"entrypoints": [
"static/css/main.1fd3d798.css",
"static/js/main.fa1ce5bd.js"
"static/css/main.2dd93031.css",
"static/js/main.00d1c474.js"
]
}
Binary file modified app/client/build/favicon.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion app/client/build/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>React App</title><script defer="defer" src="/static/js/main.fa1ce5bd.js"></script><link href="/static/css/main.1fd3d798.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Template Repository</title><script defer="defer" src="/static/js/main.00d1c474.js"></script><link href="/static/css/main.2dd93031.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
4 changes: 2 additions & 2 deletions app/client/build/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"short_name": "Template Repository",
"name": "Template Repository",
"icons": [
{
"src": "favicon.ico",
Expand Down
2 changes: 0 additions & 2 deletions app/client/build/static/css/main.1fd3d798.css

This file was deleted.

1 change: 0 additions & 1 deletion app/client/build/static/css/main.1fd3d798.css.map

This file was deleted.

2 changes: 0 additions & 2 deletions app/client/build/static/js/453.419a5d54.chunk.js

This file was deleted.

Loading

0 comments on commit 5c0435f

Please sign in to comment.