Showing AI reviews for avriti
Project AI Score ?
63%
Quality Avg ?
68%
Security Avg ?
45%
Reviews ?
56

Review Result ?

jattin01/avriti · a93421d0
This commit introduces a checkout page with static billing detail inputs, order summary, and payment method selection. It includes linking to the checkout page from the cart page and breadcrumb additions. The UI and flow are reasonable for a minimal viable checkout feature. However, the code lacks form validation, state management for input fields, and any backend integration or input sanitization, which reduce quality and security. The hardcoded items and prices limit business value and real usefulness. Without any payment processing or error handling, the risk of bugs and security concerns is moderate. The commit message is minimal and not descriptive.
Quality ?
65%
Security ?
35%
Business Value ?
70%
Maintainability ?
63%
Issues & Suggested Fixes ?
1AI detects the issue
2Shows file, line, or evidence
3Suggests the fix to apply
Issue
Where commit message
Issue / Evidence issue
Suggested Fix improve with a more descriptive message including what was added and what remains to do
Missing Validation
Where app/checkout/page.tsx:37
Issue / Evidence uncontrolled input fields with no state or validation
Suggested Fix add state management and validation for all form inputs to improve quality and reduce bug risk
Payment Method Radio Buttons Have No State...
Where app/checkout/page.tsx:110
Issue / Evidence payment method radio buttons have no state or form submission logic
Suggested Fix implement controlled inputs and form submission handling
Hardcoded Checkout Items
Where app/checkout/page.tsx:6
Issue / Evidence hardcoded checkout items
Suggested Fix replace with dynamic data source or props to improve business value
Place Order Button Lacks Any Action
Where app/checkout/page.tsx:121
Issue / Evidence Place Order button lacks any action
Suggested Fix add form submission handler with validation and backend integration
Postal Code Input Lacks Specific Input Typ...
Where app/checkout/page.tsx:96
Issue / Evidence postal code input lacks specific input type or pattern
Suggested Fix add input type or pattern attribute to improve input validation
Text Inputs Lack Accessibility Attributes...
Where app/checkout/page.tsx:38
Issue / Evidence text inputs lack accessibility attributes like aria-label or htmlFor for labels
Suggested Fix add these for better accessibility and quality
Security Issue
Where app/checkout/page.tsx:175
Issue / Evidence static security confirmation text without real security measures
Suggested Fix integrate with secure payment gateway and add client-side and server-side sanitization
Bare Links To /Checkout
Where app/cart/page.tsx:205
Issue / Evidence bare links to /checkout
Suggested Fix consider disabling link or showing loading state when cart is empty to improve business logic
Breadcrumb Links Hardcoded For Checkout
Where components/common/Breadcrumb.tsx:31
Issue / Evidence breadcrumb links hardcoded for checkout
Suggested Fix verify dynamic path generation for correctness and UX improvements
Code Change Preview · app/cart/page.tsx ?
Removed / Before Commit
- import InnerBanner from "@/components/inner-banner";
- 
- import { ProductCard } from "@/components/product-card";
- <p className="text-[15px] text-[#7A7A7A]">&#8377;190</p>
- </div>
- <div className="mt-5 flex flex-col gap-2 md:mt-9">
-                 <button
-                   type="button"
- className="inline-flex min-h-11 items-center justify-center gap-2 rounded-[10px] border border-[var(--color-primary-300)] bg-white px-5 py-2.5 text-sm font-semibold text-[var(--color-primary-700)] transition hover:bg-[var(--color-primary-100)]/35 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--color-primary-600)] disabled:pointer-events-none disabled:opacity-50"
- >
- Proceed to Checkout
-                 </button>
-                 <button
-                   type="button"
- className="inline-flex min-h-11 items-center justify-center gap-2 rounded-[10px] border border-[var(--color-primary-300)] bg-[var(--color-primary-700)] px-5 py-2.5 text-sm font-semibold text-white transition hover:bg-[var(--color-primary-100)]/35 hover:text-[var(--color-primary-700)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--color-primary-600)] disabled:pointer-events-none disabled:opacity-50"
- >
- Continue Shopping
-                 </button>
Added / After Commit
+ import Link from "next/link";
+ import InnerBanner from "@/components/inner-banner";
+ 
+ import { ProductCard } from "@/components/product-card";
+ <p className="text-[15px] text-[#7A7A7A]">&#8377;190</p>
+ </div>
+ <div className="mt-5 flex flex-col gap-2 md:mt-9">
+                 <Link
+                   href="/checkout"
+ className="inline-flex min-h-11 items-center justify-center gap-2 rounded-[10px] border border-[var(--color-primary-300)] bg-white px-5 py-2.5 text-sm font-semibold text-[var(--color-primary-700)] transition hover:bg-[var(--color-primary-100)]/35 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--color-primary-600)] disabled:pointer-events-none disabled:opacity-50"
+ >
+ Proceed to Checkout
+                 </Link>
+                 <Link
+                   href="/shop"
+ className="inline-flex min-h-11 items-center justify-center gap-2 rounded-[10px] border border-[var(--color-primary-300)] bg-[var(--color-primary-700)] px-5 py-2.5 text-sm font-semibold text-white transition hover:bg-[var(--color-primary-100)]/35 hover:text-[var(--color-primary-700)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--color-primary-600)] disabled:pointer-events-none disabled:opacity-50"
+ >
+ Continue Shopping
Removed / Before Commit

                                                
Added / After Commit
+ import InnerBanner from "@/components/inner-banner";
+ import { ProductCard } from "@/components/product-card";
+ 
+ const checkoutItems = [
+   {
+     name: "Avriti Shuddhi - Mopping Salt - 1kg",
+     quantity: 2,
+     price: 95,
+   },
+   {
+     name: "Drishti Tarot Cards - Pack of 78 cards",
+     quantity: 1,
+     price: 299,
+   },
+ ];
+ 
+ const subtotal = checkoutItems.reduce((sum, item) => sum + item.price * item.quantity, 0);
+ const tax = Math.round(subtotal * 0.05);
Removed / Before Commit
- "services": "Services",
- "shop": "Shop",
- "cart": "Cart",
- "login": "Login",
- "register": "Register",
- "profile": "Profile",
- 
- return (
- <nav className="bg-[#0b3dba] text-sm">
-         <div className="mx-auto  max-w-7xl flex items-center gap-2 px-4 sm:px-6 lg:px-8 py-2 ">
-       {/* Home */}
-       <Link href="/" className="text-gray-400 hover:text-white transition-colors">
-         Home
-       </Link>
- 
-       {segments.map((segment, index) => {
-         const path = "/" + segments.slice(0, index + 1).join("/");
-         const isLast = index === segments.length - 1;
Added / After Commit
+ "services": "Services",
+ "shop": "Shop",
+ "cart": "Cart",
+     "checkout": "Checkout",
+ "login": "Login",
+ "register": "Register",
+ "profile": "Profile",
+ 
+ return (
+ <nav className="bg-[#0b3dba] text-sm">
+       <div className="mx-auto  max-w-7xl flex items-center gap-2 px-4 sm:px-6 lg:px-8 py-2 ">
+         <Link href="/" className="text-gray-400 hover:text-white transition-colors">
+           Home
+         </Link>
+ 
+         {segments.map((segment, index) => {
+           const path = "/" + segments.slice(0, index + 1).join("/");
+           const isLast = index === segments.length - 1;