Skip to content

Commit

Permalink
feat: demo
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4007 committed Feb 13, 2025
1 parent fe86a58 commit d3c4069
Show file tree
Hide file tree
Showing 81 changed files with 5,296 additions and 14,373 deletions.
44 changes: 41 additions & 3 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,49 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"version": "0.2",
"ignorePaths": ["**/*.json", "**/*.css", "node_modules", "**/*.log"],
"ignorePaths": ["**/*.json", "**/*.css", "node_modules", "**/*.log", "/lib"],
"useGitignore": true,
"language": "en",
"words": ["dataurl", "devpool", "outdir", "servedir"],
"dictionaries": ["typescript", "node", "software-terms"],
"words": [
"binkey",
"binsec",
"chainlist",
"cirip",
"commitlint",
"dataurl",
"devpool",
"disqualifier",
"ethersproject",
"fract",
"gnosisscan",
"godb",
"greyscale",
"IERC",
"keccak",
"keypair",
"Knip",
"libsodium",
"Numberish",
"outbase",
"outdir",
"Rpcs",
"scalarmult",
"servedir",
"solmate",
"sonarjs",
"SUPABASE",
"typebox",
"TYPEHASH",
"ubiquibot",
"UBIQUIBOT",
"URLSAFE",
"wfzpewmlyiozupulbuur",
"WXDAI",
"XDAI",
"xmark",
"Zora"
],
"dictionaries": ["typescript", "node", "software-terms", "html"],
"import": ["@cspell/dict-typescript/cspell-ext.json", "@cspell/dict-node/cspell-ext.json", "@cspell/dict-software-terms"],
"ignoreRegExpList": ["[0-9a-fA-F]{6}"]
}
6 changes: 5 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
MY_SECRET="MY_SECRET"
# your Supabase url, e.g. https://wfzpewmlyiozupulbuur.supabase.co
SUPABASE_URL=""
# your Supabase Anon Key that you can find under settings/api, e.g eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6IndmenBld21seWlvenVwdWxidXVyIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTU2NzQzMzksImV4cCI6MjAxMTI1MDMzOX0.SKIL3Q0NOBaMehH0ekFspwgcu3afp3Dl9EDzPqs1nKs
SUPABASE_ANON_KEY=""
FRONTEND_URL="http://localhost:8080"
53 changes: 53 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["./tsconfig.json"]
},
"plugins": ["@typescript-eslint", "sonarjs"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:sonarjs/recommended"],
"ignorePatterns": ["**/*.js"],
"rules": {
"prefer-arrow-callback": ["warn", { "allowNamedFunctions": true }],
"func-style": ["warn", "declaration", { "allowArrowFunctions": false }],
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"constructor-super": "error",
"no-invalid-this": "off",
"@typescript-eslint/no-invalid-this": ["error"],
"no-restricted-syntax": ["error", "ForInStatement"],
"use-isnan": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "after-used",
"ignoreRestSiblings": true,
"vars": "all",
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"sonarjs/no-all-duplicated-branches": "error",
"sonarjs/no-collection-size-mischeck": "error",
"sonarjs/no-duplicated-branches": "error",
"sonarjs/no-element-overwrite": "error",
"sonarjs/no-identical-conditions": "error",
"sonarjs/no-identical-expressions": "error",
"@typescript-eslint/naming-convention": [
"error",
{ "selector": "interface", "format": ["PascalCase"], "custom": { "regex": "^I[A-Z]", "match": false } },
{ "selector": "memberLike", "modifiers": ["private"], "format": ["camelCase"], "leadingUnderscore": "require" },
{ "selector": "typeLike", "format": ["PascalCase"] },
{ "selector": "typeParameter", "format": ["PascalCase"], "prefix": ["T"] },
{ "selector": "variable", "format": ["camelCase", "UPPER_CASE"], "leadingUnderscore": "allow", "trailingUnderscore": "allow" },
{ "selector": "variable", "format": ["camelCase"], "leadingUnderscore": "allow", "trailingUnderscore": "allow" },
{ "selector": "variable", "modifiers": ["destructured"], "format": null },
{ "selector": "variable", "types": ["boolean"], "format": ["PascalCase"], "prefix": ["is", "should", "has", "can", "did", "will", "does"] },
{ "selector": "variableLike", "format": ["camelCase"] },
{ "selector": ["function", "variable"], "format": ["camelCase"] }
]
}
}
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@

* @rndquu
139 changes: 0 additions & 139 deletions .github/empty-string-checker.ts

This file was deleted.

13 changes: 0 additions & 13 deletions .github/knip.ts

This file was deleted.

51 changes: 3 additions & 48 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,6 @@
<!---
Insert the issue number of the task you are completing if within this repository, or paste the url of the task.
// EXAMPLE
Resolves https://github.com/ubiquity/ts-template/issues/75
-->

Resolves #

<!---
We advise that you give a brief description of your changes, either that it meets
the specification exactly as described or what you had to do outwith the spec to resolve it.
This is not required but again, it is advised.
// EXAMPLE
Changes:
- Refactored the authentication mechanism because the auth token wasn't being properly stored.
- Removed unnecessary calls to render the login button.
-->

Changes:

- ...

<!---
NOTICE: This is required for all pull requests and will be requested by reviewers if not present.
- Include a screenshot/video or some other visual confirmation that your changes solve the task
- If this is not applicable, build a unit test to prove it works as intended
// EXAMPLE
QA:
- <url to your plugin fork or test issue in your own org showcasing the end result>
- <screenshot of some kind of UI fix>
- <E2E video of using the software>
-->

QA:

- ...

<!---
Please provide:
1. Detailed instructions how to QA locally the PR
2. Setup instructions required after the PR is merged
Example: https://github.com/ubiquity/pay.ubq.fi/pull/226#issue-2290493538
<!--
- You must link the issue number e.g. "Resolves #1234"
- Please do not replace the keyword "Resolves" https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
-->

How to QA and setup:
- ...
16 changes: 11 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,22 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v4
# with:
# submodules: "recursive" # Ensures submodules are checked out

- name: Set up Node.js
uses: actions/setup-node@v4
- name: Set up Bun
uses: oven-sh/setup-bun@v1
with:
node-version: 20.10.0
bun-version: latest

- name: Build
run: |
yarn
yarn build
bun install
bun run build
env: # Set environment variables for the build
FRONTEND_URL: "https://demo.ubq.fi"
SUPABASE_URL: "https://wfzpewmlyiozupulbuur.supabase.co"
SUPABASE_ANON_KEY: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6IndmenBld21seWlvenVwdWxidXVyIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTU2NzQzMzksImV4cCI6MjAxMTI1MDMzOX0.SKIL3Q0NOBaMehH0ekFspwgcu3afp3Dl9EDzPqs1nKs"

- name: Upload build artifact
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ jobs:
name: Conventional Commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- uses: ubiquity/action-conventional-commits@master
22 changes: 9 additions & 13 deletions .github/workflows/cspell.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
name: Spell Check

on:
push:

push: null
jobs:
spellcheck:
name: Check for spelling errors
runs-on: ubuntu-latest

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

- name: Set up Node.js
uses: actions/setup-node@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
node-version: "20.10.0"

- name: Install cspell
run: yarn add cspell

bun-version: latest
- name: Install dependencies
run: bun install
- name: Run cspell
run: yarn format:cspell
run: bun run format:cspell
env:
CSPELL_WORDS: SUPABASE
Loading

0 comments on commit d3c4069

Please sign in to comment.