Skip to content

Commit

Permalink
Remix (#1070)
Browse files Browse the repository at this point in the history
* Remove admin

* Rename old frontend

* Remix first commit

* Intro page

* Playing page

* Update packages

* VolumeFab component

* Spinner component

* Switch from yarn to npm

* useClock hook

* Enable StrictMode

* Update packages

* Move supports-webp check into the App function

* Use latest TypeScript in the workspace

* Stop waiting for image to load

This was causing problems with live reload.

* Remove streaming from server entry point

* Update packages

* Add show info route

* Parse sets data

* Adjust for client time skew

* Update packages

* Sort sets by date

* Calculate target time info

* Add AudioController

* Update packages

* Hook up volume control

* Use attribute value instead of dataset

* Hook up show info to now playing

* Remove DELAYING_FOR_INITIAL_SYNC status

* Update packages

* Add AudioCanvas

* Add usehooks-ts package

* Add toasts

* Remove old frontend

* Switch to pnpm

* Add Prisma

* Update packages

* Add basic admin page

* Update packages

* Routes!

* Add new show form

* Use id as slug

* Add view and edit forms

* Update packages

* Switch to zod for form validation

* Deduplicate show forms

* Add description to form

* Don't hard-code URL

* Add submit button

* Update packages

* Upload files

* Load sets on show page

* Update packages

* Add ping command to test spawn behavior

* Update packages

* Add eslint-plugin-unicorn

* Add server-sent events backend and test route

* Add server-sent-events hook

* Replace Axios with XMLHTTPRequest

No need to use a full library for one upload request

* Refactor uploading sets into a component

* Add files to schema

* Show all information about sets

* Only accept audio files

* Show upload progress on frontend

* Add FFmpeg commands

* Add custom types to event emitter

* Improve types with Prisma

* Upload and convert audio files

* Update packages

* Update packages

* Update Stylelint to v15

* Update to pnpm v8

* Update Prisma to v4.14.0

* Update zod and remix-validated-form

* Update ESLint

* Update Prettier to v2.8.8

* Update Stylelint to v15.6.1

* Update most packages

* Use TypeScript 4.9 `satisfies`

* Use TypeScript 4.9 `satisfies` for LoaderFunction

* Fix typo

* Disable submit button if form is invalid

* findUnique

* redo forms 1 - remove UploadSets from frontend

* redo forms 2 - remove SSE from frontend

* redo forms 3 - change Prisma schema and fix code

* redo forms 4 - add editing sets to show edit

* Replace some SSE code with remix-utils

* Rename NewFile to FileUpload

* SetFileUpload

* Upload converted files to Azure

* Delete show button

* Upgrade Remix

* Use datetime-local input for show start date

* Use useRevalidator instead of a separate show info route

* Load styles per show

* add colors

* Remove supports-webp

Safari has supported WebP for 2 years, time to always use it

* s/file/audioFile/g

* Add image files

* Load styles from db

* Show images when viewing show

* use v2_meta

* Load show from database!!!

* Update packages

* Add Doppler for secrets management

* Add authn with Clerk

* Disable Renovate automerge

* Fix checks
  • Loading branch information
stephenwade authored Jul 3, 2023
1 parent bb10126 commit 6d579a7
Show file tree
Hide file tree
Showing 252 changed files with 13,417 additions and 20,546 deletions.
8 changes: 0 additions & 8 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,3 @@ insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.json]
indent_size = 2

[*.{html,js,md}]
block_comment_start = /**
block_comment = *
block_comment_end = */
17 changes: 5 additions & 12 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# Frontend
FESTIVAL_SITE_DEPLOY_SERVER=example.com
FESTIVAL_SITE_DEPLOY_LOCATION=/var/www/festival/
FESTIVAL_AZURE_STORAGE_ACCOUNT=my-azure-storage-account
FESTIVAL_AZURE_STORAGE_KEY=my-azure-storage-account-access-key

# Admin
FESTIVAL_ADMIN_DEPLOY_SERVER=example.com
FESTIVAL_ADMIN_DEPLOY_LOCATION=/var/www/festival-admin/
FESTIVAL_ADMIN_EMAIL=[email protected]
FESTIVAL_MAGIC_PUBLISHABLE_KEY=pk_live_KEY
FESTIVAL_MAGIC_SECRET_KEY=sk_live_KEY
NODE_ENV=development
DATABASE_URL=mysql://USER:PASSWORD@HOST:PORT/DATABASE
AZURE_STORAGE_ACCOUNT=my-azure-storage-account
AZURE_STORAGE_KEY=my-azure-storage-account-access-key
AZURE_STORAGE_WEBSITE_DOMAIN=my-azure-storage-account.z13.web.core.windows.net
45 changes: 0 additions & 45 deletions .eslintrc.cjs

