diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..09bcf48 Binary files /dev/null and b/.DS_Store differ diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b512c09 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/.gitignore b/.gitignore index 583d0c3..b63ac4f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,9 @@ +.env .husky +.next node_modules package-lock.json -yarn-error.log -yarn.lock -.next pages/normalize.css -pnpm-lock.yaml \ No newline at end of file +pnpm-lock.yaml +yarn-error.log +yarn.lock \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..fb740e9 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +version: "3" +services: + client: + build: + context: ./packages/client + dockerfile: Dockerfile + ports: + - "3000:3000" + volumes: + - ./packages/client:/app + - /app/node_modules + environment: + - NODE_ENV=$NODE_ENV \ No newline at end of file diff --git a/lerna.json b/lerna.json new file mode 100644 index 0000000..f932c1f --- /dev/null +++ b/lerna.json @@ -0,0 +1,7 @@ +{ + "$schema": "node_modules/lerna/schemas/lerna-schema.json", + "version": "0.0.0", + "packages": [ + "packages/*" + ] +} diff --git a/package.json b/package.json index 8813058..6843282 100644 --- a/package.json +++ b/package.json @@ -1,37 +1,27 @@ { - "name": "spendia", + "name": "spend-ia", + "version": "1.0.0", + "description": "", + "main": "index.js", "private": true, - "version": "0.0.0", - "type": "module", - "scripts.backup": { - "dev": "vite", - "build": "tsc && vite build", - "preview": "vite preview" - }, + "workspaces": [ + "packages/*" + ], "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start", - "lint": "next lint", - "husky-prepare": "husky install" + "dev": "npx lerna run dev", + "build": "npx lerna run build" }, + "keywords": [], + "author": "", + "license": "ISC", "dependencies": { - "next": "^13.2.4", - "react": "^18.2.0", - "react-chartjs-2": "^5.2.0", - "react-dom": "^18.2.0", - "react-google-charts": "^4.0.0", - "styled-components": "^5.3.9", - "zustand": "^4.3.7" + "@trpc/client": "^10.33.0", + "@trpc/server": "^10.33.0", + "ts-node": "^10.9.1", + "typescript": "^5.1.6", + "zod": "^3.21.4" }, "devDependencies": { - "@types/node": "18.15.11", - "@types/react": "^18.0.28", - "@types/react-dom": "^18.0.11", - "@types/styled-components": "^5.1.26", - "@typescript-eslint/eslint-plugin": "^5.43.0", - "@vitejs/plugin-react": "^3.1.0", - "babel-plugin-styled-components": "^2.0.7", "eslint": "^8.0.1", "eslint-config-prettier": "^8.8.0", "eslint-config-standard-with-typescript": "^34.0.1", @@ -43,6 +33,7 @@ "eslint-plugin-react": "^7.32.2", "eslint-plugin-sort-keys-fix": "^1.1.2", "husky": "^8.0.3", + "lerna": "^7.1.1", "lint-staged": "^13.2.0", "prettier": "^2.8.7", "stylelint": "^15.3.0", @@ -51,43 +42,6 @@ "stylelint-config-styled-components": "^0.1.1", "stylelint-order": "^6.0.3", "stylelint-prettier": "^3.0.0", - "stylelint-processor-styled-components": "^1.10.0", - "typescript": "^5.0.4", - "vite": "^4.2.0" - }, - "resolutions": { - "styled-components": "^5" - }, - "babel": { - "env": { - "development": { - "presets": [ - "next/babel" - ], - "plugins": [ - [ - "styled-components", - { - "ssr": true, - "displayName": true - } - ] - ] - }, - "production": { - "presets": [ - "next/babel" - ], - "plugins": [ - [ - "styled-components", - { - "ssr": true, - "displayName": false - } - ] - ] - } - } + "stylelint-processor-styled-components": "^1.10.0" } } diff --git a/.babelrc b/packages/client/.babelrc similarity index 100% rename from .babelrc rename to packages/client/.babelrc diff --git a/packages/client/Dockerfile b/packages/client/Dockerfile new file mode 100644 index 0000000..3d63d78 --- /dev/null +++ b/packages/client/Dockerfile @@ -0,0 +1,17 @@ + +FROM node:18 + +WORKDIR /app + +COPY package.json ./ + +RUN yarn + +COPY . . + +ENV NODE_ENV=$NODE_ENV + +EXPOSE 3000 + +# CMD print "abc" +CMD sh -c "if [ '$NODE_ENV' = 'development' ]; then yarn dev; else yarn start; fi" diff --git a/components/PieCircle.tsx b/packages/client/components/PieCircle.tsx similarity index 100% rename from components/PieCircle.tsx rename to packages/client/components/PieCircle.tsx diff --git a/components/index.ts b/packages/client/components/index.ts similarity index 100% rename from components/index.ts rename to packages/client/components/index.ts diff --git a/lib/constants.ts b/packages/client/lib/constants.ts similarity index 100% rename from lib/constants.ts rename to packages/client/lib/constants.ts diff --git a/lib/storage.ts b/packages/client/lib/storage.ts similarity index 100% rename from lib/storage.ts rename to packages/client/lib/storage.ts diff --git a/lib/theme.ts b/packages/client/lib/theme.ts similarity index 100% rename from lib/theme.ts rename to packages/client/lib/theme.ts diff --git a/lib/types.d.ts b/packages/client/lib/types.d.ts similarity index 100% rename from lib/types.d.ts rename to packages/client/lib/types.d.ts diff --git a/next-env.d.ts b/packages/client/next-env.d.ts similarity index 100% rename from next-env.d.ts rename to packages/client/next-env.d.ts diff --git a/packages/client/package.json b/packages/client/package.json new file mode 100644 index 0000000..1741e63 --- /dev/null +++ b/packages/client/package.json @@ -0,0 +1,73 @@ +{ + "name": "spendia", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts.backup": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint", + "husky-prepare": "husky install" + }, + "dependencies": { + "next": "^13.2.4", + "react": "^18.2.0", + "react-chartjs-2": "^5.2.0", + "react-dom": "^18.2.0", + "react-google-charts": "^4.0.0", + "styled-components": "^5.3.9", + "zustand": "^4.3.7" + }, + "devDependencies": { + "@types/node": "18.15.11", + "@types/react": "^18.0.28", + "@types/react-dom": "^18.0.11", + "@types/styled-components": "^5.1.26", + "@typescript-eslint/eslint-plugin": "^5.43.0", + "@vitejs/plugin-react": "^3.1.0", + "babel-plugin-styled-components": "^2.0.7", + "typescript": "^5.0.4", + "vite": "^4.2.0" + }, + "resolutions": { + "styled-components": "^5" + }, + "babel": { + "env": { + "development": { + "presets": [ + "next/babel" + ], + "plugins": [ + [ + "styled-components", + { + "ssr": true, + "displayName": true + } + ] + ] + }, + "production": { + "presets": [ + "next/babel" + ], + "plugins": [ + [ + "styled-components", + { + "ssr": true, + "displayName": false + } + ] + ] + } + } + } +} diff --git a/pages/_app.js b/packages/client/pages/_app.js similarity index 100% rename from pages/_app.js rename to packages/client/pages/_app.js diff --git a/pages/index.css b/packages/client/pages/index.css similarity index 100% rename from pages/index.css rename to packages/client/pages/index.css diff --git a/pages/index.tsx b/packages/client/pages/index.tsx similarity index 100% rename from pages/index.tsx rename to packages/client/pages/index.tsx diff --git a/packages/client/pages/normalize.css b/packages/client/pages/normalize.css new file mode 100644 index 0000000..0744144 --- /dev/null +++ b/packages/client/pages/normalize.css @@ -0,0 +1,355 @@ +/* stylelint-disable font-family-no-duplicate-names */ +/* stylelint-disable property-no-vendor-prefix */ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +body { + margin: 0; +} + +/** + * Render the `main` element consistently in IE. + */ + +main { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove the border on images inside links in IE 10. + */ + +img { + border-style: none; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { + /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { + /* 1 */ + text-transform: none; +} + +/** + * Correct the inability to style clickable types in iOS and Safari. + */ + +button, +[type='button'], +[type='reset'], +[type='submit'] { + -webkit-appearance: button; + appearance: button; +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type='button']::-moz-focus-inner, +[type='reset']::-moz-focus-inner, +[type='submit']::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type='button']:-moz-focusring, +[type='reset']:-moz-focusring, +[type='submit']:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. + */ + +[type='checkbox'], +[type='radio'] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type='number']::-webkit-inner-spin-button, +[type='number']::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type='search'] { + -webkit-appearance: textfield; /* 1 */ + appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ + +[type='search']::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Misc + ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { + display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; +} diff --git a/packages/client/screens/.DS_Store b/packages/client/screens/.DS_Store new file mode 100644 index 0000000..d971592 Binary files /dev/null and b/packages/client/screens/.DS_Store differ diff --git a/screens/Header/Header.tsx b/packages/client/screens/Header/Header.tsx similarity index 100% rename from screens/Header/Header.tsx rename to packages/client/screens/Header/Header.tsx diff --git a/screens/Header/data.ts b/packages/client/screens/Header/data.ts similarity index 100% rename from screens/Header/data.ts rename to packages/client/screens/Header/data.ts diff --git a/screens/Header/index.ts b/packages/client/screens/Header/index.ts similarity index 100% rename from screens/Header/index.ts rename to packages/client/screens/Header/index.ts diff --git a/screens/SpendScreen/SpendScreen.tsx b/packages/client/screens/SpendScreen/SpendScreen.tsx similarity index 100% rename from screens/SpendScreen/SpendScreen.tsx rename to packages/client/screens/SpendScreen/SpendScreen.tsx diff --git a/screens/SpendScreen/index.ts b/packages/client/screens/SpendScreen/index.ts similarity index 100% rename from screens/SpendScreen/index.ts rename to packages/client/screens/SpendScreen/index.ts diff --git a/screens/index.ts b/packages/client/screens/index.ts similarity index 100% rename from screens/index.ts rename to packages/client/screens/index.ts diff --git a/tsconfig.eslint.json b/packages/client/tsconfig.eslint.json similarity index 100% rename from tsconfig.eslint.json rename to packages/client/tsconfig.eslint.json diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json new file mode 100644 index 0000000..6bfd9af --- /dev/null +++ b/packages/client/tsconfig.json @@ -0,0 +1,33 @@ +{ + "extends": "../../tsconfig.json", + "files": [], + "compilerOptions": { + "composite": true, + "target": "ESNext", + "useDefineForClassFields": true, + "lib": ["DOM", "DOM.Iterable", "ESNext"], + "allowJs": false, + "skipLibCheck": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "module": "ESNext", + "moduleResolution": "Node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "incremental": true, + "baseUrl": ".", + "paths": { + "@/*": ["./*"] + } + }, + "include": ["next-env.d.ts", "pages", "components", "screens", "lib"], + "references": [ + { + "path": "./tsconfig.node.json" + } + ], + "exclude": ["node_modules"] +} diff --git a/tsconfig.node.json b/packages/client/tsconfig.node.json similarity index 100% rename from tsconfig.node.json rename to packages/client/tsconfig.node.json diff --git a/packages/client/tsconfig.node.tsbuildinfo b/packages/client/tsconfig.node.tsbuildinfo new file mode 100644 index 0000000..33203d7 --- /dev/null +++ b/packages/client/tsconfig.node.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../../node_modules/typescript/lib/lib.d.ts","../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../node_modules/typescript/lib/lib.scripthost.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","./vite.config.ts","./node_modules/@types/hoist-non-react-statics/index.d.ts","./node_modules/@types/json-schema/index.d.ts","./node_modules/@types/json5/index.d.ts","./node_modules/@types/minimist/index.d.ts","./node_modules/@types/normalize-package-data/index.d.ts","./node_modules/@types/prop-types/index.d.ts","./node_modules/@types/scheduler/index.d.ts","./node_modules/@types/semver/classes/semver.d.ts","./node_modules/@types/semver/functions/parse.d.ts","./node_modules/@types/semver/functions/valid.d.ts","./node_modules/@types/semver/functions/clean.d.ts","./node_modules/@types/semver/functions/inc.d.ts","./node_modules/@types/semver/functions/diff.d.ts","./node_modules/@types/semver/functions/major.d.ts","./node_modules/@types/semver/functions/minor.d.ts","./node_modules/@types/semver/functions/patch.d.ts","./node_modules/@types/semver/functions/prerelease.d.ts","./node_modules/@types/semver/functions/compare.d.ts","./node_modules/@types/semver/functions/rcompare.d.ts","./node_modules/@types/semver/functions/compare-loose.d.ts","./node_modules/@types/semver/functions/compare-build.d.ts","./node_modules/@types/semver/functions/sort.d.ts","./node_modules/@types/semver/functions/rsort.d.ts","./node_modules/@types/semver/functions/gt.d.ts","./node_modules/@types/semver/functions/lt.d.ts","./node_modules/@types/semver/functions/eq.d.ts","./node_modules/@types/semver/functions/neq.d.ts","./node_modules/@types/semver/functions/gte.d.ts","./node_modules/@types/semver/functions/lte.d.ts","./node_modules/@types/semver/functions/cmp.d.ts","./node_modules/@types/semver/functions/coerce.d.ts","./node_modules/@types/semver/classes/comparator.d.ts","./node_modules/@types/semver/classes/range.d.ts","./node_modules/@types/semver/functions/satisfies.d.ts","./node_modules/@types/semver/ranges/max-satisfying.d.ts","./node_modules/@types/semver/ranges/min-satisfying.d.ts","./node_modules/@types/semver/ranges/to-comparators.d.ts","./node_modules/@types/semver/ranges/min-version.d.ts","./node_modules/@types/semver/ranges/valid.d.ts","./node_modules/@types/semver/ranges/outside.d.ts","./node_modules/@types/semver/ranges/gtr.d.ts","./node_modules/@types/semver/ranges/ltr.d.ts","./node_modules/@types/semver/ranges/intersects.d.ts","./node_modules/@types/semver/ranges/simplify.d.ts","./node_modules/@types/semver/ranges/subset.d.ts","./node_modules/@types/semver/internals/identifiers.d.ts","./node_modules/@types/semver/index.d.ts"],"fileInfos":["a7297ff837fcdf174a9524925966429eb8e5feecc2cc55cc06574e6b092c1eaa",{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true},{"version":"3dda5344576193a4ae48b8d03f105c86f20b2f2aff0a1d1fd7935f5d68649654","affectsGlobalScope":true},{"version":"c5c5565225fce2ede835725a92a28ece149f83542aa4866cfb10290bff7b8996","affectsGlobalScope":true},{"version":"7d2dbc2a0250400af0809b0ad5f84686e84c73526de931f84560e483eb16b03c","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"3bba390990c78dbabc1a61123c18f30c76618666b4d9aa646bf03b96c2e52c53","bfe1b52cf71aea9bf8815810cc5d9490fa9617313e3d3c2ee3809a28b80d0bb4","f3e604694b624fa3f83f6684185452992088f5efb2cf136b62474aa106d6f1b6","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","6a386ff939f180ae8ef064699d8b7b6e62bc2731a62d7fbf5e02589383838dea","7ccce4adb23a87a044c257685613126b47160f6975b224cea5f6af36c7f37514","2b93035328f7778d200252681c1d86285d501ed424825a18f81e4c3028aa51d9","2ac9c8332c5f8510b8bdd571f8271e0f39b0577714d5e95c1e79a12b2616f069","42c21aa963e7b86fa00801d96e88b36803188018d5ad91db2a9101bccd40b3ff","d31eb848cdebb4c55b4893b335a7c0cca95ad66dee13cbb7d0893810c0a9c301","77c1d91a129ba60b8c405f9f539e42df834afb174fe0785f89d92a2c7c16b77a","7a9e0a564fee396cacf706523b5aeed96e04c6b871a8bebefad78499fbffc5bc","906c751ef5822ec0dadcea2f0e9db64a33fb4ee926cc9f7efa38afe5d5371b2a","5387c049e9702f2d2d7ece1a74836a14b47fbebe9bbeb19f94c580a37c855351","c68391fb9efad5d99ff332c65b1606248c4e4a9f1dd9a087204242b56c7126d6","e9cf02252d3a0ced987d24845dcb1f11c1be5541f17e5daa44c6de2d18138d0c","e8b02b879754d85f48489294f99147aeccc352c760d95a6fe2b6e49cd400b2fe","9f6908ab3d8a86c68b86e38578afc7095114e66b2fc36a2a96e9252aac3998e0","0eedb2344442b143ddcd788f87096961cd8572b64f10b4afc3356aa0460171c6","71405cc70f183d029cc5018375f6c35117ffdaf11846c35ebf85ee3956b1b2a6","c68baff4d8ba346130e9753cefe2e487a16731bf17e05fdacc81e8c9a26aae9d","2cd15528d8bb5d0453aa339b4b52e0696e8b07e790c153831c642c3dea5ac8af","479d622e66283ffa9883fbc33e441f7fc928b2277ff30aacbec7b7761b4e9579","ade307876dc5ca267ca308d09e737b611505e015c535863f22420a11fffc1c54","f8cdefa3e0dee639eccbe9794b46f90291e5fd3989fcba60d2f08fde56179fb9","86c5a62f99aac7053976e317dbe9acb2eaf903aaf3d2e5bb1cafe5c2df7b37a8","2b300954ce01a8343866f737656e13243e86e5baef51bd0631b21dcef1f6e954","a2d409a9ffd872d6b9d78ead00baa116bbc73cfa959fce9a2f29d3227876b2a1","b288936f560cd71f4a6002953290de9ff8dfbfbf37f5a9391be5c83322324898","61178a781ef82e0ff54f9430397e71e8f365fc1e3725e0e5346f2de7b0d50dfa","6a6ccb37feb3aad32d9be026a3337db195979cd5727a616fc0f557e974101a54","c649ea79205c029a02272ef55b7ab14ada0903db26144d2205021f24727ac7a3","38e2b02897c6357bbcff729ef84c736727b45cc152abe95a7567caccdfad2a1d","d6610ea7e0b1a7686dba062a1e5544dd7d34140f4545305b7c6afaebfb348341","3dee35db743bdba2c8d19aece7ac049bde6fa587e195d86547c882784e6ba34c","b15e55c5fa977c2f25ca0b1db52cfa2d1fd4bf0baf90a8b90d4a7678ca462ff1","f41d30972724714763a2698ae949fbc463afb203b5fa7c4ad7e4de0871129a17","843dd7b6a7c6269fd43827303f5cbe65c1fecabc30b4670a50d5a15d57daeeb9","f06d8b8567ee9fd799bf7f806efe93b67683ef24f4dea5b23ef12edff4434d9d","6017384f697ff38bc3ef6a546df5b230c3c31329db84cbfe686c83bec011e2b2","e1a5b30d9248549ca0c0bb1d653bafae20c64c4aa5928cc4cd3017b55c2177b0","a593632d5878f17295bd53e1c77f27bf4c15212822f764a2bfc1702f4b413fa0","a868a534ba1c2ca9060b8a13b0ffbbbf78b4be7b0ff80d8c75b02773f7192c29","da7545aba8f54a50fde23e2ede00158dc8112560d934cee58098dfb03aae9b9d","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","6aee496bf0ecfbf6731aa8cca32f4b6e92cdc0a444911a7d88410408a45ecc5d"],"root":[8],"options":{"allowSyntheticDefaultImports":true,"composite":true,"module":99},"fileIdsList":[[16,55],[16,40,55],[55],[16],[16,41,55],[16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54],[41,55]],"referencedMap":[[40,1],[41,2],[16,3],[19,3],[38,1],[39,1],[29,1],[28,4],[26,1],[21,1],[34,1],[32,1],[36,1],[20,1],[33,1],[37,1],[22,1],[23,1],[35,1],[17,1],[24,1],[25,1],[27,1],[31,1],[42,5],[30,1],[18,1],[55,6],[49,5],[51,7],[50,5],[43,5],[44,5],[46,5],[48,5],[52,7],[53,7],[45,7],[47,7]],"exportedModulesMap":[[40,1],[41,2],[16,3],[19,3],[38,1],[39,1],[29,1],[28,4],[26,1],[21,1],[34,1],[32,1],[36,1],[20,1],[33,1],[37,1],[22,1],[23,1],[35,1],[17,1],[24,1],[25,1],[27,1],[31,1],[42,5],[30,1],[18,1],[55,6],[49,5],[51,7],[50,5],[43,5],[44,5],[46,5],[48,5],[52,7],[53,7],[45,7],[47,7]],"semanticDiagnosticsPerFile":[1,6,7,3,2,5,4,[9,[{"file":"./node_modules/@types/hoist-non-react-statics/index.d.ts","start":344,"length":7,"messageText":"Cannot find module 'react' or its corresponding type declarations.","category":1,"code":2307}]],10,11,12,13,[14,[{"file":"./node_modules/@types/prop-types/index.d.ts","start":723,"length":8,"messageText":"Cannot find name 'Iterable'.","category":1,"code":2304}]],15,40,41,16,19,38,39,29,28,26,21,34,32,36,20,33,37,22,23,35,17,24,25,27,31,42,30,18,55,54,49,51,50,43,44,46,48,52,53,45,47,[8,[{"file":"./vite.config.ts","start":29,"length":6,"messageText":"Cannot find module 'vite' or its corresponding type declarations.","category":1,"code":2307},{"file":"./vite.config.ts","start":55,"length":22,"messageText":"Cannot find module '@vitejs/plugin-react' or its corresponding type declarations.","category":1,"code":2307}]]],"affectedFilesPendingEmit":[8],"emitSignatures":[8]},"version":"5.1.6"} \ No newline at end of file diff --git a/vite.config.ts b/packages/client/vite.config.ts similarity index 100% rename from vite.config.ts rename to packages/client/vite.config.ts diff --git a/packages/server/db.ts b/packages/server/db.ts new file mode 100644 index 0000000..6814cbf --- /dev/null +++ b/packages/server/db.ts @@ -0,0 +1,18 @@ +interface User { + id: string; + name: string; +} + +// Imaginary database +const users: User[] = []; +export const db = { + user: { + create: async (data: { name: string }) => { + const user = { id: String(users.length + 1), ...data }; + users.push(user); + return user; + }, + findById: async (id: string) => users.find((user) => user.id === id), + findMany: async () => users, + }, +}; diff --git a/packages/server/index.ts b/packages/server/index.ts new file mode 100644 index 0000000..5899aff --- /dev/null +++ b/packages/server/index.ts @@ -0,0 +1,27 @@ +import { z } from 'zod'; +import { createHTTPServer } from '@trpc/server/adapters/standalone'; +import { db } from './db'; +import { publicProcedure, router } from './trpc'; +const appRouter = router({ + userById: publicProcedure.input(z.string()).query(async (opts) => { + const { input } = opts; + const user = await db.user.findById(input); + return user; + }), + userCreate: publicProcedure.input(z.object({ name: z.string() })).mutation(async ({ input }) => { + const user = await db.user.create(input); + return user; + }), + userList: publicProcedure.query(async () => { + const users = await db.user.findMany(); + return users; + }), +}); + +const server = createHTTPServer({ + router: appRouter, +}); + +server.listen(3000); + +export type AppRouter = typeof appRouter; diff --git a/packages/server/package.json b/packages/server/package.json new file mode 100644 index 0000000..b4a2fa3 --- /dev/null +++ b/packages/server/package.json @@ -0,0 +1,13 @@ +{ + "name": "@monorepo/server", + "version": "1.0.0", + "description": "", + "main": "index.js", + "devDependencies": {}, + "scripts": { + "dev": "echo 'abc'", + "build": "tsc --build" + }, + "author": "", + "license": "ISC" +} diff --git a/packages/server/trpc.ts b/packages/server/trpc.ts new file mode 100644 index 0000000..0db673e --- /dev/null +++ b/packages/server/trpc.ts @@ -0,0 +1,6 @@ +import { initTRPC } from '@trpc/server'; + +const t = initTRPC.create(); + +export const router = t.router; +export const publicProcedure = t.procedure; diff --git a/packages/server/tsconfig.json b/packages/server/tsconfig.json new file mode 100644 index 0000000..67668e5 --- /dev/null +++ b/packages/server/tsconfig.json @@ -0,0 +1,111 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs" /* Specify what module code is generated. */, + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ + // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ + // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ + // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, + + /* Type Checking */ + "strict": true /* Enable all strict type-checking options. */, + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "include": ["*"] +} diff --git a/tsconfig.json b/tsconfig.json index 6dc728a..20a99e1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,31 +1,115 @@ { "compilerOptions": { - "target": "ESNext", - "useDefineForClassFields": true, - "lib": ["DOM", "DOM.Iterable", "ESNext"], - "allowJs": false, - "skipLibCheck": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "module": "ESNext", - "moduleResolution": "Node", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "jsx": "preserve", - "incremental": true, - "baseUrl": ".", - "paths": { - "@/*": ["*"] - } + "composite": true, + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs" /* Specify what module code is generated. */, + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ + // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ + // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ + // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, + + /* Type Checking */ + "strict": true /* Enable all strict type-checking options. */, + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ }, - "include": ["next-env.d.ts", "pages", "components", "screens", "lib"], - "references": [ - { - "path": "./tsconfig.node.json" - } - ], - "exclude": ["node_modules"] + "include": ["**/*"] + // "references": [ + // { "path": "./packages/client/tsconfig.json" }, + // { "path": "./packages/server/tsconfig.json" } + // ] }