Skip to content

Commit

Permalink
first kommit
Browse files Browse the repository at this point in the history
  • Loading branch information
o-az committed Nov 3, 2023
0 parents commit e33027b
Show file tree
Hide file tree
Showing 31 changed files with 696 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
indent_style = space
indent_size = 2
max_line_length = 80
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false

[*.{md}]
trim_trailing_whitespace = false
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
NODE_ENV="development"
PORT=5173
API_URL=""
API_VERSION=""
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
32 changes: 32 additions & 0 deletions .github/actions/checks/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'Lint / Build / Test'
description: 'Run lint, format, typecheck, build, and test steps'

inputs:
skip-build:
description: 'Skip the build step'
required: false
default: 'false'

runs:
using: composite
steps:
- name: '🧹 Lint'
shell: bash
run: bun lint

- name: '🧹 Format'
shell: bash
run: bun format

- name: '🧪 Typecheck'
shell: bash
run: bun typecheck

- name: '🔧 Build'
shell: bash
if: ${{ !inputs.skip-build }}
run: bun run build

- name: '📝 Test'
shell: bash
run: bun test
14 changes: 14 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Install Dependencies'
description: 'Setup Bun and install dependencies'

runs:
using: composite
steps:
- name: Set up Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 'latest'

- name: Install Dependencies
shell: bash
run: bun install
31 changes: 31 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Checks

on:
pull_request:
workflow_dispatch:
push:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

defaults:
run:
shell: bash

env:
ACTIONS_RUNNER_DEBUG: true

jobs:
checks:
if: ${{ !contains(github.event.head_commit.message, '[skip-checks]') }}
timeout-minutes: 3
runs-on: ['ubuntu-latest']
steps:
- name: 🔑 Checkout
uses: actions/[email protected]

- name: 'Install Dependencies'
uses: ./.github/actions/setup

- name: 'Lint / Build / Test'
uses: ./.github/actions/checks
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local
node_modules
dist
dist-ssr
*.local

# Editor directories and files
.idea
.DS_Store
_
_*

# Editor directories and files
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
.turbo
out

4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
engine-strict=true
auto-install-peers=true
enable-pre-post-scripts=true
strict-peer-dependencies=false
10 changes: 10 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"recommendations": [
"mikestead.dotenv",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss",
"EditorConfig.EditorConfig",
"github.vscode-github-actions"
]
}
40 changes: 40 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.preferences.importModuleSpecifier": "non-relative",
"typescript.preferences.importModuleSpecifierEnding": "js",
"git.autofetch": true,
"git.confirmSync": false,
"git.enableCommitSigning": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports.biome": true,
"source.fixAll.biome": true,
"quickfix.biome": true
},
"editor.defaultFormatter": "biomejs.biome",
"[typescript]": { "editor.defaultFormatter": "biomejs.biome" },
"[javascript]": { "editor.defaultFormatter": "biomejs.biome" },
"[json]": { "editor.defaultFormatter": "biomejs.biome" },
"[jsonc]": { "editor.defaultFormatter": "biomejs.biome" },
"files.associations": {
"*.css": "tailwindcss"
},
"editor.quickSuggestions": {
"strings": "on"
},
"tailwindCSS.includeLanguages": {
"plaintext": "html"
},
"search.exclude": {
"_": true,
"public/*.js": true,
".eslintcache": true,
".prettiercache": true,
"**/node_modules": true
},
"files.exclude": {
".eslintcache": true,
".prettiercache": true
}
}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# EFP Integration Demo