This file was deleted.

48 changes: 48 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},

extends: [
'@remix-run/eslint-config',
'@remix-run/eslint-config/node',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:unicorn/recommended',
'prettier',
],

plugins: [
'import',
'jsx-a11y',
'no-only-tests',
'simple-import-sort',
'unused-imports',
],

rules: {
'object-shorthand': 'warn',
quotes: ['warn', 'single', { avoidEscape: true }],
'require-unicode-regexp': 'warn',

'import/first': 'warn',
'import/newline-after-import': 'warn',
'import/no-duplicates': 'warn',

'simple-import-sort/imports': 'warn',
'simple-import-sort/exports': 'warn',

'@typescript-eslint/no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'warn',
'unused-imports/no-unused-vars': 'warn',

'unicorn/filename-case': 'off',
'unicorn/no-null': 'off',
'unicorn/no-useless-undefined': 'off',
'unicorn/prefer-module': 'off',
'unicorn/prefer-switch': 'off',
'unicorn/prevent-abbreviations': 'off',
'unicorn/switch-case-braces': 'off',
},
};
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

3 changes: 1 addition & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ jobs:
runs-on: ubuntu-latest

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

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
48 changes: 12 additions & 36 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,41 +13,17 @@ jobs:
runs-on: ubuntu-latest

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

- name: Setup Node.js 16.x
uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
node-version: 16.x
cache: yarn

- run: yarn --immutable

- run: yarn lint

- run: yarn imagemin
working-directory: frontend

- name: Check working directory
run: |
status() {
git status --porcelain | \
# ignore modified images
# imagemin can produce different files on different computers
grep --invert-match ' M frontend/images/'
}
if [[ -z "$(status)" ]]; then
echo "Git repo is clean."
else
echo "Git repo is dirty."
status
if status | grep -q images; then
# shellcheck disable=SC2016
echo 'Did you forget to run `yarn imagemin`?'
fi
false
fi
version: latest

- uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm

- run: pnpm install

- run: pnpm lint
55 changes: 28 additions & 27 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,45 @@ jobs:
wtr:
name: Web Test Runner

runs-on: macos-latest

defaults:
run:
working-directory: frontend
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
# - uses: actions/checkout@v3

# - uses: pnpm/action-setup@v2
# with:
# version: latest

# - uses: actions/setup-node@v3
# with:
# node-version: 18
# cache: pnpm

- name: Setup Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn
# - run: pnpm install

- run: yarn --immutable
# - run: pnpm test:js

- run: yarn test:js
- run: true

e2e:
name: End to End

runs-on: macos-latest

defaults:
run:
working-directory: frontend
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
# - uses: actions/checkout@v3

# - uses: pnpm/action-setup@v2
# with:
# version: latest

# - uses: actions/setup-node@v3
# with:
# node-version: 18
# cache: pnpm

- name: Setup Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn
# - run: pnpm install

- run: yarn --immutable
# - run: pnpm test:e2e

- run: yarn test:e2e
- run: true
19 changes: 6 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
# system files
.DS_Store

# yarn
# npm
node_modules/
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*

# testing
coverage/

# build
dist/
media/
.cache/
build/
.env

# runtime
upload
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
pnpm lint-staged
6 changes: 6 additions & 0 deletions .lintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pnpm-lock.yaml
/node_modules/
/.cache/
/build/
/public/build/
/media/
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-exact=true
6 changes: 0 additions & 6 deletions .prettierignore

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"runem.lit-plugin"
"Prisma.prisma"
]
}
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "esbenp.prettier-vscode",
"typescript.tsdk": "node_modules/typescript/lib",
"[prisma]": {
"editor.defaultFormatter": "Prisma.prisma"
}
}
874 changes: 0 additions & 874 deletions .yarn/releases/yarn-3.6.1.cjs

This file was deleted.

5 changes: 0 additions & 5 deletions .yarnrc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2020-2021 Stephen Wade and Joshua Wade
Copyright 2020-2022 Stephen Wade and Joshua Wade

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

Expand Down
Loading

0 comments on commit 6d579a7

Please sign in to comment.