├── .npmrc ├── apps ├── user-app │ ├── app │ │ ├── page.module.css │ │ ├── favicon.ico │ │ ├── api │ │ │ ├── auth │ │ │ │ └── [...nextauth] │ │ │ │ │ └── route.ts │ │ │ ├── numbers │ │ │ │ └── route.ts │ │ │ └── user │ │ │ │ └── route.ts │ │ ├── Bank │ │ │ ├── axis │ │ │ │ └── page.tsx │ │ │ └── hdfc │ │ │ │ └── page.tsx │ │ ├── test │ │ │ └── page.tsx │ │ ├── home │ │ │ └── page.tsx │ │ ├── page.tsx │ │ ├── globals.css │ │ ├── (dashboard) │ │ │ ├── p2p │ │ │ │ └── page.tsx │ │ │ ├── transfer │ │ │ │ └── page.tsx │ │ │ ├── layout.tsx │ │ │ ├── transactions │ │ │ │ └── page.tsx │ │ │ ├── dashboard │ │ │ │ └── page.tsx │ │ │ └── contact │ │ │ │ └── page.tsx │ │ ├── layout.tsx │ │ ├── lib │ │ │ ├── actions │ │ │ │ ├── P2Ptransfer.tsx │ │ │ │ └── createOnRampTxn.ts │ │ │ └── auth.ts │ │ ├── auth │ │ │ └── page.tsx │ │ ├── privacy │ │ │ └── page.tsx │ │ └── terms │ │ │ └── page.tsx │ ├── .env.example │ ├── assests │ │ ├── axisLogo.png │ │ └── HDFC-Bank-Logo.png │ ├── postcss.config.js │ ├── next.config.js │ ├── next-env.d.ts │ ├── .eslintrc.js │ ├── provider.tsx │ ├── tailwind.config.js │ ├── tsconfig.json │ ├── AppbarClient.tsx │ ├── ClientWrapper.tsx │ ├── components │ │ ├── BalanceCard.tsx │ │ ├── SiderBarItem.tsx │ │ ├── NumberList.tsx │ │ ├── AddMoneyCard.tsx │ │ ├── MobileNav.tsx │ │ ├── OnRampTransaction.tsx │ │ ├── SendCard.tsx │ │ ├── HdfcBank.tsx │ │ ├── AxisBank.tsx │ │ └── HeroSection.tsx │ ├── README.md │ ├── package.json │ └── providers │ │ └── LenisProvider.tsx ├── Bank-WebHook │ ├── .env.example │ ├── tsconfig.json │ ├── vercel.json │ ├── package.json │ └── src │ │ └── index.ts └── merchant-app │ ├── app │ ├── favicon.ico │ ├── page.tsx │ ├── api │ │ └── auth │ │ │ └── [...nextauth] │ │ │ └── route.ts │ ├── globals.css │ ├── layout.tsx │ └── page.module.css │ ├── postcss.config.js │ ├── next.config.js │ ├── .env.example │ ├── next-env.d.ts │ ├── .eslintrc.js │ ├── provider.tsx │ ├── tailwind.config.js │ ├── tsconfig.json │ ├── package.json │ ├── README.md │ └── lib │ └── auth.ts ├── tsconfig.json ├── packages ├── db │ ├── .gitignore │ ├── .env.example │ ├── prisma │ │ ├── migrations │ │ │ ├── migration_lock.toml │ │ │ └── 20241122045410_whole │ │ │ │ └── migration.sql │ │ ├── seed.ts │ │ └── schema.prisma │ ├── tsconfig.json │ ├── package.json │ └── index.ts ├── eslint-config │ ├── README.md │ ├── package.json │ ├── library.js │ ├── next.js │ └── react-internal.js ├── store │ ├── src │ │ ├── atoms │ │ │ └── balance.ts │ │ └── hooks │ │ │ └── useBalance.ts │ ├── tsconfig.json │ └── package.json ├── ui │ ├── tsconfig.json │ ├── tsconfig.lint.json │ ├── src │ │ ├── code.tsx │ │ ├── Center.tsx │ │ ├── card.tsx │ │ ├── button.tsx │ │ ├── Select.tsx │ │ ├── Textinput.tsx │ │ ├── Appbar.tsx │ │ └── Footer.tsx │ ├── turbo │ │ └── generators │ │ │ ├── templates │ │ │ └── component.hbs │ │ │ └── config.ts │ ├── .eslintrc.js │ └── package.json └── typescript-config │ ├── package.json │ ├── react-library.json │ ├── nextjs.json │ └── base.json ├── .github ├── ISSUE_TEMPLATE │ ├── custom.md │ ├── feature_request.md │ └── bug_report.md └── workflows │ ├── build.yml │ └── deploy.yml ├── .eslintrc.js ├── docker └── Dockerfile.user ├── turbo.json ├── .gitignore ├── package.json ├── LICENSE ├── CHANGELOG.md ├── SECURITY.md ├── CONTRIBUTING.md └── README.md /.npmrc: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/user-app/app/page.module.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/Bank-WebHook/.env.example: -------------------------------------------------------------------------------- 1 | PORT=3003 -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/base.json" 3 | } 4 | -------------------------------------------------------------------------------- /apps/user-app/.env.example: -------------------------------------------------------------------------------- 1 | JWT_SECRET=test 2 | NEXTAUTH_URL=http://localhost:3001 -------------------------------------------------------------------------------- /packages/db/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | # Keep environment variables out of version control 3 | .env 4 | -------------------------------------------------------------------------------- /apps/user-app/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PankajKumardev/Flowpay/HEAD/apps/user-app/app/favicon.ico -------------------------------------------------------------------------------- /packages/eslint-config/README.md: -------------------------------------------------------------------------------- 1 | # `@turbo/eslint-config` 2 | 3 | Collection of internal eslint configurations. 4 | -------------------------------------------------------------------------------- /packages/db/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL = "postgresql://postgres:mysecretpassword@localhost:5432/postgres?sslmode=disable" -------------------------------------------------------------------------------- /apps/merchant-app/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PankajKumardev/Flowpay/HEAD/apps/merchant-app/app/favicon.ico -------------------------------------------------------------------------------- /apps/user-app/assests/axisLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PankajKumardev/Flowpay/HEAD/apps/user-app/assests/axisLogo.png -------------------------------------------------------------------------------- /apps/user-app/assests/HDFC-Bank-Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PankajKumardev/Flowpay/HEAD/apps/user-app/assests/HDFC-Bank-Logo.png -------------------------------------------------------------------------------- /apps/user-app/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /apps/merchant-app/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /apps/user-app/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | module.exports = { 3 | transpilePackages: ["@repo/ui"], 4 | }; 5 | -------------------------------------------------------------------------------- /apps/merchant-app/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | module.exports = { 3 | transpilePackages: ["@repo/ui"], 4 | }; 5 | -------------------------------------------------------------------------------- /packages/store/src/atoms/balance.ts: -------------------------------------------------------------------------------- 1 | import { atom } from "recoil"; 2 | 3 | export const balanceAtom = atom({ 4 | key: "balance", 5 | default: 0, 6 | }); 7 | -------------------------------------------------------------------------------- /packages/db/prisma/migrations/migration_lock.toml: -------------------------------------------------------------------------------- 1 | # Please do not edit this file manually 2 | # It should be added in your version-control system (i.e. Git) 3 | provider = "postgresql" -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /apps/Bank-WebHook/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends" : "@repo/typescript-config/base.json", 3 | "compilerOptions": { 4 | "outDir": "./dist" 5 | }, 6 | "include": ["src"], 7 | "exclude": ["node_modules, dist"] 8 | } -------------------------------------------------------------------------------- /apps/merchant-app/app/page.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { useBalance } from "@repo/store/balance"; 4 | 5 | export default function () { 6 | const balance = useBalance(); 7 | return
hi there {balance}
; 8 | } 9 | -------------------------------------------------------------------------------- /packages/store/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/react-library.json", 3 | "compilerOptions": { 4 | "outDir": "dist" 5 | }, 6 | "include": ["src"], 7 | "exclude": ["node_modules", "dist"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/react-library.json", 3 | "compilerOptions": { 4 | "outDir": "dist" 5 | }, 6 | "include": ["src"], 7 | "exclude": ["node_modules", "dist"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/db/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/react-library.json", 3 | "compilerOptions": { 4 | "outDir": "dist" 5 | }, 6 | "include": ["index.ts"], 7 | "exclude": ["node_modules", "dist"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/typescript-config/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@repo/typescript-config", 3 | "version": "0.0.0", 4 | "private": true, 5 | "license": "MIT", 6 | "publishConfig": { 7 | "access": "public" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /apps/user-app/app/api/auth/[...nextauth]/route.ts: -------------------------------------------------------------------------------- 1 | import NextAuth from "next-auth"; 2 | import { authOptions } from "../../../lib/auth"; 3 | 4 | const handler = NextAuth(authOptions); 5 | 6 | export { handler as GET, handler as POST }; 7 | -------------------------------------------------------------------------------- /packages/typescript-config/react-library.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "React Library", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "jsx": "react-jsx" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/ui/tsconfig.lint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/react-library.json", 3 | "compilerOptions": { 4 | "outDir": "dist" 5 | }, 6 | "include": ["src", "turbo"], 7 | "exclude": ["node_modules", "dist"] 8 | } 9 | -------------------------------------------------------------------------------- /apps/user-app/app/Bank/axis/page.tsx: -------------------------------------------------------------------------------- 1 | import AxisTransactionPage from "../../../components/AxisBank"; 2 | 3 | export default function AxisPage() { 4 | return ( 5 |
6 | 7 |
8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /apps/user-app/app/Bank/hdfc/page.tsx: -------------------------------------------------------------------------------- 1 | import HDFCTransactionPage from "../../../components/HdfcBank"; 2 | 3 | export default function AxisPage() { 4 | return ( 5 |
6 | 7 |
8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /packages/ui/src/code.tsx: -------------------------------------------------------------------------------- 1 | export function Code({ 2 | children, 3 | className, 4 | }: { 5 | children: React.ReactNode; 6 | className?: string; 7 | }): JSX.Element { 8 | return {children}; 9 | } 10 | -------------------------------------------------------------------------------- /apps/merchant-app/.env.example: -------------------------------------------------------------------------------- 1 | GOOGLE_CLIENT_ID=your-google-client-id 2 | GOOGLE_CLIENT_SECRET=your-google-client-secret 3 | GITHUB_CLIENT_ID=your-github-client-id 4 | GITHUB_CLIENT_SECRET=your-github-client-secret 5 | NEXTAUTH_SECRET=your-nextauth-secret -------------------------------------------------------------------------------- /packages/store/src/hooks/useBalance.ts: -------------------------------------------------------------------------------- 1 | import { useRecoilValue } from "recoil"; 2 | import { balanceAtom } from "../atoms/balance"; 3 | 4 | export const useBalance = () => { 5 | const value = useRecoilValue(balanceAtom); 6 | return value; 7 | }; 8 | -------------------------------------------------------------------------------- /apps/merchant-app/app/api/auth/[...nextauth]/route.ts: -------------------------------------------------------------------------------- 1 | import NextAuth from "next-auth"; 2 | import { authOptions } from "../../../../lib/auth"; 3 | 4 | //@ts-ignore 5 | const handler = NextAuth(authOptions); 6 | 7 | export { handler as GET, handler as POST }; -------------------------------------------------------------------------------- /packages/store/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@repo/store", 3 | "version": "1.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "recoil": "^0.7.7" 7 | }, 8 | "exports": { 9 | "./balance": "./src/hooks/useBalance.ts" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/user-app/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. 6 | -------------------------------------------------------------------------------- /packages/ui/turbo/generators/templates/component.hbs: -------------------------------------------------------------------------------- 1 | export const {{ pascalCase name }} = ({ children }: { children: React.ReactNode }) => { 2 | return ( 3 |
4 |

{{ pascalCase name }} Component

5 | {children} 6 |
7 | ); 8 | }; 9 | -------------------------------------------------------------------------------- /apps/merchant-app/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. 6 | -------------------------------------------------------------------------------- /apps/user-app/.eslintrc.js: -------------------------------------------------------------------------------- 1 | /** @type {import("eslint").Linter.Config} */ 2 | module.exports = { 3 | root: true, 4 | extends: ["@repo/eslint-config/next.js"], 5 | parser: "@typescript-eslint/parser", 6 | parserOptions: { 7 | project: true, 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /apps/merchant-app/.eslintrc.js: -------------------------------------------------------------------------------- 1 | /** @type {import("eslint").Linter.Config} */ 2 | module.exports = { 3 | root: true, 4 | extends: ["@repo/eslint-config/next.js"], 5 | parser: "@typescript-eslint/parser", 6 | parserOptions: { 7 | project: true, 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /packages/ui/src/Center.tsx: -------------------------------------------------------------------------------- 1 | export function Center({ 2 | children, 3 | }: { 4 | children: React.ReactNode; 5 | }): JSX.Element { 6 | return ( 7 |
8 |
{children}
9 |
10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /packages/ui/.eslintrc.js: -------------------------------------------------------------------------------- 1 | /** @type {import("eslint").Linter.Config} */ 2 | module.exports = { 3 | root: true, 4 | extends: ["@repo/eslint-config/react-internal.js"], 5 | parser: "@typescript-eslint/parser", 6 | parserOptions: { 7 | project: "./tsconfig.lint.json", 8 | tsconfigRootDir: __dirname, 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /apps/Bank-WebHook/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "builds": [ 3 | { 4 | "src": "apps/bank-webhook/src/index.ts", 5 | "use": "@vercel/node", 6 | "config": { 7 | "includeFiles": ["packages/db/**"] 8 | } 9 | } 10 | ], 11 | "routes": [ 12 | { "src": "/.*", "dest": "apps/bank-webhook/dist/index.js" } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /apps/merchant-app/provider.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | import { RecoilRoot } from "recoil"; 3 | import { SessionProvider } from "next-auth/react"; 4 | export const Providers = ({children}: {children: React.ReactNode}) => { 5 | return 6 | 7 | {children} 8 | 9 | 10 | } -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | // This configuration only applies to the package manager root. 2 | /** @type {import("eslint").Linter.Config} */ 3 | module.exports = { 4 | ignorePatterns: ["apps/**", "packages/**"], 5 | extends: ["@repo/eslint-config/library.js"], 6 | parser: "@typescript-eslint/parser", 7 | parserOptions: { 8 | project: true, 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /apps/user-app/app/test/page.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | import { Appbar } from "@repo/ui/appbar" 3 | import { signIn, signOut, useSession } from "next-auth/react"; 4 | 5 | const page = () => { 6 | const session = useSession(); 7 | return ( 8 | 9 | ) 10 | } 11 | 12 | export default page -------------------------------------------------------------------------------- /apps/user-app/provider.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | import { RecoilRoot } from "recoil"; 3 | import { SessionProvider } from "next-auth/react"; 4 | 5 | export const Providers = ({children}: {children: React.ReactNode}) => { 6 | return 7 | 8 | {children} 9 | 10 | 11 | } -------------------------------------------------------------------------------- /apps/user-app/app/home/page.tsx: -------------------------------------------------------------------------------- 1 | import { HeroSection } from "../../components/HeroSection"; 2 | import { Metadata } from "next"; 3 | 4 | export const metadata: Metadata = { 5 | title: "Home | Flowpay", 6 | description: "Welcome to the Flowpay digital wallet application", 7 | }; 8 | 9 | export default function Home() { 10 | 11 | return ; 12 | } 13 | -------------------------------------------------------------------------------- /docker/Dockerfile.user: -------------------------------------------------------------------------------- 1 | FROM node:20.12.0-alpine3.19 2 | 3 | WORKDIR /usr/src/app 4 | 5 | COPY package.json package-lock.json turbo.json tsconfig.json ./ 6 | 7 | COPY apps ./apps 8 | COPY packages ./packages 9 | 10 | # Install dependencies 11 | RUN npm install 12 | 13 | RUN npm run db:generate 14 | 15 | RUN npm run build 16 | 17 | CMD ["npm", "run", "start-user-app"] 18 | -------------------------------------------------------------------------------- /packages/ui/src/card.tsx: -------------------------------------------------------------------------------- 1 | export function Card({ 2 | title, 3 | children, 4 | }: { 5 | title: string; 6 | children?: React.ReactNode; 7 | }): JSX.Element { 8 | return ( 9 |
10 |

{title}

11 |
{children}
12 |
13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /apps/merchant-app/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: [ 4 | "./app/**/*.{js,ts,jsx,tsx,mdx}", 5 | "./pages/**/*.{js,ts,jsx,tsx,mdx}", 6 | "./components/**/*.{js,ts,jsx,tsx,mdx}", 7 | "../../packages/ui/**/*.{js,ts,jsx,tsx,mdx}" 8 | ], 9 | theme: { 10 | extend: {}, 11 | }, 12 | plugins: [], 13 | } -------------------------------------------------------------------------------- /packages/typescript-config/nextjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Next.js", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "plugins": [{ "name": "next" }], 7 | "module": "ESNext", 8 | "moduleResolution": "Bundler", 9 | "allowJs": true, 10 | "jsx": "preserve", 11 | "noEmit": true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /apps/user-app/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: [ 4 | "./app/**/*.{js,ts,jsx,tsx,mdx}", 5 | "./pages/**/*.{js,ts,jsx,tsx,mdx}", 6 | "./components/**/*.{js,ts,jsx,tsx,mdx}", 7 | "../../packages/ui/**/*.{js,ts,jsx,tsx,mdx}" 8 | ], 9 | theme: { 10 | extend: {}, 11 | }, 12 | plugins: [], 13 | } 14 | 15 | -------------------------------------------------------------------------------- /apps/user-app/app/page.tsx: -------------------------------------------------------------------------------- 1 | import { getServerSession } from "next-auth"; 2 | import { redirect } from "next/navigation"; 3 | import { authOptions } from "./lib/auth"; 4 | 5 | export default async function Page() { 6 | const session = await getServerSession(await authOptions); 7 | if (session?.user) { 8 | redirect("/dashboard"); 9 | } else { 10 | redirect("/home"); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /apps/merchant-app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "plugins": [ 5 | { 6 | "name": "next" 7 | } 8 | ] 9 | }, 10 | "include": [ 11 | "next-env.d.ts", 12 | "next.config.js", 13 | "**/*.ts", 14 | "**/*.tsx", 15 | ".next/types/**/*.ts" 16 | ], 17 | "exclude": ["node_modules"] 18 | } 19 | -------------------------------------------------------------------------------- /turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "globalDependencies": ["**/.env.*local"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "outputs": [".next/**", "!.next/cache/**"] 8 | }, 9 | "lint": { 10 | "dependsOn": ["^lint"] 11 | }, 12 | "dev": { 13 | "cache": false, 14 | "persistent": true 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /apps/user-app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/typescript-config/nextjs.json", 3 | "compilerOptions": { 4 | "plugins": [ 5 | { 6 | "name": "next" 7 | } 8 | ] 9 | }, 10 | "include": [ 11 | "next-env.d.ts", 12 | "next.config.js", 13 | "**/*.ts", 14 | "**/*.tsx", 15 | ".next/types/**/*.ts" 16 | , "components/MobileMenu.tsx" ], 17 | "exclude": ["node_modules"] 18 | } 19 | -------------------------------------------------------------------------------- /apps/merchant-app/app/globals.css: -------------------------------------------------------------------------------- 1 | 2 | @tailwind base; 3 | @tailwind components; 4 | @tailwind utilities; 5 | 6 | ::-webkit-scrollbar { 7 | width: 4px; 8 | } 9 | 10 | ::-webkit-scrollbar-track { 11 | background: #f1f1f1; 12 | } 13 | 14 | ::-webkit-scrollbar-thumb { 15 | background: #888; 16 | border-radius: 4px; 17 | } 18 | 19 | ::-webkit-scrollbar-thumb:hover { 20 | background: #555; 21 | } -------------------------------------------------------------------------------- /apps/user-app/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | html, 6 | body { 7 | height: 100%; 8 | } 9 | 10 | ::-webkit-scrollbar { 11 | width: 4px; 12 | } 13 | 14 | ::-webkit-scrollbar-track { 15 | background: #f1f1f1; 16 | } 17 | 18 | ::-webkit-scrollbar-thumb { 19 | background: #888; 20 | border-radius: 4px; 21 | } 22 | 23 | ::-webkit-scrollbar-thumb:hover { 24 | background: #555; 25 | } -------------------------------------------------------------------------------- /packages/db/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@repo/db", 3 | "version": "0.0.0", 4 | "dependencies": { 5 | "@prisma/client": "^5.22.0" 6 | }, 7 | "devDependencies": { 8 | "prisma": "^5.22.0" 9 | }, 10 | "exports": { 11 | "./client": "./index.ts" 12 | }, 13 | "prisma": { 14 | "seed": "ts-node prisma/seed.ts" 15 | }, 16 | "scripts": { 17 | "build": "tsc", 18 | "prepare": "npm run build" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/db/index.ts: -------------------------------------------------------------------------------- 1 | import { PrismaClient } from "@prisma/client"; 2 | 3 | const prismaClientSingleton = () => { 4 | return new PrismaClient(); 5 | }; 6 | 7 | declare global { 8 | var prismaGlobal: undefined | ReturnType; 9 | } 10 | 11 | const prisma: ReturnType = 12 | globalThis.prismaGlobal ?? prismaClientSingleton(); 13 | 14 | export default prisma; 15 | 16 | if (process.env.NODE_ENV !== "production") globalThis.prismaGlobal = prisma; 17 | -------------------------------------------------------------------------------- /packages/eslint-config/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@repo/eslint-config", 3 | "version": "0.0.0", 4 | "private": true, 5 | "files": [ 6 | "library.js", 7 | "next.js", 8 | "react-internal.js" 9 | ], 10 | "devDependencies": { 11 | "@vercel/style-guide": "^5.2.0", 12 | "eslint-config-turbo": "^1.12.4", 13 | "eslint-config-prettier": "^9.1.0", 14 | "eslint-plugin-only-warn": "^1.1.0", 15 | "@typescript-eslint/parser": "^7.1.0", 16 | "@typescript-eslint/eslint-plugin": "^7.1.0", 17 | "typescript": "^5.3.3" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/ui/src/button.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { ReactNode } from "react"; 4 | 5 | interface ButtonProps { 6 | children: ReactNode; 7 | onClick: () => void; 8 | } 9 | 10 | export const Button = ({ onClick, children }: ButtonProps) => { 11 | return ( 12 | 19 | ); 20 | }; 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # Dependencies 4 | node_modules 5 | .pnp 6 | .pnp.js 7 | 8 | # Local env files 9 | .env 10 | .env.local 11 | .env.development.local 12 | .env.test.local 13 | .env.production.local 14 | 15 | # Testing 16 | coverage 17 | 18 | # Turbo 19 | .turbo 20 | 21 | # Vercel 22 | .vercel 23 | 24 | # Build Outputs 25 | .next/ 26 | out/ 27 | build 28 | dist 29 | 30 | 31 | # Debug 32 | npm-debug.log* 33 | yarn-debug.log* 34 | yarn-error.log* 35 | 36 | # Misc 37 | .DS_Store 38 | *.pem 39 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build on PR 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v3 13 | 14 | - name: Use Node.js 15 | uses: actions/setup-node@v3 16 | with: 17 | node-version: "20" 18 | 19 | - name: Install Dependencies 20 | run: npm install 21 | 22 | - name: Generate prisma client 23 | run: npm run db:generate 24 | 25 | - name: Run Build 26 | run: npm run build 27 | -------------------------------------------------------------------------------- /apps/user-app/AppbarClient.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { signIn, signOut, useSession } from "next-auth/react"; 3 | import { Appbar } from "@repo/ui/appbar"; 4 | import { useRouter } from "next/navigation"; 5 | 6 | export function AppbarClient() { 7 | const session = useSession(); 8 | const router = useRouter(); 9 | return ( 10 |
11 | { 14 | await signOut(); 15 | router.push("/home"); 16 | }} 17 | user={session.data?.user} 18 | /> 19 |
20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /apps/user-app/app/api/numbers/route.ts: -------------------------------------------------------------------------------- 1 | import prisma from '@repo/db/client'; 2 | import { NextResponse } from 'next/server'; 3 | 4 | export async function GET(request: Request) { 5 | const { searchParams } = new URL(request.url); 6 | const search = searchParams.get('search') || ''; 7 | 8 | const numbers = await prisma.user.findMany({ 9 | where: { 10 | number: { 11 | contains: search, // Filtering numbers based on user input 12 | }, 13 | }, 14 | select: { 15 | number: true, 16 | }, 17 | }); 18 | 19 | return NextResponse.json({ numbers }); 20 | } 21 | -------------------------------------------------------------------------------- /apps/Bank-WebHook/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bank-webhook", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "npx esbuild ./src/index.ts --bundle --platform=node --outfile=dist/index.js", 8 | "start": "node dist/index.js", 9 | "dev": "npm run build && npm run start" 10 | }, 11 | "keywords": [], 12 | "author": "", 13 | "license": "ISC", 14 | "dependencies": { 15 | "@repo/db": "*", 16 | "@types/express": "^4.17.21", 17 | "esbuild": "^0.20.2", 18 | "express": "^4.19.1" 19 | }, 20 | "devDependencies": { 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/typescript-config/base.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Default", 4 | "compilerOptions": { 5 | "declaration": true, 6 | "declarationMap": true, 7 | "esModuleInterop": true, 8 | "incremental": false, 9 | "isolatedModules": true, 10 | "lib": ["es2022", "DOM", "DOM.Iterable"], 11 | "module": "NodeNext", 12 | "moduleDetection": "force", 13 | "moduleResolution": "NodeNext", 14 | "noUncheckedIndexedAccess": true, 15 | "resolveJsonModule": true, 16 | "skipLibCheck": true, 17 | "strict": true, 18 | "target": "ES2022" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /apps/merchant-app/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import "./globals.css"; 2 | import type { Metadata } from "next"; 3 | import { Inter } from "next/font/google"; 4 | import { Providers } from "../provider"; 5 | 6 | const inter = Inter({ subsets: ["latin"] }); 7 | 8 | export const metadata: Metadata = { 9 | title: "Create Turborepo", 10 | description: "Generated by create turbo", 11 | }; 12 | 13 | export default function RootLayout({ 14 | children, 15 | }: { 16 | children: React.ReactNode; 17 | }): JSX.Element { 18 | return ( 19 | 20 | 21 | {children} 22 | 23 | 24 | ); 25 | } 26 | -------------------------------------------------------------------------------- /packages/ui/src/Select.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | export const Select = ({ 3 | options, 4 | onSelect, 5 | }: { 6 | options: { key: string; value: string }[]; 7 | onSelect: (value: string) => void; 8 | }) => { 9 | return ( 10 |
11 | 21 |
22 | ); 23 | }; 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /apps/user-app/ClientWrapper.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { usePathname } from "next/navigation"; 4 | import { AppbarClient } from "./AppbarClient"; 5 | import Footer from "@repo/ui/footer"; 6 | 7 | export default function ClientWrapper({ 8 | children, 9 | }: { 10 | children: React.ReactNode; 11 | }) { 12 | const pathname = usePathname(); 13 | 14 | const showAppbarAndFooter = 15 | pathname !== "/home" && 16 | pathname !== "/auth" && 17 | pathname !== "/Bank/hdfc" && 18 | pathname !== "/Bank/axis"; 19 | 20 | return ( 21 | <> 22 | {showAppbarAndFooter && } 23 | 24 | {children} 25 | 26 | {showAppbarAndFooter &&