Skip to content

Commit

Permalink
setup client
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinOehlerkingCap committed Aug 1, 2024
1 parent 247c27e commit e241175
Show file tree
Hide file tree
Showing 156 changed files with 49,507 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.github
.vscode
deploy
node_modules
.travis.yml*
Dockerfile.*

**/*.unit.ts
**/*.unit.js

public/runtime.config.json
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.vscode
/node_modules/**
dist
/src/serverApi/**
101 changes: 101 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
module.exports = {
root: true,
env: {
node: true,
},
extends: [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/typescript/recommended",
"plugin:prettier/recommended",
],
parserOptions: {
ecmaVersion: 2020,
},
rules: {
"@typescript-eslint/no-explicit-any": "warn",
"no-console": process.env.NODE_ENV === "production" ? "off" : "warn",
"no-debugger": process.env.NODE_ENV === "production" ? "off" : "warn",
"no-useless-escape": "error",
"no-irregular-whitespace": "error",
"no-undef": "warn",
"no-prototype-builtins": "error",
"no-empty": "error",
"no-var": "error",
"prefer-const": "error",
"prettier/prettier": "error",
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/ban-types": "error",
"vue/no-v-text-v-html-on-component": "error",
"vue/no-v-html": "error",
"vue/html-self-closing": [
"error",
{
html: {
void: "always",
},
},
],
"vue/no-setup-props-reactivity-loss": "error",
"vue/no-useless-template-attributes": "error",
"vue/no-mutating-props": "error",
// TODO - make a final decision about this rule
"vue/multi-word-component-names": "off",
"@typescript-eslint/no-restricted-imports": [
"warn",
{
patterns: [
{
group: [
"@data/*/**/*",
"@feature/*/**/*",
"@page/*/**/*",
"@ui/*/**/*",
"@util/*/**/*",
],
message: "Do not deep import into a module",
},
{
group: ["@/modules/data/*", "*/../data/*", "../**/data/*"],
message:
"Data-Modules have to be imported using the pattern '@data/<name>'",
},
{
group: ["@/modules/feature/*", "*/../feature/*", "../**/feature/*"],
message:
"Feature-Modules have to be imported using the pattern '@feature/<name>'",
},
{
group: ["@/modules/page/*", "*/../page/*", "../**/page/*/*"],
message:
"Page-Modules have to be imported using the pattern '@page/<name>'",
},
{
group: ["@/modules/ui/*", "*/../ui/*", "../**/ui/*/*"],
message:
"Ui-Modules have to be imported using the pattern '@ui/<name>'",
},
{
group: ["@/modules/util/*", "*/../util/*", "../**/util/*/*"],
message:
"Util-Modules have to be imported using the pattern '@util/<name>'",
},
],
},
],
},
overrides: [
{
files: ["**/*.unit.{j,t}s?(x)"],
env: {
jest: true,
},
globals: {
mount: false,
shallowMount: false,
},
},
],
};
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Fix end-of-lines in Git versions older than 2.10
# https://github.com/git/git/blob/master/Documentation/RelNotes/2.10.0.txt#L248
* text=auto eol=lf
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm"
directory: "/" # Location of package manifests
open-pull-requests-limit: 5
versioning-strategy: "increase"
schedule:
interval: "weekly"

22 changes: 22 additions & 0 deletions .github/mergeable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 2
mergeable:
- when: pull_request.*
validate:
- do: label
must_exclude:
regex: "(WIP|is blocked|do-not-merge)"
- do: description
no_empty:
enabled: true
must_exclude:
regex: "\\[?\\s\\]"
message: "All checkboxes from PR description must be checked."
- when: schedule.repository
validate:
- do: stale
days: 20
type: pull_request
pass:
- do: comment
payload:
body: This is old. Is it still relevant?
81 changes: 81 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Short Description

<!-- Write a short explanation of what this Pull Request does -->

<!--
This Pull-Request template helps the reviewers as well as servers as a checklist for you. Please feel out all possible sections.
Quality guidelines:
- Code should be self-explanatory; Document code that is not self-explanatory
- Code respects SOLID principles, DRY, YAGNI, KISS
- Think about potential bugs this Pull Request might introduce
- Keep security in mind
- Write tests (Unit and Integration), including for error cases. Don't decrease coverage
- Business logic should be implemented in the API; never trust the client
- UI changes should be discussed & agreed with the UX-Team before staring
- Boyscout rule: leave the code in a better state than you found it. Remove unnecessary lines. Listen to the linter.
-->

## Links to Ticket and related Pull-Requests

<!--
Base links to copy
- https://ticketsystem.dbildungscloud.de/browse/BC-????
- https://github.com/hpi-schul-cloud/schulcloud-server/pull/????
- https://github.com/hpi-schul-cloud/end-to-end-tests/pull/????
- https://github.com/hpi-schul-cloud/schulcloud-client/pull/????
-->

## Changes

<!--
- What will the PR change?
- Why are the changes required?
- Links to documentation / tickets if exists, or provide more details here.
-->

## Data-security

<!--
Please note here about:
- any data model changes
- any changes about logging of user data
- any changes about permissions
- user input, authentication and other user data related things
If you are not sure if it is relevant, take a look at confluence or ask the data-security team.
-->

## Deployment

<!--
Keep in mind to changes to seed data, if changes are done by migration scripts.
Changes to the infrastructure have to discussed with the devops.
This information should be also in corresponding ticket, and collected in release deployment ticket.
This point should includes following information:
- What else is required for its deployment?
- Environment variables like FEATURE_XY=true
- Are there any migration scripts to be run?
-->

## New Repos, NPM packages or vendor scripts

<!--
- Keep in mind the stability, performance, activity and author.
- Describe why it is needed.
-->

## Screenshots of UI changes

<!--
- For UI changes, insert screenshots here.
- Has it been reviewed by a UX colleague?
-->

## Checklist before merging

- [ ] QA: In addition to review, the code has been manually tested (if manual testing is possible)
- [ ] PO: Any deviation from requirements was agreed with Product-Owner / ticket author / support-team
- [ ] DEV: Every new component is implemented having accessibility in mind (e.g. aria-label, role property)

> Notice: Please keep this Pull-Request as a Draft (or add WIP label), until it is ready to be reviewed
16 changes: 16 additions & 0 deletions .github/workflows/clean.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Clean Deployment

on: delete

jobs:
clean:
uses: hpi-schul-cloud/dof_app_deploy/.github/workflows/clean_workflow.yml@main
with:
branch: ${{ github.event.ref }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
DEV_KUBE_CONFIG_BRB: ${{ secrets.DEV_KUBE_CONFIG_BRB }}
DEV_KUBE_CONFIG_NBC: ${{ secrets.DEV_KUBE_CONFIG_NBC }}
DEV_KUBE_CONFIG_THR: ${{ secrets.DEV_KUBE_CONFIG_THR }}
DEV_KUBE_CONFIG_DBC: ${{ secrets.DEV_KUBE_CONFIG_DBC }}
72 changes: 72 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '40 21 * * 5'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript', 'typescript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Loading

0 comments on commit e241175

Please sign in to comment.