Tech Stack of this Project:
- Frontend and Backend - Next.js (or Backend)
- Express - Auxilary backends
- Turborepo
- Postgres Database
- Prisma ORM
- Tailwind
- Bootstrap Turborepo Project
- Made user-app, merchant-app folder in apps
- Tailwind added
- Get boilerplate commands from tailwind website
- Configure the tailwind.config file
- Adding Prisma
- Make a db folder in packages
- Initialize npm and ts
- Get a connection string from neon or aiven (I've used docker postgres container in developement)
- Initialize Prisma and check the database running...
- DB
- Made model User, Merchant
- Migrated and created prisma client
- Made some ui components (easy for tests)
- Created auth endpoint and logic using nextauth in user(credentials login) and merchant(google login)
- Created Store (recoil) atoms, hooks
- On Ramping("Onramp to bank" typically refers to the process or method by which users can convert or transfer funds from a digital or non-traditional currency (such as cryptocurrency) into traditional fiat currency that can be deposited into a bank account):
- Make a new backend server to stimulate OnRamp Transaction. (lets say Hdfc, tells that user charged 2000 and send to, lets say propayn kotak bank, then we can credit 2000 to user propayn wallet.)
- Create a dummy bank server with an endpoint
- Created transfer ui
- Finished Onramp action for onclick of transfer.
- Simulating the bank webhook which on hitting success the request and amount added to the wallet.
- Created a Sidebar, P2P Transfer and /p2p ui.
- Created action to make person to person payment through the phone number that is already present in the database.
- BUG FIX: Parallel transfers from the wallet restricted through locking the row until transaction completes. (Prisma doesnt support lock, which is why we send a raw sql query directly that will lock the specific row, until the txn succeeds or fails) Thats how I've done balance protection.
- Added P2P ledger schema to schema.prisma
- Created action to fetch OnRamp Transactions
- Created action to fetch P2P Transactions
- Completey made new UI for dashboard, transfer and paypage
- Fully Functional UI Version 1 with features: add balance, transfer person to person
- Started testing Edge Cases
This is an official starter Turborepo.
Run the following command:
npx create-turbo@latestThis Turborepo includes the following packages/apps:
docs: a Next.js appweb: another Next.js app@repo/ui: a stub React component library shared by bothwebanddocsapplications@repo/eslint-config:eslintconfigurations (includeseslint-config-nextandeslint-config-prettier)@repo/typescript-config:tsconfig.jsons used throughout the monorepo
Each package/app is 100% TypeScript.
This Turborepo has some additional tools already setup for you:
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
To build all apps and packages, run the following command:
cd my-turborepo
pnpm build
To develop all apps and packages, run the following command:
cd my-turborepo
pnpm dev
Turborepo can use a technique known as Remote Caching to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can create one, then enter the following commands:
cd my-turborepo
npx turbo login
This will authenticate the Turborepo CLI with your Vercel account.
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
npx turbo link
Learn more about the power of Turborepo: