Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
michenriksen committed May 7, 2023
0 parents commit 2d2cbee
Show file tree
Hide file tree
Showing 411 changed files with 32,108 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/ISSUE_TEMPLATE/BugReport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
name: Bug
description: File a bug/issue
labels: [bug, triage]
assignees:
- michenriksen
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: false
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: false
- type: textarea
attributes:
label: Environment
description: |
examples:
- **OS**: macOS 13.3.1
- **Architecture**: arm
- **Gokiburi**: v0.1.x
- **Browser**: Google Chrome 113.0.xxxx.xx
value: |
- OS:
- Architecture:
- Gokiburi:
- Browser:
render: markdown
validations:
required: false
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give more context about the issue you are encountering!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
blank_issues_enabled: false
contact_links:
- name: 🛟 Help & Support
url: https://github.com/michenriksen/gokiburi/discussions/categories/q-a
about: Please ask and answer questions here.
- name: 💡 Feature Requests & Ideas
url: https://github.com/michenriksen/gokiburi/discussions/categories/ideas
about: Please add feature requests and ideas here.
- name: 🛡️ Vulnerability Disclosure
url: https://michenriksen.com/
about: Please e-mail me if you think you have found a vulnerability or other sensitive issue.
38 changes: 38 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
assignees:
- michenriksen
labels:
- deps
- gomod
- automerge
commit-message:
prefix: "chore(deps)"
- package-ecosystem: "npm"
directory: "/web/app"
schedule:
interval: "weekly"
assignees:
- michenriksen
labels:
- deps
- npm
- automerge
commit-message:
prefix: "chore(deps)"
- package-ecosystem: GitHub-actions
directory: "/"
schedule:
interval: "weekly"
assignees:
- michenriksen
labels:
- deps
- ghactions
commit-message:
prefix: "chore(ci)"
Binary file added .github/images/gokiburi_dark.png
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 .github/images/gokiburi_light.png
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 .github/images/social_preview.png
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 .github/images/web_ui_coverage.png
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 .github/images/web_ui_overview.png
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 .github/images/web_ui_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
148 changes: 148 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
---
name: Security Audit

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "10 13 * * 1"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
run:
runs-on: ubuntu-latest
outputs:
go_changes: ${{ steps.filter.outputs.go_changes }}
fe_changes: ${{ steps.filter.outputs.fe_changes }}
gh_actions_changes: ${{ steps.filter.outputs.gh_actions_changes }}
steps:
- uses: actions/checkout@v3

- name: Check modified files
uses: dorny/paths-filter@v2
id: filter
with:
filters: |
go_changes:
- '**.go'
- 'go.mod'
fe_changes:
- 'web/app/**.ts'
- 'web/app/**.js'
- 'web/app/**.cjs'
- 'web/app/**.json'
- 'web/app/**.svelte'
- 'web/app/package.json'
gha_changes:
- '.github/**.yml'
- name: Install Python
if: >-
${{ github.actor != 'dependabot[bot]' &&
!contains('["push", "pull_request"]', github.event_name) ||
needs.check_changes.outputs.go_changes == 'true' ||
needs.check_changes.outputs.fe_changes == 'true' ||
needs.check_changes.outputs.gha_changes == 'true' }}
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install Semgrep
if: >-
${{ github.actor != 'dependabot[bot]' &&
!contains('["push", "pull_request"]', github.event_name) ||
needs.check_changes.outputs.go_changes == 'true' ||
needs.check_changes.outputs.fe_changes == 'true' ||
needs.check_changes.outputs.gha_changes == 'true' }}
run: |
python -m pip install --upgrade pip
pip install semgrep
- name: Install Go
if: >-
${{ github.actor != 'dependabot[bot]' &&
!contains('["push", "pull_request"]', github.event_name) ||
needs.check_changes.outputs.go_changes == 'true' }}
uses: actions/setup-go@v4
with:
go-version: "stable"

- uses: actions/cache@v3
if: >-
${{ github.actor != 'dependabot[bot]' &&
!contains('["push", "pull_request"]', github.event_name) ||
needs.check_changes.outputs.go_changes == 'true' }}
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install govulncheck
if: >-
${{ github.actor != 'dependabot[bot]' &&
!contains('["push", "pull_request"]', github.event_name) ||
needs.check_changes.outputs.go_changes == 'true' }}
run: go install golang.org/x/vuln/cmd/govulncheck@latest

- name: Create Dummy Frontend Build
if: >-
${{ github.actor != 'dependabot[bot]' &&
!contains('["push", "pull_request"]', github.event_name) ||
needs.check_changes.outputs.go_changes == 'true' }}
run: mkdir web/app/build && touch web/app/build/dummy.txt

- name: Install Go Dependencies
if: >-
${{ github.actor != 'dependabot[bot]' &&
!contains('["push", "pull_request"]', github.event_name) ||
needs.check_changes.outputs.go_changes == 'true' }}
run: go mod tidy

- name: Audit Go Code
if: >-
${{ github.actor != 'dependabot[bot]' &&
!contains('["push", "pull_request"]', github.event_name) ||
needs.check_changes.outputs.go_changes == 'true' }}
run: make audit

- name: Install Node
if: >-
${{ github.actor != 'dependabot[bot]' &&
!contains('["push", "pull_request"]', github.event_name) ||
needs.check_changes.outputs.fe_changes == 'true' }}
uses: actions/setup-node@v3
with:
node-version: "latest"
cache: "npm"
cache-dependency-path: "web/app/package-lock.json"

- name: Install NPM dependencies
if: >-
${{ github.actor != 'dependabot[bot]' &&
!contains('["push", "pull_request"]', github.event_name) ||
needs.check_changes.outputs.fe_changes == 'true' }}
run: npm ci && git diff --exit-code
working-directory: web/app

- name: Audit Frontend Code
if: >-
${{ github.actor != 'dependabot[bot]' &&
!contains('["push", "pull_request"]', github.event_name) ||
needs.check_changes.outputs.fe_changes == 'true' }}
run: make audit-fe

- name: Audit GitHub Actions
if: >-
${{ github.actor != 'dependabot[bot]' &&
!contains('["push", "pull_request"]', github.event_name) ||
needs.check_changes.outputs.gha_changes == 'true' }}
run: make audit-gha
62 changes: 62 additions & 0 deletions .github/workflows/build-fe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
name: Build Frontend

permissions:
contents: read

on:
push:
branches: [main]
paths:
- "web/app/**.json"
- "web/app/**.cjs"
- "web/app/**.ts"
- "web/app/**.js"
- "web/app/**.svelte"
pull_request:
branches: [main]
paths:
- "web/app/**.json"
- "web/app/**.cjs"
- "web/app/**.ts"
- "web/app/**.js"
- "web/app/**.svelte"
schedule:
- cron: "0 10 * * 1"
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
run:
name: Build Frontend
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: true

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Node
uses: actions/setup-node@v3
with:
node-version: "latest"
cache: "npm"
cache-dependency-path: "web/app/package-lock.json"

- name: Install NPM dependencies
run: npm ci && git diff --exit-code
working-directory: web/app

- name: make lint-fe
run: make lint-fe

- name: make build-fe
run: make build-fe

- name: make test-fe
run: make test-fe
Loading

0 comments on commit 2d2cbee

Please sign in to comment.