diff --git a/.env b/.env deleted file mode 100644 index 60f2f96..0000000 --- a/.env +++ /dev/null @@ -1,28 +0,0 @@ -DB_USER= postgres -DB_HOST=localhost -DB_NAME=crowdFunding -DB_PASSWORD= 52019k -DB_PORT=5432 -JWT_SECRET=b1c912f5fa45f23f24fbcd0c1a9814d4779b62971405ab7b2c2ceb49f48d42e4 - -# This was inserted by `prisma init`: -# Environment variables declared in this file are automatically made available to Prisma. -# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema - -# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB. -# See the documentation for all the connection string options: https://pris.ly/d/connection-strings - -DATABASE_URL="postgresql://admin:123456@localhost:5432/goFund?schema=myschema&connection_limit=5&socket_timeout=3" - - -# bkash credentials for testing - -bkash_username = 'sandboxTokenizedUser02' -bkash_password = 'sandboxTokenizedUser02@12345' -bkash_api_key = '4f6o0cjiki2rfm34kfdadl1eqq' -bkash_secret_key = '2is7hdktrekvrbljjh44ll3d9l1dtjo4pasmjvs5vl5qr3fug4b' - -bkash_grant_token_url = https://tokenized.sandbox.bka.sh/v1.2.0-beta/tokenized/checkout/token/grant -bkash_create_payment_url = https://tokenized.sandbox.bka.sh/v1.2.0-beta/tokenized/checkout/create -bkash_execute_payment_url = https://tokenized.sandbox.bka.sh/v1.2.0-beta/tokenized/checkout/execute -bkash_refund_transaction_url = https://tokenized.sandbox.bka.sh/v1.2.0-beta/tokenized/checkout/payment/refund \ No newline at end of file diff --git a/README.md b/README.md index 7f2ae87..e69de29 100644 --- a/README.md +++ b/README.md @@ -1,47 +0,0 @@ -# tRPC + Express + React (with Vite) Scaffolding - -This is a minimal monorepo for Express.js as backend and React frontend with tRPC support. Which is can be used as a starting point for any express trpc react application, with prisma. - -## Clone and install dependencies 🏭 - -```bash -$ git clone https://github.com/trulymittal/t3-app-with-express-react-vite-trpc-prisma.git -$ cd t3-app-with-express-react-vite-trpc-prisma -$ npm i --workspaces -# Only if using the prisma ORM -$ npx prisma db push -``` - -## Why another tRPC + Express + React boilerplate generator ❓ - -1. Only installs the bare bones 💀 and "mostly" required dependencies whenever you try to start a new trpc express react application in a monorepo. -2. Example TODO router, i.e. CRUD operations are demonstrated on the frontend React and backend express application, to give you an idea of how trpc works - -## Quick Start 🏃♂️ - -The quickest way to get started is to clone the project and install the dependencies using: - -```bash -$ npm i --workspaces -$ npm run dev -``` - -## Author ✍️ - -[**Truly Mittal 🇮🇳**](https://trulymittal.com) - -## YouTube 📺 - -https://youtube.com/@mafiacodes - -## Donations 💰 - -https://paypal.me/trulymittal - -## License 🎫 - -[MIT](LICENSE) - -## Contribute 🤝 - -You can fork this repo and send me a PR. diff --git a/package-lock.json b/package-lock.json index 95daf72..9f1178a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,6 +41,16 @@ "node": ">=6.0.0" } }, + "node_modules/@ampproject/remapping/node_modules/@trpc/server": { + "version": "10.45.2", + "resolved": "https://registry.npmjs.org/@trpc/server/-/server-10.45.2.tgz", + "integrity": "sha512-wOrSThNNE4HUnuhJG6PfDRp4L2009KDVxsd+2VYH8ro6o/7/jwYZ8Uu5j+VaW+mOmc8EHerHzGcdbGNQSAUPgg==", + "dev": true, + "funding": [ + "https://trpc.io/sponsor" + ], + "license": "MIT" + }, "node_modules/@babel/code-frame": { "version": "7.26.2", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", @@ -1099,6 +1109,12 @@ "@types/node": "*" } }, + "node_modules/@types/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==", + "license": "MIT" + }, "node_modules/@types/cors": { "version": "2.8.17", "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz", @@ -2040,9 +2056,9 @@ } }, "node_modules/express": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", - "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "license": "MIT", "dependencies": { "accepts": "~1.3.8", @@ -2064,7 +2080,7 @@ "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.10", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", "qs": "6.13.0", "range-parser": "~1.2.1", @@ -2079,6 +2095,10 @@ }, "engines": { "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/express/node_modules/debug": { @@ -3195,9 +3215,9 @@ "dev": true }, "node_modules/path-to-regexp": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", - "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", "license": "MIT" }, "node_modules/pg": { @@ -3712,6 +3732,39 @@ "node": ">=0.10.0" } }, + "node_modules/react-router": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.0.2.tgz", + "integrity": "sha512-m5AcPfTRUcjwmhBzOJGEl6Y7+Crqyju0+TgTQxoS4SO+BkWbhOrcfZNq6wSWdl2BBbJbsAoBUb8ZacOFT+/JlA==", + "license": "MIT", + "dependencies": { + "@types/cookie": "^0.6.0", + "cookie": "^1.0.1", + "set-cookie-parser": "^2.6.0", + "turbo-stream": "2.4.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } + } + }, + "node_modules/react-router/node_modules/cookie": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz", + "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -3934,6 +3987,12 @@ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "license": "ISC" }, + "node_modules/set-cookie-parser": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", + "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", + "license": "MIT" + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -4294,6 +4353,12 @@ } } }, + "node_modules/turbo-stream": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/turbo-stream/-/turbo-stream-2.4.0.tgz", + "integrity": "sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==", + "license": "ISC" + }, "node_modules/type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -4602,6 +4667,7 @@ "@trpc/server": "^10.10.0", "react": "^18.2.0", "react-dom": "^18.2.0", + "react-router": "^7.0.2", "server": "^1.0.0" }, "devDependencies": { diff --git a/packages/client/index.html b/packages/client/index.html index e0d1c84..99825a9 100644 --- a/packages/client/index.html +++ b/packages/client/index.html @@ -7,7 +7,7 @@