Skip to content

Commit

Permalink
Merge pull request #564 from dreammall-earth/admin-boilerplate
Browse files Browse the repository at this point in the history
feat(other): initialize admin from boilerplate
  • Loading branch information
ulfgebhardt authored Apr 18, 2024
2 parents d31c0b7 + cfd3932 commit 3af7e63
Show file tree
Hide file tree
Showing 114 changed files with 32,090 additions and 79 deletions.
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,26 @@ updates:
timezone: "Europe/Berlin"
time: "03:00"

# admin
- package-ecosystem: npm
open-pull-requests-limit: 999
directory: "/admin"
rebase-strategy: "disabled"
schedule:
interval: weekly
day: "saturday"
timezone: "Europe/Berlin"
time: "03:00"
- package-ecosystem: docker
open-pull-requests-limit: 999
directory: "/admin"
rebase-strategy: "disabled"
schedule:
interval: weekly
day: "saturday"
timezone: "Europe/Berlin"
time: "03:00"

# frontend
- package-ecosystem: npm
open-pull-requests-limit: 999
Expand Down
21 changes: 21 additions & 0 deletions .github/file-filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,27 @@ frontend-test-build-docs: &frontend-test-build-docs
frontend-test-build-storybook: &frontend-test-build-storybook
- 'frontend/**/*'

# admin
admin-test-lint-code: &admin-test-lint-code
- 'admin/**/*'

admin-test-unit-code: &admin-test-unit-code
- 'admin/**/*'

admin-test-build-code: &admin-test-build-code
- 'admin/**/*'

admin-test-build-docker: &admin-test-build-docker
- 'admin/**/*'

admin-test-build-docs: &admin-test-build-docs
- 'admin/**/*.md'
- 'admin/.vuepress/*'

admin-test-build-storybook: &admin-test-build-storybook
- 'admin/**/*'


# backend
backend-test-lint-code: &backend-test-lint-code
- 'backend/**/*'
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/admin.deploy.chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "admin:deploy:chromatic"
on:
push:
branches:
- master
jobs:
build-and-deploy:
name: Chromatic - Admin
runs-on: ubuntu-latest
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN_ADMIN }}
WORKING_DIRECTORY: ./admin
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Admin | Build
run: npm install && npm run chromatic -- --exit-zero-on-changes
working-directory: ${{env.WORKING_DIRECTORY}}
37 changes: 37 additions & 0 deletions .github/workflows/admin.test.build.code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "admin:test:build test code"

on: push

jobs:
# only (but most important) job from this workflow required for pull requests
# check results serve as run conditions for all other jobs here
files-changed:
name: Detect File Changes - admin-test-build-code
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.admin-test-build-code }}
steps:
- uses: actions/checkout@v4

- name: Check for admin file changes
uses: dorny/[email protected]
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell

build:
if: needs.files-changed.outputs.changes == 'true'
name: Build - Admin
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./admin
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Admin | Build
run: npm install && npm run build
working-directory: ${{env.WORKING_DIRECTORY}}
51 changes: 51 additions & 0 deletions .github/workflows/admin.test.build.docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "admin:test:build test docker"

on: push

jobs:
# only (but most important) job from this workflow required for pull requests
# check results serve as run conditions for all other jobs here
files-changed:
name: Detect File Changes - admin-test-build-docker
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.admin-test-build-docker }}
steps:
- uses: actions/checkout@v4

- name: Check for admin file changes
uses: dorny/[email protected]
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell

build-production:
if: needs.files-changed.outputs.changes == 'true'
name: Build Docker Production - Admin
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./admin
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Admin | Build Docker Production
run: docker compose -f docker-compose.yml build

build-development:
if: needs.files-changed.outputs.changes == 'true'
name: Build Docker Development - Admin
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./admin
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Admin | Build Docker Development
run: docker compose build
working-directory: ${{env.WORKING_DIRECTORY}}
37 changes: 37 additions & 0 deletions .github/workflows/admin.test.build.docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "admin:test:build test docs"

on: push

jobs:
# only (but most important) job from this workflow required for pull requests
# check results serve as run conditions for all other jobs here
files-changed:
name: Detect File Changes - admin-test-build-docs
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.admin-test-build-docs }}
steps:
- uses: actions/checkout@v4