The intended audience for this little demo is EFP launch partners
63 changes: 63 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"$schema": "https://biomejs.dev/schemas/1.3.3/schema.json",
"vcs": {
"root": ".",
"enabled": true,
"clientKind": "git"
},
"files": {
"include": ["./**/*.ts", "./**/*.js", "./**/*.tsx", "./**/*.d.ts"],
"ignore": ["node_modules", "dist"],
"ignoreUnknown": true
},
"organizeImports": {
"enabled": true
},
"formatter": {
"enabled": true,
"lineWidth": 80,
"indentWidth": 2,
"indentStyle": "space",
"formatWithErrors": true,
"include": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.json"]
},
"linter": {
"enabled": true,
"rules": {
"all": true,
"style": {
"useBlockStatements": "off",
"useSelfClosingElements": "off"
},
"suspicious": {
"noExplicitAny": "off"
},
"correctness": { "noUndeclaredVariables": "off" }
}
},
"json": {
"parser": {
"allowComments": true
},
"formatter": {
"enabled": true
}
},
"javascript": {
"parser": {
"unsafeParameterDecoratorsEnabled": true
},
"formatter": {
"enabled": true,
"lineWidth": 80,
"indentWidth": 2,
"indentStyle": "space",
"quoteStyle": "single",
"trailingComma": "none",
"semicolons": "asNeeded",
"jsxQuoteStyle": "single",
"quoteProperties": "asNeeded",
"arrowParentheses": "asNeeded"
}
}
}
Binary file added bun.lockb
Binary file not shown.
19 changes: 19 additions & 0 deletions environment.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
interface EnvironmentVariables {
readonly NODE_ENV: 'development' | 'production' | 'test'
readonly PORT: string
readonly API_URL: string
readonly API_VERSION: string
}

// type support for `import.meta.env[...]
type ImportMetaEnv = EnvironmentVariables

declare namespace NodeJS {
type ProcessEnv = EnvironmentVariables
}

declare global {
interface BigInt {
toJSON: () => string
}
}
63 changes: 63 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!doctype html>
<html
lang="en"
class="dark"
>
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0"
/>
<link
rel="icon"
href="/favicon.ico"
/>
<link
rel="shortcut icon"
href="/favicon.ico"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="/favicon.ico"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/favicon.ico"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/favicon.ico"
/>
<link
rel="preconnect"
href="https://fonts.googleapis.com"
/>
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossorigin
/>
<link
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,700;1,100&family=Inter:wght@200;400;700;900&family=JetBrains+Mono:wght@200;400;800&display=swap"
rel="stylesheet"
/>

<title>EFP Demo</title>
</head>
<body class="mx-auto max-w-3xl dark:bg-[#18181B]">
<div
id="root"
class="m-auto max-w-4xl p-8 text-center"
></div>
<script
type="module"
src="/src/main.tsx"
></script>
</body>
</html>
45 changes: 45 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "efp-demo",
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "bunx --bun vite",
"preview": "bunx --bun vite preview",
"build": "tsc && bunx --bun vite build",
"format": "biome format . --write",
"lint": "biome check --apply .",
"typecheck": "tsc --project tsconfig.json --noEmit",
"clean": "rm -rf node_modules dist"
},
"dependencies": {
"@radix-ui/themes": "^2.0.0",
"@tanstack/react-query": "^5.4.3",
"@tanstack/react-query-devtools": "^5.4.2",
"million": "^2.6.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwindcss-radix": "^2.8.0",
"viem": "^1.18.4"
},
"devDependencies": {
"@biomejs/biome": "1.3.3",
"@tailwindcss/forms": "^0.5.6",
"@tailwindcss/typography": "^0.5.10",
"@total-typescript/ts-reset": "^0.5.1",
"@types/node": "^20.8.8",
"@types/react": "^18.2.31",
"@types/react-dom": "^18.2.14",
"@vitejs/plugin-react-swc": "^3.4.0",
"autoprefixer": "^10.4.16",
"bun-types": "^1.0.7",
"postcss": "^8.4.31",
"tailwindcss": "^3.3.4",
"tailwindcss-animate": "^1.0.7",
"typed-query-selector": "^2.11.0",
"typescript": "^5.2.2",
"vite": "^4.5.0",
"vite-tsconfig-paths": "^4.2.1"
},
"private": true,
"sideEffects": false
}
7 changes: 7 additions & 0 deletions postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
plugins: {
'tailwindcss/nesting': {},
tailwindcss: {},
autoprefixer: {}
}
}
Binary file added public/favicon.ico
Binary file not shown.
Loading

0 comments on commit e33027b

Please sign in to comment.