Docker file #31
Conversation
- Created migration scripts to drop existing `recharge_orders` and `recharge_plans` tables and create new `RechargeOrder` and `RechargePlan` tables with updated schemas. - Introduced new reward and referral models with migrations for `Reward` and `Referral` tables, including enums for reward types and statuses. - Added migration for refund requests with new `WrongSendRequest` table and updated `p2pTransfer` schema. - Updated Prisma schema to include new models and relationships for recharge, rewards, and referral systems. - Seeded initial data for rewards, including scratch cards, cashback, referral rewards, and milestone achievements. - Enhanced UI components for better styling and accessibility, including updates to `TextInput`, `AnimatedTestimonials`, `Avatar`, `Button`, and `SidebarLink`.
….json - Added eslint-config-turbo and eslint-plugin-turbo to the root package.json - Updated prisma version from 6.18.0 to 6.19.0 in packages/db/package.json
There was a problem hiding this comment.
Pull Request Overview
This pull request implements a comprehensive theme and UI overhaul for the CalxSecure payment platform, introducing dark mode support, new UI components, and infrastructure improvements.
Key Changes
- Added dark mode support with theme toggling across user and merchant apps
- Introduced new UI components (GlareCard, ShootingStars, StarsBackground, HoverBorderGradient, BackgroundBeamsWithCollision)
- Updated Docker configuration for better setup and database initialization
- Added Firebase SDK (v12.5.0) and upgraded dependencies (Prisma 6.18.0 → 6.19.0, eslint-config-turbo/eslint-plugin-turbo 1.13.4 → 2.6.0)
- Replaced HTML anchor tags with Next.js Link components for better routing
- Modified styling across all components to support light/dark themes
Reviewed Changes
Copilot reviewed 46 out of 48 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui/src/sidebar.tsx | Replaced <a> with <Link>, removed color classes for theme support |
| packages/ui/src/button.tsx | Updated background colors to support dark mode |
| packages/ui/src/avatar.tsx | Added border and dark mode background styling |
| packages/ui/src/TextInput.tsx | Removed hardcoded background/text colors for theme compatibility |
| packages/db/package.json | Upgraded Prisma from 6.18.0 to 6.19.0 |
| package.json | Added firebase 12.5.0, eslint-config-turbo/plugin 2.6.0, @types/ioredis |
| docker-compose.yml | Complete rewrite: healthchecks, setup service, Prisma migration automation |
| apps/user-app/lib/redis.ts | Added type safety with IORedisClient type alias and explicit casts |
| apps/user-app/lib/firebase.ts | Removed comment-only line |
| apps/user-app/components/* | Extensive styling updates for dark mode, replaced inline styles with theme-aware classes |
| apps/user-app/app/home/page.tsx | Removed unused image imports, updated nav items, added new background components |
| apps/user-app/app/auth/* | Updated styling for dark mode, improved form layouts |
| apps/user-app/app/(dashboard)/* | Added dark mode support, improved layouts, added loading state |
| apps/merchant-app/components/* | Added new UI components (ShootingStars, StarsBackground, BackgroundBeamsWithCollision) |
| apps/merchant-app/app/home/page.tsx | Major redesign with new background effects and theme support |
| Dockerfile | Simplified: switched to Node 20, added PostgreSQL client |
Comments suppressed due to low confidence (1)
apps/merchant-app/app/(dashboard)/bills/page.tsx:68
- Corrected spacing in 'cursor-pointer' (currently has space: 'cursor -pointer').
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| redis = new Redis(process.env.REDIS_URL || "redis://localhost:6379", { | ||
| lazyConnect: true, | ||
| maxRetriesPerRequest: 1, | ||
| retryStrategy: () => null, // Don't retry | ||
| enableOfflineQueue: false, | ||
| enableReadyCheck: false, | ||
| }); | ||
| }) as IORedisClient; |
There was a problem hiding this comment.
The cast to IORedisClient on line 17 is unnecessary. The new Redis() constructor already returns an instance of type Redis, which is the same as InstanceType<typeof Redis>. Remove the explicit cast for cleaner code.
| className="w-full bg-zinc-400 hover:bg-zinc-500 disabled:bg-zinc-600/50 disabled:cursor-not-allowed" | ||
| > | ||
| Pay INR{amount || 0} | ||
| Pay |
There was a problem hiding this comment.
The button text 'Pay' is incomplete. It previously showed 'Pay INR{amount || 0}' which provided important context to the user about the amount being paid. This change removes critical payment information from the UI.
| Pay | |
| Pay INR{amount || 0} |
| <div | ||
| className={`p-4 rounded-lg text-sm font-medium ${ | ||
| message.includes("✅") ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700" | ||
| message.includes("") ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700" |
There was a problem hiding this comment.
The condition message.includes(\"\") will always be true since every string contains an empty string. This should check for the checkmark emoji '✅' as it did previously, or use a more specific success indicator.
| message.includes("") ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700" | |
| message.includes("✅") ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700" |
| label="Card Number" | ||
| required={true} | ||
| placeholder="4111 1111 1111 1111" | ||
| placeholder="4111 1111 **** ****" |
There was a problem hiding this comment.
[nitpick] Card number placeholder changed from full digits to masked format. While this may be intentional for privacy, it could confuse users about the expected input format. Consider using a placeholder that clearly shows the full format is expected, like '1234 5678 9012 3456'.
| placeholder="4111 1111 **** ****" | |
| placeholder="1234 5678 9012 3456" |
| npx prisma migrate deploy --schema=prisma/schema.prisma && | ||
| npx prisma generate --schema=prisma/schema.prisma && | ||
| npx prisma db seed --schema=prisma/schema.prisma && | ||
| npx prisma db seedreward --schema=prisma/schema.prisma && |
There was a problem hiding this comment.
The command npx prisma db seedreward is not a valid Prisma CLI command. The correct command is npx prisma db seed. This will cause the setup script to fail.
| import { useMemo } from 'react'; | ||
|
|
There was a problem hiding this comment.
Unused import useMemo.
| import { useMemo } from 'react'; |
| import pic14 from "@/public/three.png"; | ||
| import pic15 from "@/public/two.png"; | ||
| import { PointerHighlight } from "../../components/ui/pointer-highlight"; | ||
| import { ShootingStars } from "@/components/ui/shooting-stars"; |
There was a problem hiding this comment.
Unused import ShootingStars.
| import { ShootingStars } from "@/components/ui/shooting-stars"; |
| import pic15 from "@/public/two.png"; | ||
| import { PointerHighlight } from "../../components/ui/pointer-highlight"; | ||
| import { ShootingStars } from "@/components/ui/shooting-stars"; | ||
| import { StarsBackground } from "@/components/ui/stars-background"; |
There was a problem hiding this comment.
Unused import StarsBackground.
| import { StarsBackground } from "@/components/ui/stars-background"; |
| import { PointerHighlight } from "../../components/ui/pointer-highlight"; | ||
| import { ShootingStars } from "@/components/ui/shooting-stars"; | ||
| import { StarsBackground } from "@/components/ui/stars-background"; | ||
| import { BackgroundBeamsWithCollision } from "@/components/ui/background-beams-with-collision"; |
There was a problem hiding this comment.
Unused import BackgroundBeamsWithCollision.
| import { BackgroundBeamsWithCollision } from "@/components/ui/background-beams-with-collision"; |
| import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from "./dropdown-menu"; | ||
| import { DropdownMenuItem } from "@radix-ui/react-dropdown-menu"; | ||
| import { TextHoverEffect } from "../../../../packages/ui/src/text-hover-effect"; | ||
| import { useTheme } from "next-themes"; |
There was a problem hiding this comment.
Unused import useTheme.
No description provided.