-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 937db32
Showing
261 changed files
with
37,375 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
LITEFS_DIR="/litefs/data" | ||
DATABASE_PATH="./prisma/data.db" | ||
DATABASE_URL="file:./data.db?connection_limit=1" | ||
CACHE_DATABASE_PATH="./other/cache.db" | ||
SESSION_SECRET="super-duper-s3cret" | ||
HONEYPOT_SECRET="super-duper-s3cret" | ||
RESEND_API_KEY="re_blAh_blaHBlaHblahBLAhBlAh" | ||
SENTRY_DSN="your-dsn" | ||
|
||
# this is set to a random value in the Dockerfile | ||
INTERNAL_COMMAND_TOKEN="some-made-up-token" | ||
|
||
# the mocks and some code rely on these two being prefixed with "MOCK_" | ||
# if they aren't then the real github api will be attempted | ||
GITHUB_CLIENT_ID="MOCK_GITHUB_CLIENT_ID" | ||
GITHUB_CLIENT_SECRET="MOCK_GITHUB_CLIENT_SECRET" | ||
GITHUB_TOKEN="MOCK_GITHUB_TOKEN" | ||
|
||
# set this to false to prevent search engines from indexing the website | ||
# default to allow indexing for seo safety | ||
ALLOW_INDEXING="true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!-- Summary: Put your summary here --> | ||
|
||
## Test Plan | ||
|
||
<!-- What steps need to be taken to verify this works as expected? --> | ||
|
||
## Checklist | ||
|
||
- [ ] Tests updated | ||
- [ ] Docs updated | ||
|
||
## Screenshots | ||
|
||
<!-- If what you're changing is within the app, please show before/after. | ||
You can provide a video as well if that makes more sense --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
name: 🚀 Deploy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
pull_request: {} | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
actions: write | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
name: ⬣ ESLint | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: 📥 Download deps | ||
uses: bahmutov/npm-install@v1 | ||
|
||
- name: 🖼 Build icons | ||
run: npm run build:icons | ||
|
||
- name: 🔬 Lint | ||
run: npm run lint | ||
|
||
typecheck: | ||
name: ʦ TypeScript | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: 📥 Download deps | ||
uses: bahmutov/npm-install@v1 | ||
|
||
- name: 🖼 Build icons | ||
run: npm run build:icons | ||
|
||
- name: 🔎 Type check | ||
run: npm run typecheck --if-present | ||
|
||
vitest: | ||
name: ⚡ Vitest | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: 📥 Download deps | ||
uses: bahmutov/npm-install@v1 | ||
|
||
- name: 🏄 Copy test env vars | ||
run: cp .env.example .env | ||
|
||
- name: 🖼 Build icons | ||
run: npm run build:icons | ||
|
||
- name: ⚡ Run vitest | ||
run: npm run test -- --coverage | ||
|
||
playwright: | ||
name: 🎭 Playwright | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 60 | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🏄 Copy test env vars | ||
run: cp .env.example .env | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: 📥 Download deps | ||
uses: bahmutov/npm-install@v1 | ||
|
||
- name: 📥 Install Playwright Browsers | ||
run: npm run test:e2e:install | ||
|
||
- name: 🛠 Setup Database | ||
run: npx prisma migrate deploy | ||
|
||
- name: 🏦 Cache Database | ||
id: db-cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: prisma/data.db | ||
key: | ||
db-cache-schema_${{ hashFiles('./prisma/schema.prisma') | ||
}}-migrations_${{ hashFiles('./prisma/migrations/*/migration.sql') | ||
}} | ||
|
||
- name: 🌱 Seed Database | ||
if: steps.db-cache.outputs.cache-hit != 'true' | ||
run: npx prisma db seed | ||
env: | ||
MINIMAL_SEED: true | ||
|
||
- name: 🏗 Build | ||
run: npm run build | ||
|
||
- name: 🎭 Playwright tests | ||
run: npx playwright test | ||
|
||
- name: 📊 Upload report | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 | ||
|
||
deploy: | ||
name: 🚀 Deploy | ||
runs-on: ubuntu-22.04 | ||
needs: [lint, typecheck, vitest, playwright] | ||
# only build/deploy branches on pushes | ||
if: ${{ github.event_name == 'push' }} | ||
|
||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: '50' | ||
|
||
- name: 👀 Read app name | ||
uses: SebRollen/toml-action@v1.2.0 | ||
id: app_name | ||
with: | ||
file: 'fly.toml' | ||
field: 'app' | ||
|
||
# move Dockerfile to root | ||
- name: 🚚 Move Dockerfile | ||
run: | | ||
mv ./other/Dockerfile ./Dockerfile | ||
mv ./other/.dockerignore ./.dockerignore | ||
- name: 🎈 Setup Fly | ||
uses: superfly/flyctl-actions/setup-flyctl@1.5 | ||
|
||
- name: 🚀 Deploy Staging | ||
if: ${{ github.ref == 'refs/heads/dev' }} | ||
run: | ||
flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} | ||
--app ${{ steps.app_name.outputs.value }}-staging | ||
env: | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | ||
|
||
- name: 🚀 Deploy Production | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
run: | ||
flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} | ||
--build-secret SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} | ||
env: | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
node_modules | ||
.DS_store | ||
|
||
/build | ||
/public/build | ||
/server-build | ||
.env | ||
.cache | ||
|
||
/prisma/data.db | ||
/prisma/data.db-journal | ||
/tests/prisma | ||
|
||
/test-results/ | ||
/playwright-report/ | ||
/playwright/.cache/ | ||
/tests/fixtures/email/ | ||
/coverage | ||
|
||
/other/cache.db | ||
|
||
# Easy way to create temporary files/folders that won't accidentally be added to git | ||
*.local.* | ||
|
||
# generated files | ||
/app/components/ui/icons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
legacy-peer-deps=true | ||
registry=https://registry.npmjs.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
node_modules | ||
|
||
/build | ||
/public/build | ||
/server-build | ||
.env | ||
|
||
/test-results/ | ||
/playwright-report/ | ||
/playwright/.cache/ | ||
/tests/fixtures/email/*.json | ||
/coverage | ||
/prisma/migrations | ||
|
||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"recommendations": [ | ||
"bradlc.vscode-tailwindcss", | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"prisma.prisma", | ||
"qwtel.sqlite-viewer", | ||
"yoavbls.pretty-ts-errors", | ||
"github.vscode-github-actions" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
{ | ||
"loader": { | ||
"prefix": "/loader", | ||
"scope": "typescriptreact,javascriptreact,typescript,javascript", | ||
"body": [ | ||
"import { type LoaderFunctionArgs, json } from \"@remix-run/node\"", | ||
"", | ||
"export async function loader({ request }: LoaderFunctionArgs) {", | ||
" return json({})", | ||
"}", | ||
], | ||
}, | ||
"action": { | ||
"prefix": "/action", | ||
"scope": "typescriptreact,javascriptreact,typescript,javascript", | ||
"body": [ | ||
"import { type ActionFunctionArgs, json } from \"@remix-run/node\"", | ||
"", | ||
"export async function action({ request }: ActionFunctionArgs) {", | ||
" return json({})", | ||
"}", | ||
], | ||
}, | ||
"default": { | ||
"prefix": "/default", | ||
"scope": "typescriptreact,javascriptreact,typescript,javascript", | ||
"body": [ | ||
"export default function ${TM_FILENAME_BASE/[^a-zA-Z0-9]*([a-zA-Z0-9])([a-zA-Z0-9]*)/${1:/capitalize}${2}/g}() {", | ||
" return (", | ||
" <div>", | ||
" <h1>Unknown Route</h1>", | ||
" </div>", | ||
" )", | ||
"}", | ||
], | ||
}, | ||
"headers": { | ||
"prefix": "/headers", | ||
"scope": "typescriptreact,javascriptreact,typescript,javascript", | ||
"body": [ | ||
"import type { HeadersFunction } from '@remix-run/node'", | ||
"", | ||
"export const headers: HeadersFunction = ({ loaderHeaders }) => ({", | ||
" 'Cache-Control': loaderHeaders.get('Cache-Control') ?? '',", | ||
"})", | ||
], | ||
}, | ||
"links": { | ||
"prefix": "/links", | ||
"scope": "typescriptreact,javascriptreact,typescript,javascript", | ||
"body": [ | ||
"import type { LinksFunction } from '@remix-run/node'", | ||
"", | ||
"export const links: LinksFunction = () => {", | ||
" return []", | ||
"}", | ||
], | ||
}, | ||
"meta": { | ||
"prefix": "/meta", | ||
"scope": "typescriptreact,javascriptreact,typescript,javascript", | ||
"body": [ | ||
"import type { MetaFunction } from '@remix-run/node'", | ||
"", | ||
"export const meta: MetaFunction<typeof loader> = ({ data }) => [{", | ||
" title: 'Title',", | ||
"}]", | ||
], | ||
}, | ||
"shouldRevalidate": { | ||
"prefix": "/shouldRevalidate", | ||
"scope": "typescriptreact,javascriptreact,typescript,javascript", | ||
"body": [ | ||
"import type { ShouldRevalidateFunction } from '@remix-run/react'", | ||
"", | ||
"export const shouldRevalidate: ShouldRevalidateFunction = ({", | ||
" defaultShouldRevalidate", | ||
"}) => {", | ||
" return defaultShouldRevalidate", | ||
"}", | ||
], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"typescript.preferences.autoImportFileExcludePatterns": [ | ||
"@remix-run/server-runtime", | ||
"@remix-run/router", | ||
"express", | ||
"@radix-ui/**", | ||
"@react-email/**", | ||
"react-router-dom", | ||
"react-router", | ||
"stream/consumers", | ||
"node:stream/consumers", | ||
"node:test", | ||
"console", | ||
"node:console" | ||
], | ||
"workbench.editorAssociations": { | ||
"*.db": "sqlite-viewer.view" | ||
} | ||
} |
Oops, something went wrong.