Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: switch to trpc & kysely #1

Merged
merged 6 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
NEXT_PUBLIC_AUTHORIZED_ADDRESSES=
NEXT_PUBLIC_TOKEN_INDEX_ADDRESS=
NEXT_PUBLIC_TESTNET=

# Mac/Linux: `openssl rand -hex 32` or go to https://generate-secret.now.sh/32
NEXT_IRON_PASSWORD=

CIC_GRAPH_URL=
CIC_GRAPH_ADMIN_SECRET=
TOKEN_INDEX_WRITER_PRIVATE_KEY=
DATABASE_URL=
TOKEN_INDEX_WRITER_PRIVATE_KEY=
#
NEXT_PUBLIC_TESTNET=
35 changes: 35 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require("path");

/** @type {import("eslint").Linter.Config} */
const config = {
overrides: [
{
extends: [
"plugin:@typescript-eslint/recommended-requiring-type-checking",
],
files: ["*.ts", "*.tsx"],
parserOptions: {
project: path.join(__dirname, "tsconfig.json"),
},
},
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: path.join(__dirname, "tsconfig.json"),
},
plugins: ["@typescript-eslint"],
extends: ["next/core-web-vitals", "plugin:@typescript-eslint/recommended"],
rules: {
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
},
};

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

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ yarn-error.log*
.pnpm-debug.log*

# local env files
.env
.env.testnet
.env.local
.env.development.local
.env.test.local
Expand Down
18 changes: 0 additions & 18 deletions gqty.config.js

This file was deleted.

11 changes: 0 additions & 11 deletions next.config.js

This file was deleted.

25 changes: 25 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
* for Docker builds.
*/
await import("./src/env.mjs");

/** @type {import("next").NextConfig} */
const config = {
reactStrictMode: false,
webpack: (config) => {
config.resolve.fallback = { fs: false, net: false, tls: false };
return config;
},
/**
* If you have `experimental: { appDir: true }` set, then you must comment the below `i18n` config
* out.
*
* @see https://github.com/vercel/next.js/issues/41980
*/
i18n: {
locales: ["en"],
defaultLocale: "en",
},
};
export default config;
33 changes: 30 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"postinstall": "kysely-codegen",
"start": "next start",
"lint": "next lint",
"generate": "gqty generate",
Expand All @@ -16,24 +17,43 @@
"@emotion/react": "11.11.0",
"@emotion/server": "11.11.0",
"@emotion/styled": "11.11.0",
"@gqty/cli": "4.0.0-alpha-4a2eebdf.0",
"@gqty/react": "3.0.0-alpha-4a2eebdf.0",
"@hookform/resolvers": "^3.1.0",
"@mui/icons-material": "5.11.16",
"@mui/material": "5.13.1",
"@rainbow-me/rainbowkit": "1.0.0",
"@t3-oss/env-nextjs": "^0.3.1",
"@tanstack/react-query": "^4.29.7",
"@trpc/client": "^10.26.0",
"@trpc/next": "^10.26.0",
"@trpc/react-query": "^10.26.0",
"@trpc/server": "^10.30.0",
"@vercel/analytics": "^1.0.1",
"@visx/axis": "^3.1.0",
"@visx/brush": "^3.0.1",
"@visx/curve": "^3.0.0",
"@visx/gradient": "^3.0.0",
"@visx/group": "^3.0.0",
"@visx/mock-data": "^3.0.0",
"@visx/pattern": "^3.0.0",
"@visx/responsive": "^3.0.0",
"@visx/scale": "^3.0.0",
"@visx/shape": "^3.0.0",
"@visx/tooltip": "^3.1.2",
"@yudiel/react-qr-scanner": "^1.1.8",
"@zxing/browser": "^0.1.3",
"@zxing/library": "^0.20.0",
"abitype": "^0.8.4",
"crypto-browserify": "^3.12.0",
"d3-array": "^3.2.4",
"decimal.js": "^10.4.3",
"ethers": "^6.3.0",
"gqty": "3.0.0-alpha-4a2eebdf.0",
"iron-session": "^6.3.1",
"kysely": "^0.25.0",
"leaflet": "^1.9.4",
"leaflet-geosearch": "^3.8.0",
"next": "^13.4.2",
"pg": "^8.11.0",
"qrcode.react": "^3.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand All @@ -42,19 +62,26 @@
"react-qrcode-logo": "^2.9.0",
"react-to-print": "^2.14.12",
"siwe": "^2.1.4",
"superjson": "1.12.2",
"viem": "~0.3.30",
"wagmi": "^1.0.5",
"zod": "^3.21.4"
},
"devDependencies": {
"@types/d3-array": "^3.0.5",
"@types/eslint": "^8.37.0",
"@types/jest": "^29.5.1",
"@types/leaflet": "^1.9.3",
"@types/node": "^20.2.0",
"@types/pg": "^8.10.2",
"@types/prettier": "^2.7.2",
"@types/react": "^18.2.6",
"@typescript-eslint/eslint-plugin": "^5.59.6",
"@typescript-eslint/parser": "^5.59.6",
"eslint": "^8.40.0",
"eslint-config-next": "^13.4.2",
"graphql": "^15.5.0",
"jest": "^29.5.0",
"kysely-codegen": "^0.10.0",
"ts-jest": "^29.1.0",
"typescript": "^5.0.4",
"yargs": "^17.7.2"
Expand Down
148 changes: 0 additions & 148 deletions pages/api/deploy.ts

This file was deleted.

Loading