Skip to content

Commit 66876e1

Browse files
committed
add 2fa exercise skeleton
1 parent 1819a7f commit 66876e1

File tree

227 files changed

+34284
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+34284
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
LITEFS_DIR="/litefs/data"
2+
DATABASE_PATH="./prisma/data.db"
3+
DATABASE_URL="file:./data.db?connection_limit=1"
4+
CACHE_DATABASE_PATH="./other/cache.db"
5+
SESSION_SECRET="dcfaa48e7e20dce686b8636a68fa26f0"
6+
HONEYPOT_SECRET="super-duper-s3cret"
7+
RESEND_API_KEY="re_blAh_blaHBlaHblahBLAhBlAh"
8+
SENTRY_DSN="your-dsn"
9+
10+
# this is set to a random value in the Dockerfile
11+
INTERNAL_COMMAND_TOKEN="some-made-up-token"
12+
13+
# the mocks and some code rely on these two being prefixed with "MOCK_"
14+
# if they aren't then the real github api will be attempted
15+
GITHUB_CLIENT_ID="MOCK_GITHUB_CLIENT_ID"
16+
GITHUB_CLIENT_SECRET="MOCK_GITHUB_CLIENT_SECRET"
17+
GITHUB_TOKEN="MOCK_GITHUB_TOKEN"
18+
GITHUB_REDIRECT_URI="https://example.com/auth/github/callback"
19+
20+
# set this to false to prevent search engines from indexing the website
21+
# default to allow indexing for seo safety
22+
ALLOW_INDEXING="true"
23+
24+
# Tigris Object Storage (S3-compatible) Configuration
25+
AWS_ACCESS_KEY_ID="mock-access-key"
26+
AWS_SECRET_ACCESS_KEY="mock-secret-key"
27+
AWS_REGION="auto"
28+
AWS_ENDPOINT_URL_S3="https://fly.storage.tigris.dev"
29+
BUCKET_NAME="mock-bucket"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
LITEFS_DIR="/litefs/data"
2+
DATABASE_PATH="./prisma/data.db"
3+
DATABASE_URL="file:./data.db?connection_limit=1"
4+
CACHE_DATABASE_PATH="./other/cache.db"
5+
SESSION_SECRET="super-duper-s3cret"
6+
HONEYPOT_SECRET="super-duper-s3cret"
7+
RESEND_API_KEY="re_blAh_blaHBlaHblahBLAhBlAh"
8+
SENTRY_DSN="your-dsn"
9+
10+
# this is set to a random value in the Dockerfile
11+
INTERNAL_COMMAND_TOKEN="some-made-up-token"
12+
13+
# the mocks and some code rely on these two being prefixed with "MOCK_"
14+
# if they aren't then the real github api will be attempted
15+
GITHUB_CLIENT_ID="MOCK_GITHUB_CLIENT_ID"
16+
GITHUB_CLIENT_SECRET="MOCK_GITHUB_CLIENT_SECRET"
17+
GITHUB_TOKEN="MOCK_GITHUB_TOKEN"
18+
GITHUB_REDIRECT_URI="https://example.com/auth/github/callback"
19+
20+
# set this to false to prevent search engines from indexing the website
21+
# default to allow indexing for seo safety
22+
ALLOW_INDEXING="true"
23+
24+
# Tigris Object Storage (S3-compatible) Configuration
25+
AWS_ACCESS_KEY_ID="mock-access-key"
26+
AWS_SECRET_ACCESS_KEY="mock-secret-key"
27+
AWS_REGION="auto"
28+
AWS_ENDPOINT_URL_S3="https://fly.storage.tigris.dev"
29+
BUCKET_NAME="mock-bucket"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
node_modules
2+
.DS_store
3+
4+
/build
5+
/server-build
6+
7+
.cache
8+
9+
/prisma/data.db
10+
/prisma/data.db-journal
11+
/tests/prisma
12+
13+
/test-results/
14+
/playwright-report/
15+
/playwright/.cache/
16+
/tests/fixtures/email/
17+
/tests/fixtures/uploaded/
18+
/tests/fixtures/openimg/
19+
/coverage
20+
21+
/other/cache.db
22+
23+
# Easy way to create temporary files/folders that won't accidentally be added to git
24+
*.local.*
25+
26+
# generated files
27+
/app/components/ui/icons
28+
.react-router/
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
legacy-peer-deps=true
2+
registry=https://registry.npmjs.org/
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
node_modules
2+
3+
/build
4+
/public/build
5+
/server-build
6+
.env
7+
8+
/test-results/
9+
/playwright-report/
10+
/playwright/.cache/
11+
/tests/fixtures/email/*.json
12+
/coverage
13+
/prisma/migrations
14+
15+
package-lock.json
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"recommendations": [
3+
"bradlc.vscode-tailwindcss",
4+
"dbaeumer.vscode-eslint",
5+
"esbenp.prettier-vscode",
6+
"prisma.prisma",
7+
"qwtel.sqlite-viewer",
8+
"yoavbls.pretty-ts-errors",
9+
"github.vscode-github-actions"
10+
]
11+
}
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"loader": {
3+
"prefix": "/loader",
4+
"scope": "typescriptreact,javascriptreact,typescript,javascript",
5+
"body": [
6+
"import { type Route } from \"./+types/${TM_FILENAME_BASE}.ts\"",
7+
"",
8+
"export async function loader({ request }: Route.LoaderArgs) {",
9+
" return {}",
10+
"}",
11+
],
12+
},
13+
"action": {
14+
"prefix": "/action",
15+
"scope": "typescriptreact,javascriptreact,typescript,javascript",
16+
"body": [
17+
"import { type Route } from \"./+types/${TM_FILENAME_BASE}.ts\"",
18+
"",
19+
"export async function action({ request }: Route.ActionArgs) {",
20+
" return {}",
21+
"}",
22+
],
23+
},
24+
"default": {
25+
"prefix": "/default",
26+
"scope": "typescriptreact,javascriptreact,typescript,javascript",
27+
"body": [
28+
"export default function ${TM_FILENAME_BASE/[^a-zA-Z0-9]*([a-zA-Z0-9])([a-zA-Z0-9]*)/${1:/capitalize}${2}/g}() {",
29+
" return (",
30+
" <div>",
31+
" <h1>Unknown Route</h1>",
32+
" </div>",
33+
" )",
34+
"}",
35+
],
36+
},
37+
"headers": {
38+
"prefix": "/headers",
39+
"scope": "typescriptreact,javascriptreact,typescript,javascript",
40+
"body": [
41+
"import { type Route } from \"./+types/${TM_FILENAME_BASE}.ts\"",
42+
"export const headers: Route.HeadersFunction = ({ loaderHeaders }) => ({",
43+
" 'Cache-Control': loaderHeaders.get('Cache-Control') ?? '',",
44+
"})",
45+
],
46+
},
47+
"links": {
48+
"prefix": "/links",
49+
"scope": "typescriptreact,javascriptreact,typescript,javascript",
50+
"body": [
51+
"import { type Route } from \"./+types/${TM_FILENAME_BASE}.ts\"",
52+
"",
53+
"export const links: Route.LinksFunction = () => {",
54+
" return []",
55+
"}",
56+
],
57+
},
58+
"meta": {
59+
"prefix": "/meta",
60+
"scope": "typescriptreact,javascriptreact,typescript,javascript",
61+
"body": [
62+
"import { type Route } from \"./+types/${TM_FILENAME_BASE}.ts\"",
63+
"",
64+
"export const meta: Route.MetaFunction = ({ data }) => [{",
65+
" title: 'Title',",
66+
"}]",
67+
],
68+
},
69+
"shouldRevalidate": {
70+
"prefix": "/shouldRevalidate",
71+
"scope": "typescriptreact,javascriptreact,typescript,javascript",
72+
"body": [
73+
"import { type ShouldRevalidateFunctionArgs } from 'react-router'",
74+
"",
75+
"export function shouldRevalidate({ defaultShouldRevalidate }: ShouldRevalidateFunctionArgs) {",
76+
" return defaultShouldRevalidate",
77+
"}",
78+
],
79+
},
80+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"typescript.preferences.autoImportFileExcludePatterns": [
3+
"@remix-run/server-runtime",
4+
"express",
5+
"@radix-ui/**",
6+
"@react-email/**",
7+
"node:stream/consumers",
8+
"node:test",
9+
"node:console"
10+
],
11+
"workbench.editorAssociations": {
12+
"*.db": "sqlite-viewer.view"
13+
}
14+
}
8.78 KB
Loading

0 commit comments

Comments
 (0)