Skip to content

Commit

Permalink
Merge pull request #133 from maany/webui-nextjs
Browse files Browse the repository at this point in the history
Major re-write of the entire project in NextJS with DDD and Clean architecture
  • Loading branch information
maany authored Mar 2, 2023
2 parents 0b6d6b1 + b319f22 commit a884a0a
Show file tree
Hide file tree
Showing 224 changed files with 37,246 additions and 35,479 deletions.
10 changes: 10 additions & 0 deletions .env.development.local.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ⚠️ The SECRET_COOKIE_PASSWORD should never be inside your repository directly
# For local development, you should store it inside a `.env.local` gitignored file
# See https://nextjs.org/docs/basic-features/environment-variables#loading-environment-variables
# You can generate a random 32 character string at https://1password.com/password-generator/

SESSION_PASSWORD=2gyZ3GDw3LHZQKDhPmPDL3sjREVRXPr8
RUCIO_AUTH_HOST=https://rucio-devmaany.cern.ch:443
RUCIO_HOST=https://rucio-devmaany.cern.ch:443
SESSION_COOKIE_NAME=rucio-webui-session
NODE_TLS_REJECT_UNAUTHORIZED=0
39 changes: 0 additions & 39 deletions .env.template

This file was deleted.

22 changes: 4 additions & 18 deletions .env.test
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
[oidc]
REACT_APP_oidc_provider_1 = name

[rucio_endpoint]
REACT_APP_RUCIO_HOST = https://localhost:8443

[login_page_org_images]
REACT_APP_login_page_image_primary = images/atlas.png
REACT_APP_login_page_image_secondary = images/atlas.png

[multi-vo]
REACT_APP_vos = atl,ops,dtm
REACT_APP_vo_dtm = Dteam
REACT_APP_vo_atl = ATLAS
REACT_APP_vo_ops = Operations

REACT_APP_oidc_provider_atl = name

SESSION_PASSWORD=2gyZ3GDw3LHZQKDhPmPDL3sjREVRXPr8
RUCIO_AUTH_HOST=https://rucio-auth-host.com
RUCIO_HOST=https://rucio-host.com
SESSION_COOKIE_NAME=rucio-webui-test-session
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
28 changes: 28 additions & 0 deletions .github/workflows/api-and-component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: API and Component Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: Test API and Component
strategy:
matrix:
node-version: [16.14.0, 18.5.0]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Run Component Tests
run: npm run test:component
- name: Run API Tests
run: npm run test:api

27 changes: 0 additions & 27 deletions .github/workflows/autotest.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
run: |
npm run build-storybook
- name: Build React App 🔧
- name: Build NextJS App 🔧
run: |
npm run build
25 changes: 16 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,29 @@
# testing
/coverage

# next.js
/.next/
/out/

# production
/build
/docs

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local

# vercel
.vercel

# common ide's
.vscode
.idea
# typescript
*.tsbuildinfo
next-env.d.ts
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
22 changes: 13 additions & 9 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
module.exports = {
"stories": [
"../src/**/*.stories.mdx",
stories: [
"../src/**/*.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)"
],
"addons": [
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/preset-create-react-app"
],
"framework": "@storybook/react",
"core": {
"builder": "@storybook/builder-webpack5"
}
}
framework: {
name: "@storybook/nextjs",
options: {}
},
resolve: {
fallback: {
util: require.resolve("util")
}
},
};
10 changes: 2 additions & 8 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,5 @@ export const parameters = {
date: /Date$/,
},
},
docs: {
source: {
type: 'auto',
format: true,
language: 'typescript'
},
},
}
}
import '../src/component-library/outputtailwind.css'
23 changes: 23 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"recommendations": [
// Linting / Formatting
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"usernamehw.errorlens",

// Testing
"orta.vscode-jest",

// PR management / Reviewing
"github.vscode-pull-request-github",

// Showing todo comments
"gruntfuggly.todo-tree",

// Collaborating
"ms-vsliveshare.vsliveshare",

// Debugging
"ms-vscode.vscode-js-profile-flame"
]
}
57 changes: 57 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Next.js: debug server-side",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev"
},
{
"name": "Next.js: debug client-side",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000"
},
{
"name": "Next.js: debug full stack",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev",
"serverReadyAction": {
"pattern": "started server on .+, url: (https?://.+)",
"uriFormat": "%s",
"action": "debugWithChrome"
}
},
{
"name": "Debug API Tests",
"type": "node",
"request": "launch",
"runtimeArgs": [
"--inspect-brk",
"${workspaceRoot}/node_modules/.bin/jest",
"--runInBand",
"--projects",
"${workspaceRoot}/test/api/jest.api.config.js",
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
},
{
"name": "Debug Component Tests",
"type": "node",
"request": "launch",
"runtimeArgs": [
"--inspect-brk",
"${workspaceRoot}/node_modules/.bin/jest",
"--runInBand",
"--projects",
"${workspaceRoot}/test/component/jest.component.config.js",
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
},
]
}

4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}
Loading

0 comments on commit a884a0a

Please sign in to comment.