- name: Check for admin file changes
uses: dorny/[email protected]
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell

build:
if: needs.files-changed.outputs.changes == 'true'
name: Build Docs - Admin
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./admin
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Admin | Build Docs
run: npm install && npm run docs:build
working-directory: ${{env.WORKING_DIRECTORY}}
37 changes: 37 additions & 0 deletions .github/workflows/admin.test.build.storybook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "admin:test:build test storybook"

on: push

jobs:
# only (but most important) job from this workflow required for pull requests
# check results serve as run conditions for all other jobs here
files-changed:
name: Detect File Changes - admin-test-build-storybook
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.admin-test-build-storybook }}
steps:
- uses: actions/checkout@v4

- name: Check for admin file changes
uses: dorny/[email protected]
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell

storybook:
if: needs.files-changed.outputs.changes == 'true'
name: Build Storybook - Admin
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./admin
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Admin | Build Storybook
run: npm install && npm run storybook:build
working-directory: ${{env.WORKING_DIRECTORY}}
37 changes: 37 additions & 0 deletions .github/workflows/admin.test.lint.code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "admin:test:lint code with defined linters"

on: push

jobs:
# only (but most important) job from this workflow required for pull requests
# check results serve as run conditions for all other jobs here
files-changed:
name: Detect File Changes - admin-test-lint-code
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.admin-test-lint-code }}
steps:
- uses: actions/checkout@v4

- name: Check for admin file changes
uses: dorny/[email protected]
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell

lint:
if: needs.files-changed.outputs.changes == 'true'
name: Lint - Admin
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./admin
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Admin | Lint
run: npm install && npm run test:lint
working-directory: ${{env.WORKING_DIRECTORY}}
37 changes: 37 additions & 0 deletions .github/workflows/admin.test.unit.code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "admin:test:unit test code with defined suites"

on: push

jobs:
# only (but most important) job from this workflow required for pull requests
# check results serve as run conditions for all other jobs here
files-changed:
name: Detect File Changes - admin-test-unit-code
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.admin-test-unit-code }}
steps:
- uses: actions/checkout@v4

- name: Check for admin file changes
uses: dorny/[email protected]
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell

unit:
if: needs.files-changed.outputs.changes == 'true'
name: Unit - Admin
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./admin
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Admin | Unit
run: npm install && npm run test:unit
working-directory: ${{env.WORKING_DIRECTORY}}
1 change: 1 addition & 0 deletions .github/workflows/test.lint.pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
backend
presenter
frontend
admin
authentik
docu
docker
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@ The following endpoints are provided if `docker compose` is used:
| [http://localhost:3001](http://localhost:3001) | Frontend |
| [http://localhost:8082](http://localhost:8082) | Frontend Documentation |
| [http://localhost:6007](http://localhost:6007) | Frontend Storybook |
| [http://localhost:3002](http://localhost:3002) | Admin |
| [http://localhost:8083](http://localhost:8083) | Admin Documentation |
| [http://localhost:6008](http://localhost:6008) | Admin Storybook |
| [http://localhost:4000/graphql](http://localhost:4000/graphql) | Backend GraphQL API |
| [http://localhost:4000/playground](http://localhost:4000/playground) | Backend GraphQL Playground |
| [http://localhost:8083](http://localhost:8083) | Backend Documentation |
| [http://localhost:8084](http://localhost:8084) | Backend Documentation |
| [http://localhost:8080](http://localhost:8080) | Documentation |

## How to release
Expand Down
5 changes: 5 additions & 0 deletions admin/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
build/
coverage/
.vuepress/.temp/
.vuepress/.cache/
5 changes: 5 additions & 0 deletions admin/.env.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# META
PUBLIC_ENV__META__BASE_URL="http://localhost:3000"
PUBLIC_ENV__META__DEFAULT_AUTHOR="IT Team 4 Change"
PUBLIC_ENV__META__DEFAULT_DESCRIPTION="IT4C Frontend Boilerplate"
PUBLIC_ENV__META__DEFAULT_TITLE="IT4C"
5 changes: 5 additions & 0 deletions admin/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
build/
coverage/
.storybook/
.vuepress/
Loading

0 comments on commit 3af7e63

Please sign in to comment.