Skip to content

Commit

Permalink
Updated repo to match latest frontend tech
Browse files Browse the repository at this point in the history
  • Loading branch information
alebg committed Apr 4, 2024
1 parent c3432b6 commit de88547
Show file tree
Hide file tree
Showing 250 changed files with 41,629 additions and 17,503 deletions.
36 changes: 36 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Since the ".env" file is gitignored, you can use the ".env.example" file to
# build a new ".env" file when you clone the repo. Keep this file up-to-date
# when you add new variables to `.env`.

# This file will be committed to version control, so make sure not to have any
# secrets in it. If you are cloning this repo, create a copy of this file named
# ".env" and populate it with your secrets.

# When adding additional environment variables, the schema in "/src/env.js"
# should be updated accordingly.

# Example:
# SERVERVAR="foo"
# NEXT_PUBLIC_CLIENTVAR="bar"


# HIGHLIGHT
HIGHLIGHT_PROJECT_ID="asdadasd"

# Switch between mainnet and testnet, default is testnet
NEXT_PUBLIC_ENABLE_TESTNETS=true


# Indexer
NEXT_PUBLIC_INDEXER_URL="http://localhost:8000"

# Thidweb Client
NEXT_PUBLIC_THIRDWEB_CLIENT_ID="something"
THIRDWEB_SECRET_KEY="something-else"

# Contracts/ Wallets
NEXT_PUBLIC_FEE_WALLET_ADDRESS="0x"

# Chains
NEXT_PUBLIC_CHAIN_BASE_SEPOLIA_JSON_RPC="https://rpc.testnet.sepiorium.com"
NEXT_PUBLIC_CHAIN_BASE_MAINNET_JSON_RPC="https://rpc.testnet.sepiorium.com"
1 change: 1 addition & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FLAG_TEST_ENV=true
43 changes: 43 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/** @type {import("eslint").Linter.Config} */
const config = {
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
},
plugins: ["@typescript-eslint"],
extends: [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:storybook/recommended"
],
ignorePatterns: ["!**/*", ".storybook/*"],
rules: {
// These opinionated rules are enabled in stylistic-type-checked above.
// Feel free to reconfigure them to your own preference.
"@typescript-eslint/array-type": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"react/display-name": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/consistent-type-definitions": "off",

"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/require-await": "off",
"@typescript-eslint/no-misused-promises": [
"error",
{
checksVoidReturn: { attributes: false },
},
],
},
};

module.exports = config;
8 changes: 0 additions & 8 deletions .eslintrc.json

This file was deleted.

45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: 🐛 Bug Report
description: Submit a bug report to help us improve
labels:
- bug
body:
- type: markdown
attributes:
value: |
Before filing your issue, ask yourself:
- Do I have basic ideas about where it goes wrong? (E.g. front or back-end)
- Could it be because of my own mistakes?
- Does an issue about the bug already exist?
- type: textarea
attributes:
label: Description
description: A clear and concise description of what the bug is.
validations:
required: true

- type: textarea
attributes:
label: Steps to reproduce
description: Write down the steps to reproduce the bug. You should start with a fresh installation, or your git repository linked above. If it's in production, point out the page with the context.
placeholder: |
1. Step 1...
2. Step 2...
3. Step 3...
validations:
required: false

- type: input
attributes:
label: Version
description: The used UI Version.
placeholder: 'e.g. 1.28.4, main'

- type: textarea
attributes:
label: Additional Information
description: Include other relevant details, e.g. about your environment or setup.
placeholder: |
- Browser with version
- Operating System
- ...
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: ❓ Question - Ask us
contact_links:
- name: ❓ Question - Ask us
url: https://t.me/RalphTheMoose
about: This issue tracker is not for technical support. Please use one of our dedicated channels, and ask the community for help.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/devops.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 🚀 Dev Ops
description: Submit a Dev Ops change request
labels: ["DevOps"]
body:
- type: textarea
attributes:
label: Description
description: What is the problem or desired behavior for the CI/CD / Developer tools?
validations:
required: true

- type: textarea
attributes:
label: Motivation
description: Please outline the motivation for the proposal and why it should be implemented.
validations:
required: true

- type: textarea
attributes:
label: Change
description: Please outline the change for the proposal in detail.
validations:
required: true

- type: checkboxes
attributes:
label: Additional Information
description: Please select all conditions that apply.
options:
- label: It is related to the Storybook?
- label: It is related to the GitHub Actions?
- label: It is related to the developer tools?

32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 💅 Feature Request
description: Submit a feature request
labels:
- enhancement
body:
- type: textarea
attributes:
label: Description
description: A clear and concise description of what the feature is.
validations:
required: true

- type: textarea
attributes:
label: Motivation
description: Please outline the motivation for the proposal and why it should be implemented. Has this been requested by a lot of users?
validations:
required: false

- type: textarea
attributes:
label: Change
description: Please outline the change for the proposal in detail.
validations:
required: false

- type: checkboxes
attributes:
label: Additional Information
description: Please select all conditions that apply.
options:
- label: The API needs to be changed.
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build Component Library & React App
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Install 🔧
run: |
npm install
- name: Build NextJS App 🔧
run: |
npm run build
- name: Build Storybook 🔧
run: |
npm run build-storybook
25 changes: 25 additions & 0 deletions .github/workflows/component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Component Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
name: Test UI Components
strategy:
matrix:
node-version: [18.16.1, 20.4.0]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Run Component Tests
run: npm run test:component
32 changes: 32 additions & 0 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and Deploy Component Library & React App
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install 🔧
run: |
npm install --legacy-peer-deps
- name: Build Next App 🔧
run: |
npm run build
- name: Build Storybook 🔧
run: |
npm run build-storybook
- name: Deploy Storybook 🚀
run: |
chmod +x tools/deploy-to-gh-pages
tools/deploy-to-gh-pages
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@
# testing
/coverage

# database
/prisma/db.sqlite
/prisma/db.sqlite-journal

# next.js
/.next/
/out/
next-env.d.ts

# production
/build
Expand All @@ -23,13 +28,15 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables
.env
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
34 changes: 19 additions & 15 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
import type { StorybookConfig } from '@storybook/nextjs'
import type { StorybookConfig } from '@storybook/nextjs';
import path from 'path'


const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-onboarding',
'@storybook/addon-interactions',
"stories": [
"../src/**/*.mdx",
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
],
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-onboarding",
"@storybook/addon-interactions"
],
framework: {
name: '@storybook/nextjs',
options: {},
"framework": {
"name": "@storybook/nextjs",
"options": {}
},
docs: {
autodocs: 'tag',
"docs": {
"autodocs": "tag"
},
webpackFinal: async (config, { configType }) => {
if (config === undefined) return config
if (config.resolve === undefined) config.resolve = {}
config.resolve.alias = {
...config.resolve.alias,
'@/lib': path.resolve(__dirname, '../src/lib'),
'~/': path.resolve(__dirname, '../src'),
}

return config
},
}
export default config
};
export default config;
Loading

0 comments on commit de88547

Please sign in to comment.