Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
FROM node:18-alpine
FROM node:20

WORKDIR /app
COPY package*.json turbo.json ./
COPY apps ./apps
COPY packages ./packages

RUN npm ci --only=production && npm ci --only=dev --no-cache

EXPOSE 3000 3001 3002 4000
CMD ["npm", "run", "dev"]
WORKDIR /repo
RUN apt-get update && apt-get install -y postgresql-client && rm -rf /var/lib/apt/lists/*
COPY . .
RUN npm install
CMD ["echo", "Base image ready"]
Comment on lines +1 to +7

Copilot AI Nov 9, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Dockerfile now copies all files with COPY . . which may include unnecessary files (node_modules, .git, etc.). Add a .dockerignore file or use more selective COPY commands to optimize image size and build time.

Copilot uses AI. Check for mistakes.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function MerchantBillsPage() {
};

return (
<div className="min-h-screen bg-gradient-to-br from-slate-900 via-purple-900 to-slate-900 text-white p-8">
<div className=" text-zinc-900 bg-zinc-100 dark:bg-zinc-950 dark:text-zinc-100 ">
<div className="max-w-7xl mx-auto">
{/* HEADER */}
<motion.div
Expand All @@ -51,11 +51,12 @@ export default function MerchantBillsPage() {
<h1 className="text-5xl font-black bg-gradient-to-r from-cyan-400 to-purple-600 bg-clip-text text-transparent">
Merchant Bill Dashboard
</h1>
<p className="text-xl text-cyan-200 mt-4">Total Bills: {bills.length}</p>
<p className="text-xl mt-4">Total Bills: {bills.length}</p>
</motion.div>

{/* BILLS GRID */}
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<div className=" h-[490px] no-scrollbar overflow-y-auto px-4 pb-8">
{/* BILLS GRID */}
<div className=" grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{bills.map((bill) => {
const due = new Date(bill.dueDate);
const overdue = due < new Date() && bill.status !== "PAID";
Expand All @@ -64,10 +65,10 @@ export default function MerchantBillsPage() {
<motion.div
key={bill.id}
whileHover={{ scale: 1.03 }}
className="cursor-pointer bg-white/10 backdrop-blur-xl border border-white/20 rounded-2xl p-6 shadow-2xl hover:border-cyan-400 transition-all"
className="cursor -pointer bg-zinc-400 dark:bg-zinc-800 backdrop-blur-xl border border-white/20 rounded-2xl p-3 shadow-2xl hover:border-zinc-400 transition-all "
>
<div className="flex justify-between items-start mb-3">
<h3 className="text-xl font-bold text-cyan-300">{bill.billType}</h3>
<h3 className="text-xl font-bold ">{bill.billType}</h3>
<span
className={`px-3 py-1 rounded-full text-xs font-bold ${
bill.status === "PAID"
Expand All @@ -93,13 +94,13 @@ export default function MerchantBillsPage() {
<div className="mt-4 flex gap-2">
<Button
onClick={() => updateStatus(bill.id, "PAID")}
className="flex-1 bg-green-600 hover:bg-green-500 text-white font-bold"
className="flex-1 bg-zinc-600 hover:bg-zinc-500 font-bold"
>
Paid
</Button>
<Button
onClick={() => updateStatus(bill.id, "OVERDUE")}
className="flex-1 bg-red-600 hover:bg-red-500 text-white font-bold"
className="flex-1 bg-red-600 hover:bg-red-500 font-bold"
>
Overdue
</Button>
Expand All @@ -109,6 +110,9 @@ export default function MerchantBillsPage() {
);
})}
</div>

</div>

</div>
</div>
);
Expand Down
61 changes: 61 additions & 0 deletions apps/merchant-app/app/(dashboard)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
"use client";
import { useSession } from "next-auth/react";
import { Home, LayoutDashboard, Send, Repeat, BrickWallFire, Wallet } from 'lucide-react';

Copilot AI Nov 9, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused imports Repeat, Send, Wallet.

Suggested change
import { Home, LayoutDashboard, Send, Repeat, BrickWallFire, Wallet } from 'lucide-react';
import { Home, LayoutDashboard, BrickWallFire } from 'lucide-react';

Copilot uses AI. Check for mistakes.
import { Avatar, AvatarFallback, AvatarImage } from '../../../../packages/ui/src/avatar';
import { TooltipProvider } from '../../../../packages/ui/src/tooltip';
import { Sidebar, SidebarBody, SidebarLink, SignupBtn } from '../../../../packages/ui/src/sidebar';
import { useMemo } from 'react';

interface Links {
label: string;
href: string;
icon: React.JSX.Element;
}

export default function Layout({ children }: { children: React.ReactNode }) {
const { data: session } = useSession();

const sidebarLinks = useMemo<Links[]>(() => [
{ label: "Home", href: "/", icon: <Home className="w-5 h-5" /> },
{ label: "QR", href: "/qr", icon: <LayoutDashboard className="w-5 h-5" /> },
{ label: "Bills", href: "/bills", icon: <BrickWallFire className="w-5 h-5" /> },
], []);

return (
<TooltipProvider>
<div className="flex h-screen">
<Sidebar>
<SidebarBody className="h-screen bg-zinc-400 flex text-zinc-900 flex-col dark:bg-zinc-950 dark:text-zinc-100">
<nav className="flex flex-col gap-2 flex-1">
{sidebarLinks.map((link) => (
<SidebarLink key={link.href} link={link} />
))}
</nav>

<div className="border-t border-neutral-200 dark:border-neutral-700">
<div className="flex items-center gap-3 p-2">
<Avatar className="h-8 w-8">
<AvatarImage src={undefined} alt="@user" />
<AvatarFallback>{session?.user?.name?.[0] || "US"}</AvatarFallback>
</Avatar>
<div className="min-w-0 flex-1">
<p className="text-sm font-medium truncate">
{session?.user?.name || "Your Name"}
</p>
<p className="text-xs truncate">
{session?.user?.email || "abc@example.com"}
</p>
</div>
<SignupBtn />
</div>
</div>
</SidebarBody>
</Sidebar>

<main className="flex-1 overflow-y-auto bg-slate-950 h-screen">
{children}
</main>
</div>
</TooltipProvider>
);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

import QRPaymentHero from "../../components/molecules/QRPaymentHero";
import QRPaymentHero from "../../../components/molecules/QRPaymentHero";

export default function QRCodePage() {

Expand Down
2 changes: 1 addition & 1 deletion apps/merchant-app/app/api/qr/generate/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export async function POST(request: Request) {
console.error(`Merchant not found for email: ${session.user.email}`);
return NextResponse.json({ error: `Merchant not found for email: ${session.user.email}` }, { status: 404 });
}

const upiId = "7822952595@ibl";
const merchantName = merchant.name && merchant.name.length <= 15 ? merchant.name : "Merchant";
const qrId = generateShortId();
Expand Down
Loading
Loading