Skip to content

Commit

Permalink
Member's panel (#68)
Browse files Browse the repository at this point in the history
Add basic shell for member's panel app with keycloak SSO integration.
  • Loading branch information
turboMaCk authored and ICTGuerrilla committed Aug 10, 2023
1 parent cf2cdfb commit 9a27223
Show file tree
Hide file tree
Showing 16 changed files with 4,582 additions and 8 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/members-panel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Member's Panel"

on:
push:

jobs:
nix-build:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Install nix
uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixos-unstable

- name: Build via nix
working-directory: members-panel
run: nix-build test.nix
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@

This is what we use to run ICT Union.

Overall system is a collection of sub systems used to manage
Overall system is a collection of sub systems (components) used to manage
and run the system of the union organization.
We're following a naming scheme where every sub system of
overall system is named after species of [whales](https://en.wikipedia.org/wiki/Whale).

This helps us to have much finer grain control over permissions.
For instance [Gray Whale](gray-whale) -- out database migration manager --
expects super user level permissions to db
while [Orca](orca) -- our registration and members management service --
requires just permissions for reading and writing the data (no alterations of schema of db).

## Whales (sub-systems)
## Services

Every sub-system has its own documentation within README.md file!

| name | status | role |
|--------------------------|--------------------------------------------------------------------|-------------------------------------|
| [Gray Whale](gray-whale) | ![status](actions/workflows/gray-whale.yaml/badge.svg?branch=main) | Database migrations and management |
| [Orca](orca) | ![status](actions/workflows/orca.yaml/badge.svg?branch=main) | Registration and members management |
| name | status | role |
|----------------------------------|-----------------------------------------------------------------------|------------------------------------------|
| [Gray Whale](gray-whale) | ![status](actions/workflows/gray-whale.yaml/badge.svg?branch=main) | Database migrations and management |
| [Orca](orca) | ![status](actions/workflows/orca.yaml/badge.svg?branch=main) | Registration and members management |
| [Member's Panel](memebers-panel) | ![status](actions/workflows/members-panel.yaml/badge.svg?branch=main) | Entry dashboard for organization members |

## Goals

Expand Down
3 changes: 3 additions & 0 deletions members-panel/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
config.json
dist/
37 changes: 37 additions & 0 deletions members-panel/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Members Panel

**Work In Progress!**

Access entry dashboard for organization members

## Setup

First define configuration starting from example file:

```
cp config.example.json example.json
```

Configuration is compile-time. It's used to produce static file where all the configuration options
are inlined. This means that configuration file is used to configure buid
prior to invoking compiler.

Start development server:

```
npm start
```

Compile production assets:

```
npm run build
```

## Nix

Trigger test nix build:

```
nix-build test.nix
```
5 changes: 5 additions & 0 deletions members-panel/config.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"keycloak_url": "https://keycloak.ictunion.cz",
"keycloak_realm": "members",
"keycloak_client_id": "test-client"
}
26 changes: 26 additions & 0 deletions members-panel/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{ buildNpmPackage
, nodejs
, nix-gitignore
, config
}:
let
config-json = builtins.toJSON config;
in
buildNpmPackage {
name = "members-panel";
buildInputs = [
nodejs
];
src = nix-gitignore.gitignoreSource [] ./.;
npmDepsHash = "sha256-R8cADTzF2o5YbtXISE5YYRj0tTwV7j/Z2+jq7JCPq+M=";

configurePhase = ''
echo '${config-json}' > config.json
'';

installPhase = ''
mkdir -p $out/var/www
npm run build
cp dist/* $out/var/www
'';
}
Loading

0 comments on commit 9a27223

Please sign in to comment.