diff --git a/README.md b/README.md index 95e4e00..6a496d6 100644 --- a/README.md +++ b/README.md @@ -7,4 +7,23 @@ - npm run build - npm run start -- npm run dev \ No newline at end of file +- npm run dev + + +## URls + +- For user +``` +http://localhost:3000/login +``` +- For admin + +``` +http://localhost:3000/administrator/login +``` + +- For E-mandate + +``` +http://localhost:3000/eMandate/login +``` \ No newline at end of file diff --git a/TODO.md b/TODO.md index fe2953f..fdbdb6c 100644 --- a/TODO.md +++ b/TODO.md @@ -15,8 +15,8 @@ - Limit of transaction daily --Asif - >Statement Download - >In Every OTP page "Resend button" & 3 min timing of expiry. -- OTP binding with actual mobile number. -- Beneficiary delete feature +- >OTP binding with actual mobile number. +- >Beneficiary delete feature - IN settings page NOTE position Fixing. - >Admin page - >give rights @@ -27,7 +27,7 @@ - Locked (3 times wrong password in time of login) - >session timeout -- login time otp +- >login time otp diff --git a/instruction.md b/instruction.md index 1da0b0c..1d35ae7 100644 --- a/instruction.md +++ b/instruction.md @@ -11,29 +11,31 @@ ____________________________________________________________ - vi IB.service ``` - [Unit] - Description= Internet Banking Frontened Application in Node - After=network.target - - [Service] - # Use absolute path for node or npm - User=ib - Group=ib - ExecStart=/usr/bin/npm start - WorkingDirectory=/home/ib/IB - Restart=on-failure - RestartSec=5 - Environment=NODE_ENV=production - Environment=PORT=3000 - SuccessExitStatus=143 - - [Install] - WantedBy=multi-user.target +[Unit] +Description= Internet Banking Frontened Application in Node +After=network.target + +[Service] +# Use absolute path for node or npm +User=ib_new +Group=ib_new +WorkingDirectory=/home/ib_new/IB +Environment=PATH=/home/ib_new/.local/bin:/home/ib_new/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/opt/node-v20.19.5-linux-x64/bin +ExecStart=/opt/node-v20.19.5-linux-x64/bin/npm start +Restart=on-failure +RestartSec=5 +Environment=NODE_ENV=production +Environment=PORT=3000 +SuccessExitStatus=143 + +[Install] +WantedBy=multi-user.target ``` - sudo systemctl status IB - sudo systemctl start IB + - sudo journalctl -u IB - sudo systemctl stop IB - sudo systemctl restart IB @@ -44,7 +46,9 @@ ____________________________________________________________ UAT (IB- frontend Test) : i-0b55435e15425f1c3 Linux : i-0c850dcf8b85b1447 (Test) -Prod : i-088e64c3435cb5078 (For IB & MB) +# Prod : i-088e64c3435cb5078 (For IB & MB) --old +Prod : i-070a81f88a984f7c6 (For IB and MB) +Mobile banking Prod DB: i-086d4cb13afc2cd83 //IB user: ib_new psw: ib_new ``` ## 2. list of Port : diff --git a/next.config.mjs b/next.config.mjs index 15377e9..76db5ae 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,4 +1,8 @@ /** @type {import('next').NextConfig} */ + +import os from "os"; +const isWindows = os.platform() === "win32"; + const nextConfig = { experimental: { serverComponentsExternalPackages: ["typeorm", "knex"], @@ -6,15 +10,12 @@ const nextConfig = { reactStrictMode: true, // For port transfer async rewrites() { - return[ + return [ { - source:'/api/:path*', - destination: 'http://localhost:8080/api/:path*', - // prod - // destination : 'http://lb-kccb-mobile-banking-app-848675342.ap-south-1.elb.amazonaws.com:8080/api/:path*', - // Testing - // destination: 'http://lb-test-mobile-banking-app-192209417.ap-south-1.elb.amazonaws.com:8080/api/:path*', - + source: '/api/:path*', + destination: isWindows + ? "http://localhost:8080/api/:path*" // For Windows + : "https://kccbmbnk.net/api/:path*", // For Linux/Mac/Server }, ]; }, diff --git a/src/app/ValidateUser/page.tsx b/src/app/ValidateUser/page.tsx index d20bb95..410c52c 100644 --- a/src/app/ValidateUser/page.tsx +++ b/src/app/ValidateUser/page.tsx @@ -19,7 +19,7 @@ export default function ValidateUser() { const headerRef = useRef(null); const validUsers = [ - { cif: "11111111111", mobile: "6297421727" }, + { cif: "11111111111", mobile: "7890544528" }, { cif: "30022497139", mobile: "6230573848" }, { cif: "11122233344", mobile: "9998887776" }, ]; diff --git a/src/app/_util/otp.ts b/src/app/_util/otp.ts index f5247fa..6948308 100644 --- a/src/app/_util/otp.ts +++ b/src/app/_util/otp.ts @@ -16,8 +16,8 @@ interface SendOtpPayload { } function getStoredMobileNumber(): string | null { - // const mobileNumber = localStorage.getItem('remitter_mobile_no'); - const mobileNumber = "6297421727"; + const mobileNumber = localStorage.getItem('remitter_mobile_no'); + // const mobileNumber = "7890544527"; if (!mobileNumber) { notifications.show({ title: 'Missing Mobile Number', diff --git a/src/app/login/page.tsx b/src/app/login/page.tsx index 51f7dbf..956d4b9 100644 --- a/src/app/login/page.tsx +++ b/src/app/login/page.tsx @@ -13,7 +13,6 @@ import dynamic from 'next/dynamic'; import { generateCaptcha } from '@/app/captcha'; import { IconRefresh, IconShieldLockFilled } from "@tabler/icons-react"; import dayjs from "dayjs"; -import { IconTrash } from "@tabler/icons-react"; import { fetchAndStoreUserName } from "../_util/userdetails"; @@ -47,8 +46,8 @@ export default function Login() { } try { console.log(CIF); - // await sendOtp({ type: 'LOGIN_OTP', username: CIF, mobileNumber: mobile }); - await sendOtp({ type: 'LOGIN_OTP', username: CIF, mobileNumber: '7890544527' }); + await sendOtp({ type: 'LOGIN_OTP', username: CIF, mobileNumber: mobile }); + // await sendOtp({ type: 'LOGIN_OTP', username: CIF, mobileNumber: '7890544527' }); notifications.show({ color: "orange", title: "OTP Required", @@ -69,8 +68,8 @@ export default function Login() { async function handleVerifyOtp(mobile?: string) { try { if (mobile) { - // await verifyLoginOtp(otp, mobile); - await verifyLoginOtp(otp, '6297421727'); + await verifyLoginOtp(otp, mobile); + // await verifyLoginOtp(otp, '7890544527'); return true; } } catch { @@ -102,7 +101,6 @@ export default function Login() { }, []); const regenerateCaptcha = () => { - // setCaptcha(generateCaptcha()); const loadCaptcha = async () => { const newCaptcha = await generateCaptcha(); setCaptcha(newCaptcha);