Skip to content

Commit

Permalink
Add 2nd frontend and container for eduxchange.eu
Browse files Browse the repository at this point in the history
  • Loading branch information
phavekes committed Feb 11, 2025
1 parent 3c6465f commit 9478f69
Show file tree
Hide file tree
Showing 150 changed files with 10,306 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:
name: brokerbuilds
path: |
client/dist/
client-eu/dist/
server/target/*.jar
retention-days: 1

Expand Down Expand Up @@ -111,6 +112,8 @@ jobs:
include:
- image: ghcr.io/SURFnet/student-mobility-broker/brokerclient
app: client
- image: ghcr.io/SURFnet/student-mobility-broker/brokerclienteu
app: client-eu
- image: ghcr.io/SURFnet/student-mobility-broker/brokerserver
app: server
steps:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Broker for educational cross-institution registrations.

### [System Requirements](#system-requirements)

- Java 8
- Java 21
- Maven 3
- Yarn 1.x
- NodeJS 14+
Expand Down
1 change: 1 addition & 0 deletions client-eu/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v23.2.0
17 changes: 17 additions & 0 deletions client-eu/assembly.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>student-mobility-broker-client-eu</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>dist</directory>
<outputDirectory>.</outputDirectory>
<includes>
<include>**/*.*</include>
</includes>
</fileSet>
</fileSets>
</assembly>
12 changes: 12 additions & 0 deletions client-eu/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{
debug: true,
"corejs": 3,
"useBuiltIns": "entry",
targets: ['last 2 versions', 'ie >= 11']
}],
]
};
7 changes: 7 additions & 0 deletions client-eu/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
rm -Rf dist/*
rm -Rf target/*
source $NVM_DIR/nvm.sh
nvm use
#export NODE_OPTIONS=--openssl-legacy-provider
yarn install --force && yarn test && yarn build
4 changes: 4 additions & 0 deletions client-eu/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM ghcr.io/openconext/openconext-basecontainers/apache2:latest
COPY ./dist/ /var/www/
RUN rm -rf /etc/apache2/sites-enabled/*.conf
COPY ./docker/appconf.conf /etc/apache2/sites-enabled/
60 changes: 60 additions & 0 deletions client-eu/docker/appconf.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
ServerName client
RewriteEngine On
RewriteCond %{REQUEST_URI} !\.(js|css)(\.map)?$
RewriteCond %{REQUEST_URI} !\.svg$
RewriteCond %{REQUEST_URI} !\.png$
RewriteCond %{REQUEST_URI} !\.ico$
RewriteCond %{REQUEST_URI} !\.woff$
RewriteCond %{REQUEST_URI} !\.woff2$
RewriteCond %{REQUEST_URI} !\.ttf$
RewriteCond %{REQUEST_URI} !\.wav$
RewriteCond %{REQUEST_URI} !\.eot$
RewriteCond %{REQUEST_URI} !^/(asset-)?manifest.json$
RewriteCond %{REQUEST_URI} !^/api/
RewriteCond %{REQUEST_URI} !^/login/
RewriteCond %{REQUEST_URI} !^/oauth2/
RewriteCond %{REQUEST_URI} !^/ui/
RewriteCond %{REQUEST_URI} !^/internal/
RewriteCond %{REQUEST_URI} !^/deprovision/
RewriteCond %{REQUEST_URI} !^/fonts/
RewriteRule (.*) /index.html [L]
ProxyPass /api http://brokerserver:8080/api retry=0
ProxyPassReverse /api http://brokerserver:8080/api
ProxyPassMatch ^/oauth2(.*)$ http://brokerserver:8080
ProxyPassReverse /oauth2 http://brokerserver:8080/oauth2
ProxyPassMatch ^/internal(.*)$ http://brokerserver:8080
ProxyPassReverse /internal http://brokerserver:8080/internal
ProxyPassMatch ^/login(.*)$ http://brokerserver:8080
ProxyPassReverse /login http://brokerserver:8080/login
ProxyPassMatch ^/ui(.*)$ http://brokerserver:8080
ProxyPassReverse /ui http://brokerserver:8080/ui
ProxyPass /deprovision http://brokerserver:8080/api
ProxyPassReverse /deprovision http://brokerserver:8080/api

DocumentRoot /var/www/

<Location "/api">
ProxyPreserveHost On
</Location>
<Location "/oauth2">
ProxyPreserveHost On
</Location>
<Location "/internal">
ProxyPreserveHost On
</Location>
<Location "/login">
ProxyPreserveHost On
</Location>
<Directory /var/www>
Require all granted
Options -Indexes
</Directory>

<FilesMatch "\.html$">
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Expires "Sun, 8 Jun 1986 08:06:00 GMT"
</FilesMatch>

Header always set X-Frame-Options "DENY"
Header always set Referrer-Policy "strict-origin-when-cross-origin"
Header always set X-Content-Type-Options "nosniff"
13 changes: 13 additions & 0 deletions client-eu/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<title>Student mobiliteit</title>
<meta name='viewport' content='width=device-width'>
<meta charset='utf-8'>
<link href="/styles.css" type="text/css" rel="stylesheet">
<link rel="shortcut icon" href="/src/favicon.ico">
</head>
<body>
<script type="module" src="/src/main.js"></script>
</body>
</html>
16 changes: 16 additions & 0 deletions client-eu/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export default {

preset: "ts-jest/presets/default-esm",
testEnvironment: 'node',
testMatch: ['<rootDir>/src/__tests__/**/*.js'],
testPathIgnorePatterns: ['/node_modules/'],
coverageDirectory: './coverage',
coveragePathIgnorePatterns: ['node_modules', 'src/database', 'src/test', 'src/types'],
reporters: ['default'],
transform: {
"node_modules/variables/.+\\.(j|t)sx?$": "ts-jest"
},
transformIgnorePatterns: [
"node_modules/(?!variables/.*)"
]
};
58 changes: 58 additions & 0 deletions client-eu/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"private": true,
"name": "inteken-app-client-eu",
"version": "0.0.1",
"license": "MIT",
"type": "module",
"devDependencies": {
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@sveltejs/vite-plugin-svelte": "^5.0.1",
"babel-jest": "^29.7.0",
"babel-loader": "^9.2.1",
"core-js": "^3.39.0",
"cross-env": "^7.0.3",
"css-loader": "^7.1.2",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.6.3",
"jest": "^29.7.0",
"mini-css-extract-plugin": "^2.9.2",
"postcss": "^8.4.49",
"regenerator-runtime": "^0.14.1",
"sass": "^1.81.1",
"serialize-javascript": "^6.0.2",
"serve": "^14.2.4",
"style-loader": "^4.0.0",
"svelte": "5.4.0",
"svelte-loader": "3.2.4",
"svelte-preprocess": "^6.0.3",
"svg-inline-loader": "^0.8.2",
"ts-jest": "^29.2.5",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"typescript": "^5.7.2",
"vite": "^6.0.2",
"vite-plugin-svelte-svg-loader": "^1.0.1",
"vite-plugin-svelte-svgr": "^1.0.4"
},
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "eslint .",
"preview": "vite preview",
"test": "NODE_OPTIONS=--experimental-vm-modules CI=true jest src"
},
"dependencies": {
"@lottiefiles/svelte-lottie-player": "^0.3.1",
"i18n-js": "^3.3.0",
"isomorphic-dompurify": "^2.18.0",
"isomorphic-fetch": "^3.0.0",
"js-cookie": "^3.0.5",
"pretty-print-json": "^3.0.3",
"svelte-routing": "^2.13.0",
"svelte-select": "^5.8.3"
},
"performance": {
"hints": true
}
}
49 changes: 49 additions & 0 deletions client-eu/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.surfnet</groupId>
<artifactId>student-mobility-broker</artifactId>
<version>0.3.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>student-mobility-broker-client-eu</artifactId>
<packaging>pom</packaging>
<name>student-mobility-broker-client-eu</name>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<executable>./build.sh</executable>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptor>assembly.xml</descriptor>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client-eu/public/favicon.ico
Binary file not shown.
Binary file added client-eu/public/fonts/Nunito/Nunito-Black.ttf
Binary file not shown.
Binary file added client-eu/public/fonts/Nunito/Nunito-Black.woff2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added client-eu/public/fonts/Nunito/Nunito-Bold.ttf
Binary file not shown.
Binary file added client-eu/public/fonts/Nunito/Nunito-Bold.woff2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added client-eu/public/fonts/Nunito/Nunito-Italic.ttf
Binary file not shown.
Binary file added client-eu/public/fonts/Nunito/Nunito-Italic.woff2
Binary file not shown.
Binary file added client-eu/public/fonts/Nunito/Nunito-Light.ttf
Binary file not shown.
Binary file added client-eu/public/fonts/Nunito/Nunito-Light.woff2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added client-eu/public/fonts/Nunito/Nunito-Medium.ttf
Binary file not shown.
Binary file added client-eu/public/fonts/Nunito/Nunito-Medium.woff2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added client-eu/public/fonts/Nunito/Nunito-Regular.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 9478f69

Please sign in to comment.