feat: complete platform overhaul, bugfixes, and verified production release

This commit is contained in:
Atharv1705
2026-10-28 21:47:48 +05:30
parent 276039a743
commit 3cb6229cd9
62 changed files with 1820 additions and 548 deletions
+5 -4
View File
@@ -4,13 +4,14 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/webp" href="/images/bookkeeppro-logo.webp" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="BookKeepPro — Professional bookkeeping, payroll and tax preparation services for growing businesses across the US and India. 27 years of accounting excellence." />
<title>BookKeepPro — Bookkeeping, Payroll &amp; Tax Services</title>
<meta name="description" content="BookKeepPro &mdash; Professional bookkeeping, payroll and tax preparation services for growing businesses across the US and India. 27 years of accounting excellence." />
<title>BookKeepPro &mdash; Bookkeeping, Payroll &amp; Tax Services</title>
<link rel="stylesheet" href="/css/base.css"/>
<link rel="stylesheet" href="/css/components.css"/>
<link rel="stylesheet" href="/css/marketing.css"/>
<link rel="stylesheet" href="/css/chatbot.css" media="print" onload="this.media='all'" />
<link rel="stylesheet" href="/css/animations.css" media="print" onload="this.media='all'" />
<link rel="stylesheet" href="/css/chatbot.css" />
<link rel="stylesheet" href="/css/animations.css" />
<link rel="stylesheet" href="/css/dynamic.css" />
</head>
<body>
<div id="root"></div>
+1 -105
View File
@@ -13,8 +13,7 @@
"lucide-react": "^1.24.0",
"react": "^19.2.7",
"react-dom": "^19.2.7",
"react-router-dom": "^7.18.1",
"xlsx": "^0.18.5"
"react-router-dom": "^7.18.1"
},
"devDependencies": {
"@tailwindcss/postcss": "^4.3.2",
@@ -2012,15 +2011,6 @@
}
}
},
"node_modules/adler-32": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.1.tgz",
"integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==",
"license": "Apache-2.0",
"engines": {
"node": ">=0.8"
}
},
"node_modules/agent-base": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
@@ -2169,28 +2159,6 @@
],
"license": "CC-BY-4.0"
},
"node_modules/cfb": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.2.tgz",
"integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==",
"license": "Apache-2.0",
"dependencies": {
"adler-32": "~1.3.0",
"crc-32": "~1.2.0"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/codepage": {
"version": "1.15.0",
"resolved": "https://registry.npmjs.org/codepage/-/codepage-1.15.0.tgz",
"integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==",
"license": "Apache-2.0",
"engines": {
"node": ">=0.8"
}
},
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@@ -2216,18 +2184,6 @@
"url": "https://opencollective.com/express"
}
},
"node_modules/crc-32": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",
"integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==",
"license": "Apache-2.0",
"bin": {
"crc32": "bin/crc32.njs"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/csstype": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
@@ -2424,15 +2380,6 @@
"node": ">= 6"
}
},
"node_modules/frac": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz",
"integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==",
"license": "Apache-2.0",
"engines": {
"node": ">=0.8"
}
},
"node_modules/fraction.js": {
"version": "5.3.4",
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-5.3.4.tgz",
@@ -3238,18 +3185,6 @@
"node": ">=0.10.0"
}
},
"node_modules/ssf": {
"version": "0.11.2",
"resolved": "https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz",
"integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==",
"license": "Apache-2.0",
"dependencies": {
"frac": "~1.1.2"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/tailwindcss": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.2.tgz",
@@ -3404,45 +3339,6 @@
"optional": true
}
}
},
"node_modules/wmf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz",
"integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==",
"license": "Apache-2.0",
"engines": {
"node": ">=0.8"
}
},
"node_modules/word": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/word/-/word-0.3.0.tgz",
"integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==",
"license": "Apache-2.0",
"engines": {
"node": ">=0.8"
}
},
"node_modules/xlsx": {
"version": "0.18.5",
"resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.18.5.tgz",
"integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==",
"license": "Apache-2.0",
"dependencies": {
"adler-32": "~1.3.0",
"cfb": "~1.2.1",
"codepage": "~1.15.0",
"crc-32": "~1.2.1",
"ssf": "~0.11.2",
"wmf": "~1.0.1",
"word": "~0.3.0"
},
"bin": {
"xlsx": "bin/xlsx.njs"
},
"engines": {
"node": ">=0.8"
}
}
}
}
+2 -3
View File
@@ -15,8 +15,7 @@
"lucide-react": "^1.24.0",
"react": "^19.2.7",
"react-dom": "^19.2.7",
"react-router-dom": "^7.18.1",
"xlsx": "^0.18.5"
"react-router-dom": "^7.18.1"
},
"devDependencies": {
"@tailwindcss/postcss": "^4.3.2",
@@ -31,4 +30,4 @@
"tailwindcss": "^4.3.2",
"vite": "^8.1.1"
}
}
}
+76
View File
@@ -0,0 +1,76 @@
import os
footer_path = 'src/components/Footer.jsx'
footer_content = '''import { Link } from 'react-router-dom';
export default function Footer() {
return (
<footer className="bg-[var(--paper)] border-t border-[var(--border)] mt-auto relative overflow-hidden">
<div className="absolute inset-0 bg-gradient-to-b from-transparent to-[var(--emerald)]/5 pointer-events-none"></div>
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16 relative z-10">
<div className="grid grid-cols-1 md:grid-cols-12 gap-12 lg:gap-8">
<div className="md:col-span-12 lg:col-span-5 flex flex-col items-start">
<Link to="/" className="inline-block mb-6 transition-transform duration-200 hover:scale-[1.02]">
<img src="/images/bookkeeppro-logo.webp" alt="BookKeepPro" width="190" height="64" className="h-14 w-auto object-contain" />
</Link>
<p className="text-[var(--ink-soft)] leading-relaxed text-[15px] max-w-sm font-medium">
Bookkeeping, payroll and tax preparation for growing businesses - kept precise, kept compliant.
</p>
</div>
<div className="md:col-span-5 lg:col-span-3 lg:col-start-7">
<h3 className="font-display text-xl text-[var(--ink)] mb-6 tracking-wide">Navigate</h3>
<div className="flex flex-col gap-4 text-[15px] font-medium">
<Link to="/" className="text-[var(--ink-soft)] hover:text-[var(--emerald)] transition-colors hover:translate-x-1 duration-200 w-fit">Home</Link>
<Link to="/about-us" className="text-[var(--ink-soft)] hover:text-[var(--emerald)] transition-colors hover:translate-x-1 duration-200 w-fit">About Us</Link>
<Link to="/services" className="text-[var(--ink-soft)] hover:text-[var(--emerald)] transition-colors hover:translate-x-1 duration-200 w-fit">Services</Link>
<Link to="/contact" className="text-[var(--ink-soft)] hover:text-[var(--emerald)] transition-colors hover:translate-x-1 duration-200 w-fit">Contact Us</Link>
</div>
</div>
<div className="md:col-span-7 lg:col-span-3">
<h3 className="font-display text-xl text-[var(--ink)] mb-6 tracking-wide">Reach us</h3>
<div className="flex flex-col gap-5 text-[15px] text-[var(--ink-soft)] font-medium">
<p className="flex items-start gap-3 group">
<span className="material-symbols-outlined text-[var(--emerald)] text-[22px] group-hover:scale-110 transition-transform shrink-0">location_on</span>
<span className="leading-snug">USA - 2520 Indigo Dr, McKinney, TX 75072</span>
</p>
<p className="flex items-start gap-3 group">
<span className="material-symbols-outlined text-[var(--emerald)] text-[22px] group-hover:scale-110 transition-transform shrink-0">location_on</span>
<span className="leading-snug">India - 508 White Square, Hinjewadi Road, Pune 411057</span>
</p>
<p className="flex items-center gap-3 group pt-1">
<span className="material-symbols-outlined text-[var(--brass)] text-[22px] group-hover:scale-110 transition-transform shrink-0">mail</span>
<a href="mailto:atharvg.aiindia@gmail.com" className="hover:text-[var(--emerald)] transition-colors">atharvg.aiindia@gmail.com</a>
</p>
<p className="flex items-center gap-3 group">
<span className="material-symbols-outlined text-[var(--brass)] text-[22px] group-hover:scale-110 transition-transform shrink-0">phone</span>
<a href="tel:+918275367267" className="hover:text-[var(--emerald)] transition-colors">+91 8275367267</a>
</p>
</div>
</div>
</div>
</div>
<div className="border-t border-[var(--border)] relative z-10 bg-[var(--paper)]/80">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6 flex flex-col md:flex-row items-center justify-between gap-4">
<p className="text-sm text-[var(--ink-soft)] font-medium">
© {new Date().getFullYear()} Bookkeeping Business Solutions. All rights reserved.
</p>
<div className="flex gap-4">
<Link to="/privacy" className="text-sm text-[var(--ink-soft)] hover:text-[var(--emerald)] transition-colors">Privacy Policy</Link>
<Link to="/terms" className="text-sm text-[var(--ink-soft)] hover:text-[var(--emerald)] transition-colors">Terms of Service</Link>
</div>
</div>
</div>
</footer>
);
}
'''
with open(footer_path, 'w', encoding='utf-8') as f:
f.write(footer_content)
print('Footer patched successfully.')
+78
View File
@@ -0,0 +1,78 @@
import os
footer_path = 'src/components/Footer.jsx'
footer_content = '''import { Link } from 'react-router-dom';
export default function Footer() {
return (
<footer className="bg-[var(--ink)] border-t border-[var(--ink-soft)] mt-auto relative overflow-hidden">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16 relative z-10 flex flex-col lg:flex-row justify-between gap-12 lg:gap-8">
{/* Brand Section */}
<div className="flex flex-col items-start max-w-sm">
<Link to="/" className="inline-block mb-6 transition-transform duration-200 hover:scale-[1.02] bg-white p-2 rounded-lg shadow-sm">
<img src="/images/bookkeeppro-logo.webp" alt="BookKeepPro" width="190" height="64" className="h-12 w-auto object-contain" />
</Link>
<p className="text-white/70 leading-relaxed text-[15px] font-medium">
Bookkeeping, payroll and tax preparation for growing businesses - kept precise, kept compliant.
</p>
</div>
{/* Links Section */}
<div className="flex flex-col sm:flex-row gap-12 sm:gap-24">
<div className="flex flex-col min-w-[140px]">
<h3 className="font-display text-xl text-white mb-6 tracking-wide">Navigate</h3>
<div className="flex flex-col gap-4 text-[15px] font-medium">
<Link to="/" className="text-white/70 hover:text-[var(--emerald)] transition-colors hover:translate-x-1 duration-200 w-fit">Home</Link>
<Link to="/about-us" className="text-white/70 hover:text-[var(--emerald)] transition-colors hover:translate-x-1 duration-200 w-fit">About Us</Link>
<Link to="/services" className="text-white/70 hover:text-[var(--emerald)] transition-colors hover:translate-x-1 duration-200 w-fit">Services</Link>
<Link to="/contact" className="text-white/70 hover:text-[var(--emerald)] transition-colors hover:translate-x-1 duration-200 w-fit">Contact Us</Link>
</div>
</div>
<div className="flex flex-col max-w-sm">
<h3 className="font-display text-xl text-white mb-6 tracking-wide">Reach us</h3>
<div className="flex flex-col gap-5 text-[15px] text-white/70 font-medium">
<p className="flex items-start gap-3 group">
<span className="material-symbols-outlined text-[var(--emerald)] text-[22px] group-hover:scale-110 transition-transform shrink-0">location_on</span>
<span className="leading-snug">USA - 2520 Indigo Dr, McKinney, TX 75072</span>
</p>
<p className="flex items-start gap-3 group">
<span className="material-symbols-outlined text-[var(--emerald)] text-[22px] group-hover:scale-110 transition-transform shrink-0">location_on</span>
<span className="leading-snug">India - 508 White Square, Hinjewadi Road, Pune 411057</span>
</p>
<p className="flex items-center gap-3 group pt-1">
<span className="material-symbols-outlined text-[var(--brass)] text-[22px] group-hover:scale-110 transition-transform shrink-0">mail</span>
<a href="mailto:atharvg.aiindia@gmail.com" className="hover:text-[var(--emerald)] transition-colors">atharvg.aiindia@gmail.com</a>
</p>
<p className="flex items-center gap-3 group">
<span className="material-symbols-outlined text-[var(--brass)] text-[22px] group-hover:scale-110 transition-transform shrink-0">phone</span>
<a href="tel:+918275367267" className="hover:text-[var(--emerald)] transition-colors">+91 8275367267</a>
</p>
</div>
</div>
</div>
</div>
<div className="border-t border-white/10 relative z-10 bg-[var(--ink-soft)]/50">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6 flex flex-col md:flex-row items-center justify-between gap-4">
<p className="text-sm text-white/50 font-medium">
© {new Date().getFullYear()} Bookkeeping Business Solutions. All rights reserved.
</p>
<div className="flex gap-6">
<Link to="/privacy" className="text-sm text-white/50 hover:text-white transition-colors">Privacy Policy</Link>
<Link to="/terms" className="text-sm text-white/50 hover:text-white transition-colors">Terms of Service</Link>
</div>
</div>
</div>
</footer>
);
}
'''
with open(footer_path, 'w', encoding='utf-8') as f:
f.write(footer_content)
print('Footer fully updated to premium dark layout.')
+49
View File
@@ -0,0 +1,49 @@
import os
footer_path = 'src/components/Footer.jsx'
footer_content = '''import { Link } from 'react-router-dom';
export default function Footer() {
return (
<footer className="bg-[var(--ink)] pt-16 pb-8 border-t-[4px] border-[var(--brass)]">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col md:flex-row justify-between gap-12">
{/* Left: Brand */}
<div className="flex flex-col max-w-[280px]">
<Link to="/" className="mb-4 inline-block">
<img src="/images/bookkeeppro-logo.webp" alt="BookKeepPro" className="w-[190px] h-auto opacity-90" />
</Link>
<p className="text-white/60 text-[14px] leading-relaxed">
Bookkeeping, payroll and tax preparation for growing businesses - kept precise, kept compliant.
</p>
</div>
{/* Right: Links */}
<div className="flex flex-col sm:flex-row gap-16 md:gap-24">
<div className="flex flex-col gap-3">
<h3 className="text-[var(--brass)] font-mono text-[12.5px] uppercase tracking-[0.1em] font-semibold mb-2">Navigate</h3>
<Link to="/" className="text-white/75 hover:text-white transition-colors text-[14.5px]">Home</Link>
<Link to="/about-us" className="text-white/75 hover:text-white transition-colors text-[14.5px]">About Us</Link>
<Link to="/services" className="text-white/75 hover:text-white transition-colors text-[14.5px]">Services</Link>
<Link to="/contact" className="text-white/75 hover:text-white transition-colors text-[14.5px]">Contact Us</Link>
</div>
<div className="flex flex-col gap-3">
<h3 className="text-[var(--brass)] font-mono text-[12.5px] uppercase tracking-[0.1em] font-semibold mb-2">Reach Us</h3>
<p className="text-white/75 text-[14px]">USA - 2520 Indigo Dr, McKinney, TX 75072</p>
<p className="text-white/75 text-[14px]">India - 508 White Square, Hinjewadi Road, Pune 411057</p>
<a href="mailto:atharvg.aiindia@gmail.com" className="text-white/75 hover:text-white transition-colors text-[14.5px]">atharvg.aiindia@gmail.com</a>
<a href="tel:+918275367267" className="text-white/75 hover:text-white transition-colors text-[14.5px]">+91 8275367267</a>
</div>
</div>
</div>
</footer>
);
}
'''
with open(footer_path, 'w', encoding='utf-8') as f:
f.write(footer_content)
print('Footer patched exactly to image.')
+320
View File
@@ -0,0 +1,320 @@
import os
base_path = 'src/components'
# 1. Button.jsx
button_path = os.path.join(base_path, 'Button.jsx')
button_content = '''import React from 'react';
import { Loader2 } from 'lucide-react';
export default function Button({
children,
variant = 'primary',
size = 'md',
className = '',
type = 'button',
loading = false,
disabled = false,
icon,
...props
}) {
const baseClass = "btn relative inline-flex items-center justify-center transition-all duration-200 active:translate-y-[1px] disabled:opacity-60 disabled:cursor-not-allowed focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--emerald)]";
const variantClass = `btn-${variant}`;
const sizeClass = size === 'sm' ? 'btn-sm' : size === 'xs' ? 'btn-xs px-2 py-1 text-xs' : '';
return (
<button
type={type}
className={`${baseClass} ${variantClass} ${sizeClass} ${className}`.trim()}
disabled={disabled || loading}
{...props}
>
{loading && <Loader2 className="w-4 h-4 mr-2 animate-spin" />}
{!loading && icon && <span className="mr-2 flex items-center">{icon}</span>}
<span className={loading ? 'opacity-0' : ''}>{children}</span>
</button>
);
}
'''
with open(button_path, 'w', encoding='utf-8') as f:
f.write(button_content)
# 2. StatusChip.jsx
status_path = os.path.join(base_path, 'StatusChip.jsx')
status_content = '''import React from 'react';
export default function StatusChip({ status, note }) {
const s = (status || 'pending').toLowerCase();
let badgeClass = 'badge-yellow';
if (s === 'approved' || s === 'filed' || s === 'verified') badgeClass = 'badge-green';
if (s === 'rejected' || s === 'error') badgeClass = 'badge-red';
if (s === 'sent_for_approval') badgeClass = 'badge-blue';
const statusText = s.replace(/_/g, ' ').toUpperCase();
return (
<div className="flex flex-col items-start gap-1">
<span className={`badge ${badgeClass} shadow-sm border border-black/5`}>{statusText}</span>
{note && (
<div className="text-xs text-[var(--error)] italic mt-1 font-medium bg-[var(--error-bg)] px-2 py-1 rounded-sm border border-[var(--error)]/20">
Rejection Note: {note}
</div>
)}
</div>
);
}
'''
with open(status_path, 'w', encoding='utf-8') as f:
f.write(status_content)
# 3. ConfirmModal.jsx
modal_path = os.path.join(base_path, 'ConfirmModal.jsx')
modal_content = '''import React, { useEffect } from "react";
import Button from "./Button";
function ConfirmModal({ isOpen, title, message, confirmText, cancelText, onConfirm, onCancel, isDestructive }) {
useEffect(() => {
if (!isOpen) return;
const handleEsc = (e) => {
if (e.key === 'Escape') onCancel();
};
window.addEventListener('keydown', handleEsc);
return () => window.removeEventListener('keydown', handleEsc);
}, [isOpen, onCancel]);
if (!isOpen) return null;
return (
<div className="fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-0">
<div
className="fixed inset-0 bg-black/40 backdrop-blur-[2px] transition-opacity duration-200"
onClick={onCancel}
></div>
<div className="relative bg-[var(--card)] rounded-xl shadow-2xl border border-[var(--border)] max-w-md w-full p-6 sm:p-8 animate-fade-up" onClick={e => e.stopPropagation()}>
{title && <h3 className="font-display text-xl text-[var(--ink)] mb-3">{title}</h3>}
{message && (
<div className="text-[var(--muted)] mb-8 leading-relaxed">
{message.split('\\n').map((line, i) => (
<React.Fragment key={i}>
{line}
<br />
</React.Fragment>
))}
</div>
)}
<div className="flex flex-col-reverse sm:flex-row justify-end gap-3 sm:gap-4">
<Button variant="ghost" onClick={onCancel} className="w-full sm:w-auto">
{cancelText || "Cancel"}
</Button>
<Button
variant={isDestructive ? "danger" : "primary"}
onClick={onConfirm}
className="w-full sm:w-auto"
>
{confirmText || "Confirm"}
</Button>
</div>
</div>
</div>
);
}
export default ConfirmModal;
'''
with open(modal_path, 'w', encoding='utf-8') as f:
f.write(modal_content)
# 4. ResponsiveTable.jsx
table_path = os.path.join(base_path, 'ResponsiveTable.jsx')
table_content = '''import React from 'react';
export default function ResponsiveTable({ columns, data, keyField = 'id', renderCard }) {
if (!data || data.length === 0) {
return (
<div className="flex flex-col items-center justify-center py-12 px-4 border border-dashed border-[var(--border)] rounded-lg bg-[var(--paper)] text-center animate-fade-up">
<span className="material-symbols-outlined text-4xl text-[var(--muted)] mb-3 opacity-50">inventory_2</span>
<h3 className="text-lg font-medium text-[var(--ink)] mb-1">No records found</h3>
<p className="text-sm text-[var(--muted)]">Try adjusting your filters or upload a new document.</p>
</div>
);
}
return (
<>
<div className="hidden md:block overflow-x-auto rounded-lg border border-[var(--border)] shadow-sm bg-[var(--card)] animate-fade-up">
<table className="w-full text-left border-collapse">
<thead>
<tr className="bg-[var(--paper)] border-b-2 border-[var(--border)]">
{columns.map((col, idx) => (
<th key={idx} className="px-5 py-4 text-[13px] font-bold text-[var(--ink-soft)] uppercase tracking-wider">
{col.label}
</th>
))}
</tr>
</thead>
<tbody className="divide-y divide-[var(--border)]">
{data.map(row => (
<tr key={row[keyField]} className="interactive-row group">
{columns.map((col, idx) => (
<td key={idx} className="px-5 py-4 text-sm text-[var(--ink)]">
{col.render ? col.render(row) : row[col.key]}
</td>
))}
</tr>
))}
</tbody>
</table>
</div>
<div className="md:hidden flex flex-col gap-4">
{data.map(row => (
<div key={row[keyField]} className="interactive-card p-5 border border-[var(--border)] rounded-xl bg-[var(--card)] animate-fade-up">
{renderCard ? renderCard(row) : (
<div className="flex flex-col gap-3">
{columns.map((col, idx) => (
<div key={idx} className="flex justify-between items-start gap-4 text-sm">
<span className="text-[var(--muted)] font-medium shrink-0">{col.label}:</span>
<span className="text-right font-medium text-[var(--ink)] break-words">{col.render ? col.render(row) : row[col.key]}</span>
</div>
))}
</div>
)}
</div>
))}
</div>
</>
);
}
'''
with open(table_path, 'w', encoding='utf-8') as f:
f.write(table_content)
# 5. Navbar.jsx
navbar_path = os.path.join(base_path, 'Navbar.jsx')
navbar_content = '''import { Link, useLocation, useNavigate } from 'react-router-dom';
import { useState } from 'react';
export default function Navbar({ solid = false }) {
const [isOpen, setIsOpen] = useState(false);
const location = useLocation();
const navigate = useNavigate();
const isActive = (path) => {
if (path === '/' && location.pathname === '/') return true;
if (path !== '/' && location.pathname.startsWith(path)) return true;
return false;
};
const navLinks = [
{ name: 'Home', path: '/' },
{ name: 'About Us', path: '/about-us' },
{ name: 'Services', path: '/services' },
{ name: 'Contact Us', path: '/contact' }
];
return (
<div className={`navbar ${solid ? 'navbar-solid' : ''} border-b border-[var(--border)] shadow-sm bg-[var(--paper)]/95 backdrop-blur-md sticky top-0 z-40 transition-colors duration-300`}>
<div className="nav-container max-w-7xl mx-auto flex items-center justify-between px-4 sm:px-6 lg:px-8 py-3">
<Link to="/" className="flex-shrink-0 transition-transform duration-200 hover:scale-[1.02]">
<img id="logos" src="/images/bookkeeppro-logo.webp" alt="BookKeepPro" width="190" height="64" className="h-10 sm:h-12 w-auto" />
</Link>
<nav id="navMenu" className={`nav-menu ${isOpen ? 'active' : ''} md:flex items-center gap-8`}>
{navLinks.map((link) => (
<Link
key={link.path}
to={link.path}
onClick={() => setIsOpen(false)}
className={`text-[15px] font-medium transition-all duration-200 ${isActive(link.path) ? 'text-[var(--emerald)] border-b-2 border-[var(--emerald)] pb-1' : 'text-[var(--ink-soft)] hover:text-[var(--emerald)] hover:-translate-y-[1px] pb-1 border-b-2 border-transparent'}`}
>
{link.name}
</Link>
))}
<button className="btn btn-primary px-5 py-2 mt-4 md:mt-0 shadow-sm md:ml-4" onClick={() => navigate('/login')}>
Sign in
</button>
</nav>
<div className="hamburger md:hidden cursor-pointer" onClick={() => setIsOpen(!isOpen)}>
<span></span><span></span><span></span>
</div>
</div>
</div>
);
}
'''
with open(navbar_path, 'w', encoding='utf-8') as f:
f.write(navbar_content)
# 6. Footer.jsx
footer_path = os.path.join(base_path, 'Footer.jsx')
footer_content = '''import { Link } from 'react-router-dom';
export default function Footer() {
return (
<footer className="bg-[var(--paper)] border-t border-[var(--border)] mt-auto relative overflow-hidden">
<div className="absolute inset-0 bg-gradient-to-b from-transparent to-[var(--emerald)]/5 pointer-events-none"></div>
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16 relative z-10">
<div className="grid grid-cols-1 md:grid-cols-12 gap-12 lg:gap-8">
<div className="md:col-span-5 lg:col-span-4">
<Link to="/" className="inline-block mb-6 transition-transform duration-200 hover:scale-[1.02]">
<img src="/images/bookkeeppro-logo.webp" alt="BookKeepPro" width="190" height="64" className="h-12 w-auto" />
</Link>
<p className="text-[var(--muted)] leading-relaxed text-sm max-w-sm">
Bookkeeping, payroll and tax preparation for growing businesses - kept precise, kept compliant.
</p>
</div>
<div className="md:col-span-3 lg:col-span-2 lg:col-start-7">
<h3 className="font-display text-lg text-[var(--ink)] mb-4 tracking-wide">Navigate</h3>
<div className="flex flex-col gap-3 text-sm">
<Link to="/" className="text-[var(--muted)] hover:text-[var(--emerald)] transition-colors hover:translate-x-1 duration-200">Home</Link>
<Link to="/about-us" className="text-[var(--muted)] hover:text-[var(--emerald)] transition-colors hover:translate-x-1 duration-200">About Us</Link>
<Link to="/services" className="text-[var(--muted)] hover:text-[var(--emerald)] transition-colors hover:translate-x-1 duration-200">Services</Link>
<Link to="/contact" className="text-[var(--muted)] hover:text-[var(--emerald)] transition-colors hover:translate-x-1 duration-200">Contact Us</Link>
</div>
</div>
<div className="md:col-span-4 lg:col-span-4">
<h3 className="font-display text-lg text-[var(--ink)] mb-4 tracking-wide">Reach us</h3>
<div className="flex flex-col gap-4 text-sm text-[var(--muted)]">
<p className="flex items-start gap-3 group">
<span className="material-symbols-outlined text-[var(--emerald)] text-[20px] group-hover:scale-110 transition-transform">location_on</span>
<span className="leading-snug">USA - 2520 Indigo Dr, McKinney, TX 75072</span>
</p>
<p className="flex items-start gap-3 group">
<span className="material-symbols-outlined text-[var(--emerald)] text-[20px] group-hover:scale-110 transition-transform">location_on</span>
<span className="leading-snug">India - 508 White Square, Hinjewadi Road, Pune 411057</span>
</p>
<p className="flex items-center gap-3 mt-1 group">
<span className="material-symbols-outlined text-[var(--brass)] text-[20px] group-hover:scale-110 transition-transform">mail</span>
<a href="mailto:atharvg.aiindia@gmail.com" className="hover:text-[var(--emerald)] transition-colors">atharvg.aiindia@gmail.com</a>
</p>
<p className="flex items-center gap-3 group">
<span className="material-symbols-outlined text-[var(--brass)] text-[20px] group-hover:scale-110 transition-transform">phone</span>
<a href="tel:+918275367267" className="hover:text-[var(--emerald)] transition-colors">+91 8275367267</a>
</p>
</div>
</div>
</div>
</div>
<div className="border-t border-[var(--border)] relative z-10 bg-[var(--paper)]/80">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
<p className="text-center text-sm text-[var(--muted)]">
© {new Date().getFullYear()} Bookkeeping Business Solutions. All rights reserved.
</p>
</div>
</div>
</footer>
);
}
'''
with open(footer_path, 'w', encoding='utf-8') as f:
f.write(footer_content)
print('Phase 4 rewritten safely.')
+12 -2
View File
@@ -13,7 +13,7 @@
/* core palette */
--ink: #17211D;
--ink-soft: #2A362F;
--brass: #B0803D;
--brass: #8F6528;
--brass-dark: #8F6528;
--brass-light: rgba(176, 128, 61, 0.12);
--emerald: #1F5D46;
@@ -41,7 +41,7 @@
--success-bg: rgba(31, 93, 70, 0.10);
--error: #A63A3A;
--error-bg: rgba(166, 58, 58, 0.10);
--warn: #B0803D;
--warn: #8F6528;
--warn-bg: rgba(176, 128, 61, 0.12);
--font-display: 'Fraunces', 'Georgia', serif;
@@ -299,3 +299,13 @@ textarea:focus {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
@media (max-width: 640px) {
.btn:not(.btn-icon):not(.toast-close), .btn-sm:not(.btn-icon), .select-input, .input-field {
min-height: 44px;
}
.chatbot-fab {
bottom: 80px; /* move it up so it doesn't cover footer/bottom content on mobile */
}
}
+16 -3
View File
@@ -195,8 +195,8 @@
flex-shrink: 0; font-family: var(--font-display);
}
.user-info { min-width: 0; flex: 1; }
.user-info .u-name { font-weight: 600; color: var(--ink); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info .u-email { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.user-info .u-name { font-weight: 600; color: var(--ink); font-size: 14px; word-break: break-word; }
.user-info .u-email { font-size: 12px; color: var(--muted); word-break: break-word; margin-top: 2px; }
.user-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: relative; z-index: 10; flex-wrap: wrap; }
/* ── Role Controls ───────────────────────────────────────── */
@@ -227,7 +227,7 @@
}
.doc-row:hover { border-color: #cfc7ad; background: #fff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(23,33,29,0.06); }
.doc-row-left { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.doc-row-name { font-weight: 600; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-row-name { font-weight: 600; font-size: 13px; color: var(--ink); word-break: break-word; }
.doc-row-type { font-size: 12px; color: var(--muted); }
.doc-row-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
@@ -856,3 +856,16 @@
}
/* StatusChip */
.status-chip-container {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 4px;
}
.status-chip-note {
font-size: 12px;
color: var(--error);
font-style: italic;
}
+171
View File
@@ -0,0 +1,171 @@
/* ============================================================
dynamic.css — Ledger motion layer
Uses ONLY existing tokens (colours, Fraunces / IBM Plex fonts).
Concept: a brass rule is "struck under" a checked entry; numbers
tick like a ledger counter. Load AFTER animations.css.
Rules: animate transform/opacity only; entrance animations use
fill-mode `backwards` (never `both`) so hover transforms still work.
============================================================ */
:root {
--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
--brass-rgb: 176, 128, 61; /* = original brass, for rgba() */
--emerald-rgb: 31, 93, 70;
}
/* ---------- Global polish ---------- */
::selection { background: rgba(var(--brass-rgb), 0.28); color: var(--ink); }
h1, h2, h3 { text-wrap: balance; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; }
.btn:focus-visible, .tab-btn:focus-visible { outline-offset: 2px; }
/* ---------- Scroll progress rule (width driven by --scroll, set in motion.js) ---------- */
.scroll-progress {
position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 10000;
background: linear-gradient(90deg, var(--emerald), rgb(var(--brass-rgb)));
transform: scaleX(var(--scroll, 0)); transform-origin: 0 50%; pointer-events: none;
}
/* ---------- Header / navbar respond to scroll ---------- */
.navbar:not(.navbar-solid) { position: fixed; transition: background 0.35s, box-shadow 0.35s, border-color 0.35s; }
html[data-scrolled] .navbar:not(.navbar-solid) {
background: rgba(23, 33, 29, 0.92);
box-shadow: 0 10px 28px -14px rgba(23, 33, 29, 0.6);
border-bottom-color: rgba(var(--brass-rgb), 0.35);
}
.app-header { transition: box-shadow 0.3s, background 0.3s; }
html[data-scrolled] .app-header { box-shadow: var(--shadow-sm); }
/* ---------- Page + entrance choreography ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(0.985); } }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }
.page-enter { animation: pageIn 0.5s var(--ease-out) backwards; }
:is(.admin-stats, .users-grid, .services-grid, .return-cards, .stat-row) > * {
animation: rise 0.65s var(--ease-out) backwards;
animation-delay: var(--d, 0ms);
}
/* beat the older `fade-up` (fill-mode both) which froze the hover-lift transform */
.fade-up, .service-card.fade-up, .user-card.fade-up { animation-name: rise; animation-duration: 0.65s; animation-timing-function: var(--ease-out); animation-fill-mode: backwards; }
:is(.admin-stats, .users-grid, .services-grid, .return-cards, .stat-row) > :nth-child(1) { --d: 40ms; }
:is(.admin-stats, .users-grid, .services-grid, .return-cards, .stat-row) > :nth-child(2) { --d: 110ms; }
:is(.admin-stats, .users-grid, .services-grid, .return-cards, .stat-row) > :nth-child(3) { --d: 180ms; }
:is(.admin-stats, .users-grid, .services-grid, .return-cards, .stat-row) > :nth-child(4) { --d: 250ms; }
:is(.admin-stats, .users-grid, .services-grid, .return-cards, .stat-row) > :nth-child(5) { --d: 320ms; }
:is(.admin-stats, .users-grid, .services-grid, .return-cards, .stat-row) > :nth-child(6) { --d: 380ms; }
:is(.admin-stats, .users-grid, .services-grid, .return-cards, .stat-row) > :nth-child(7) { --d: 430ms; }
:is(.admin-stats, .users-grid, .services-grid, .return-cards, .stat-row) > :nth-child(8) { --d: 480ms; }
:is(.admin-stats, .users-grid, .services-grid, .return-cards, .stat-row) > :nth-child(n+9) { --d: 520ms; }
/* ---------- Cards: lift + pointer spotlight (vars set in motion.js) ---------- */
:is(.stat-card, .user-card, .service-card, .card) { position: relative; }
:is(.stat-card, .user-card, .service-card, .card):hover {
background-image: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--brass-rgb), 0.10), transparent 62%);
}
.stat-icon { display: inline-flex; transition: transform 0.5s var(--ease-spring); }
.stat-card:hover .stat-icon { transform: translateY(-3px) rotate(-6deg) scale(1.08); }
.stat-card.active-filter { animation: rise 0.65s var(--ease-out) backwards, ringPulse 2.6s 1s ease-out infinite; animation-delay: var(--d, 0ms), 1s; }
@keyframes ringPulse { 0% { box-shadow: 0 0 0 0 rgba(var(--emerald-rgb), 0.28); } 70%, 100% { box-shadow: 0 0 0 10px rgba(var(--emerald-rgb), 0); } }
.user-avatar { transition: transform 0.4s var(--ease-spring), box-shadow 0.3s; }
.user-card:hover .user-avatar { transform: scale(1.1); box-shadow: 0 0 0 4px rgba(var(--brass-rgb), 0.22); }
.service-card img { transition: transform 0.9s var(--ease-out); }
.service-card:hover img { transform: scale(1.06); }
/* ---------- Buttons: lift, brass sheen, press ---------- */
.btn { position: relative; overflow: hidden; transition: transform 0.18s var(--ease-out), box-shadow 0.25s, background-color 0.25s, color 0.25s, border-color 0.25s; }
.btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:not(:disabled):active { transform: translateY(1px) scale(0.97); box-shadow: none; }
.btn-primary::before, .login-btn::before {
content: ''; position: absolute; inset: 0; pointer-events: none;
background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.26) 50%, transparent 70%);
transform: translateX(-130%); transition: transform 0.8s var(--ease-out);
}
.btn-primary:not(:disabled):hover::before, .login-btn:hover::before { transform: translateX(130%); }
.login-btn { position: relative; overflow: hidden; }
/* ---------- Status chips: attention dot / stamp ---------- */
@keyframes pop { 0% { opacity: 0; transform: scale(0.6); } 100% { opacity: 1; transform: scale(1); } }
@keyframes dotPulse{ 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }
@keyframes stamp { 0% { opacity: 0; transform: scale(2.2) rotate(-18deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
.badge { animation: pop 0.45s var(--ease-spring) backwards; }
/* Attention dot / stamp only on real STATUS chips (StatusChip wraps them in .status-chip-container) — not on role/label badges */
.status-chip-container :is(.badge-yellow, .badge-orange, .badge-blue)::before {
content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; animation: dotPulse 1.8s ease-in-out infinite;
}
.status-chip-container .badge-green::before { content: '✓' / ''; font-weight: 700; display: inline-block; animation: stamp 0.55s 0.15s var(--ease-spring) backwards; }
.status-chip-container .badge-red::before { content: '!' / ''; font-weight: 700; display: inline-block; animation: stamp 0.55s 0.15s var(--ease-spring) backwards; }
/* ---------- Tabs, inputs, toasts, skeletons ---------- */
.tab-btn { border-radius: var(--radius-xs) var(--radius-xs) 0 0; }
.tab-btn:hover { background: rgba(var(--brass-rgb), 0.08); color: var(--ink); }
.tab-btn.active { background: linear-gradient(180deg, transparent, rgba(var(--brass-rgb), 0.07)); }
.tab-panel.active { animation: pageIn 0.4s var(--ease-out) backwards; }
input, select, textarea { transition: border-color 0.2s, box-shadow 0.25s; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 1px; border-color: rgb(var(--brass-rgb)); box-shadow: var(--shadow-glow); }
@keyframes toastIn { from { opacity: 0; transform: translateX(28px) scale(0.96); } }
.toast { animation: toastIn 0.5s var(--ease-spring) backwards; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skeleton { position: relative; overflow: hidden; background: var(--border); border-radius: var(--radius-md); }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent); animation: shimmer 1.4s infinite; }
.skeleton-card { height: 128px; }
/* ---------- Upload drop zone ---------- */
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.drop-zone { transition: border-color 0.25s, background 0.25s, transform 0.3s var(--ease-spring), box-shadow 0.3s; }
.drop-zone:hover .material-symbols-outlined { animation: bob 1.3s ease-in-out infinite; }
.drop-zone.drag-over { border-style: solid; border-color: rgb(var(--brass-rgb)); background: rgba(var(--brass-rgb), 0.10); transform: scale(1.015); box-shadow: var(--shadow-glow); }
.drop-zone.drag-over .material-symbols-outlined { animation: bob 0.7s ease-in-out infinite; }
/* ---------- Chatbot + banners ---------- */
@keyframes ring { 0% { transform: scale(1); opacity: 0.7; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
.chatbot-fab::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(var(--brass-rgb), 0.6); animation: ring 2.8s ease-out infinite; pointer-events: none; }
.chatbot-fab.open::before { animation: none; opacity: 0; }
.chatbot-fab:not(.open):hover { transform: scale(1.08) rotate(-4deg); }
.chatbot-window { transform-origin: bottom right; transition: opacity 0.3s, transform 0.4s var(--ease-spring); }
@keyframes glowNudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--brass-rgb), 0); } 50% { box-shadow: 0 0 0 6px rgba(var(--brass-rgb), 0.18); } }
.engagement-banner:not(.acknowledged) { animation: glowNudge 3.2s 1s ease-in-out 3; }
/* ---------- Marketing: hero + reveals ---------- */
/* Ambient light: soft brass + emerald glows drift over the (static) photo. Gradients only — no image scaling, so it stays cheap. */
.hero { isolation: isolate; }
.hero::after {
content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
background:
radial-gradient(55% 50% at 18% 28%, rgba(var(--brass-rgb), 0.20), transparent 70%),
radial-gradient(50% 60% at 86% 82%, rgba(var(--emerald-rgb), 0.30), transparent 70%);
animation: drift 20s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translate3d(-4%, -3%, 0) scale(1); } to { transform: translate3d(4%, 3%, 0) scale(1.12); } }
@media (max-width: 768px) { .hero::after { animation: none; } }
.hero-eyebrow, .hero h1, .hero-sub, .hero-actions { animation: rise 1s var(--ease-out) backwards; }
.hero-eyebrow { animation-delay: 0.1s; } .hero h1 { animation-delay: 0.22s; } .hero-sub { animation-delay: 0.4s; } .hero-actions { animation-delay: 0.55s; }
.hero h1 em { background: linear-gradient(rgb(var(--brass-rgb)), rgb(var(--brass-rgb))) no-repeat 0 100% / 0 2px; padding-bottom: 0.08em; animation: drawRule 1.2s 1.1s var(--ease-out) forwards; }
@keyframes drawRule { to { background-size: 100% 2px; } }
.hero-stats { animation: rise 1.1s 0.7s var(--ease-out) backwards; }
.stat-block { transition: background 0.3s; }
.stat-block:hover { background: rgba(var(--brass-rgb), 0.08); }
.stat-figure { transition: color 0.3s, transform 0.4s var(--ease-spring); }
.stat-block:hover .stat-figure { color: var(--emerald); transform: scale(1.06); }
/* Reveal: hidden ONLY when JS has opted in (html.motion) — never blank without JS / reduced motion */
.reveal { opacity: 1; transform: none; }
html.motion .reveal:not(.in-view) { opacity: 0; transform: translateY(26px); }
html.motion .reveal .eyebrow::before { transform: scaleX(0); transform-origin: left; transition: transform 0.9s 0.25s var(--ease-out); }
html.motion .reveal.in-view .eyebrow::before { transform: scaleX(1); }
@supports (animation-timeline: view()) {
@keyframes parallaxY { from { transform: translateY(-18px) scale(1.04); } to { transform: translateY(18px) scale(1.04); } }
.about-media img { animation: parallaxY linear both; animation-timeline: view(); animation-range: cover 0% 100%; }
}
/* Layout safety: long text inside a .badge (About page <p class="badge">) must wrap instead of forcing horizontal scroll */
.badge { max-width: 100%; }
p.badge { white-space: normal; text-align: left; }
/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
.scroll-progress { display: none; }
}
@media (hover: none) { :is(.stat-card, .user-card, .service-card, .card):hover { background-image: none; } }
+4 -4
View File
@@ -8,10 +8,10 @@ BookKeepPro handles the books, the payroll and the filings for growing businesse
## Pages
- [Home](https://aiindiacpa.duckdns.org/)
- [About Us](https://aiindiacpa.duckdns.org/about-us)
- [Services](https://aiindiacpa.duckdns.org/services)
- [Contact Us](https://aiindiacpa.duckdns.org/contact)
- [Home](https://aicpa.duckdns.org/)
- [About Us](https://aicpa.duckdns.org/about-us)
- [Services](https://aicpa.duckdns.org/services)
- [Contact Us](https://aicpa.duckdns.org/contact)
## Services
+1 -1
View File
@@ -14,4 +14,4 @@ Disallow: /reset-password
Disallow: /verify-email
Disallow: /resend-verification
Sitemap: https://aiindiacpa.duckdns.org/sitemap.xml
Sitemap: https://aicpa.duckdns.org/sitemap.xml
+6 -6
View File
@@ -1,32 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://aiindiacpa.duckdns.org/</loc>
<loc>https://aicpa.duckdns.org/</loc>
<changefreq>monthly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://aiindiacpa.duckdns.org/about</loc>
<loc>https://aicpa.duckdns.org/about</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://aiindiacpa.duckdns.org/services</loc>
<loc>https://aicpa.duckdns.org/services</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://aiindiacpa.duckdns.org/contact</loc>
<loc>https://aicpa.duckdns.org/contact</loc>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://aiindiacpa.duckdns.org/login</loc>
<loc>https://aicpa.duckdns.org/login</loc>
<changefreq>yearly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://aiindiacpa.duckdns.org/signup</loc>
<loc>https://aicpa.duckdns.org/signup</loc>
<changefreq>yearly</changefreq>
<priority>0.5</priority>
</url>
+20 -18
View File
@@ -98,19 +98,7 @@ export default function AdminChatbot() {
// ── System overview ───────────────────────────────────────────────────────
const handleAdminStatusCheck = async () => {
setMessages(prev => [...prev, { type: 'user', role: 'user', text: 'Give me a system overview.' }]);
setView('chat');
try {
const res = await authFetch('/api/chatbot/admin-status');
if (res.ok) {
const data = await res.json();
setMessages(prev => [...prev, { type: 'bot', role: 'assistant', text: data.message }]);
} else {
setMessages(prev => [...prev, { type: 'bot', role: 'assistant', text: 'Could not fetch system status right now.' }]);
}
} catch {
setMessages(prev => [...prev, { type: 'bot', role: 'assistant', text: 'Network error.' }]);
}
sendMessage('Give me a system overview.');
};
// ── Bulk action executor with confirmation ────────────────────────────────
@@ -161,18 +149,32 @@ export default function AdminChatbot() {
const replyText = data.content || "Sorry, I couldn't understand that.";
// Check if response contains a bulk_action JSON block
const bulkMatch = replyText.match(/\{[^{}]*"bulk_action"[^{}]*\}/s);
if (bulkMatch) {
let jsonStr = replyText;
const mdMatch = replyText.match(/```(?:json)?\s*(\{[\s\S]*?\})\s*```/);
if (mdMatch) {
jsonStr = mdMatch[1];
} else {
const firstIdx = replyText.indexOf('{');
const lastIdx = replyText.lastIndexOf('}');
if (firstIdx !== -1 && lastIdx !== -1) {
jsonStr = replyText.substring(firstIdx, lastIdx + 1);
}
}
if (jsonStr.includes('"bulk_action"')) {
try {
const parsed = JSON.parse(bulkMatch[0]);
const parsed = JSON.parse(jsonStr);
if (parsed.bulk_action) {
setPendingBulk(parsed.bulk_action);
const cleanText = replyText.replace(bulkMatch[0], '').trim();
const cleanText = replyText.replace(jsonStr, '').replace(/```(?:json)?|```/g, '').trim();
setMessages(prev => [...prev, { type: 'bot', role: 'assistant', text: cleanText || "I can do that. Please confirm below." }]);
setIsTyping(false);
return;
}
} catch { /* not valid JSON, render as text */ }
} catch (e) {
console.error("Failed to parse JSON:", e, jsonStr);
/* not valid JSON, render as text */
}
}
setMessages(prev => [...prev, { type: 'bot', role: 'assistant', text: replyText }]);
+43
View File
@@ -0,0 +1,43 @@
import { useEffect, useRef, useState } from 'react';
// Ledger-style ticking counter. Counts from the previous value to the new one
// once visible; reduced-motion users get the final number immediately. The
// animated text is aria-hidden and the final value is exposed to screen readers.
export default function CountUp({ value, duration = 1100, prefix = '', suffix = '' }) {
const target = Number(value);
const valid = Number.isFinite(target);
const [shown, setShown] = useState(0);
const ref = useRef(null);
const from = useRef(0);
useEffect(() => {
if (!valid) return undefined;
const reduce = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
if (reduce || target === from.current) { setShown(target); from.current = target; return undefined; }
let raf = 0;
let started = false;
const run = () => {
started = true;
const start = performance.now();
const a = from.current;
const tick = (now) => {
const t = Math.min(1, (now - start) / duration);
const eased = 1 - Math.pow(1 - t, 4); // easeOutQuart
setShown(Math.round(a + (target - a) * eased));
if (t < 1) raf = requestAnimationFrame(tick); else from.current = target;
};
raf = requestAnimationFrame(tick);
};
const io = new IntersectionObserver(([en]) => { if (en.isIntersecting && !started) { io.disconnect(); run(); } }, { threshold: 0.3 });
if (ref.current) io.observe(ref.current);
return () => { io.disconnect(); cancelAnimationFrame(raf); };
}, [target, valid, duration]);
if (!valid) return <span>{value}</span>;
return (
<span ref={ref}>
<span aria-hidden="true">{prefix}{shown.toLocaleString('en-US')}{suffix}</span>
<span className="sr-only">{prefix}{target.toLocaleString('en-US')}{suffix}</span>
</span>
);
}
@@ -1,4 +1,4 @@
import * as XLSX from 'xlsx';
import { useState } from 'react';
import ExpandableValue from './ExpandableValue';
@@ -62,45 +62,7 @@ export default function ExpandableSummaryBlock({ extractedData, onSave }) {
}
};
const handleExport = () => {
// Export extracted AI data as a proper .xlsx file using SheetJS
const { _meta, ...dataFields } = extractedData || {};
const rows = [['Field', 'Value']];
Object.entries(dataFields).forEach(([key, val]) => {
let valStr = val;
if (Array.isArray(val)) valStr = val.join('; ');
else if (typeof val === 'object' && val !== null) valStr = JSON.stringify(val);
let finalKey = String(key);
let finalVal = String(valStr ?? '');
// Sanitize CSV/Excel Formula Injection
if (/^[=+\-@]/.test(finalKey)) finalKey = "'" + finalKey;
if (/^[=+\-@]/.test(finalVal)) finalVal = "'" + finalVal;
rows.push([finalKey, finalVal]);
});
const ws = XLSX.utils.aoa_to_sheet(rows);
// Bold + green header
['A1', 'B1'].forEach(ref => {
if (ws[ref]) ws[ref].s = { font: { bold: true, color: { rgb: 'FFFFFF' } }, fill: { fgColor: { rgb: '2C7A5B' } } };
});
// Column widths
ws['!cols'] = [
{ wch: Math.max(10, ...Object.keys(dataFields).map(k => k.length + 2)) },
{ wch: 45 },
];
const wb = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, 'Extracted Data');
XLSX.writeFile(wb, 'extracted_data.xlsx');
}
const showToggle = entries.length > 3;
const showToggle = entries.length > 3;
const entriesToShow = expanded ? entries : entries.slice(0, 3);
const confidenceStyle = CONFIDENCE_STYLES[_meta?.tier] || CONFIDENCE_STYLES.unknown;
@@ -164,9 +126,6 @@ export default function ExpandableSummaryBlock({ extractedData, onSave }) {
) : <div />}
<div style={{ display: 'flex', gap: '6px' }}>
<button onClick={handleExport} style={{ border: 'none', background: 'transparent', cursor: 'pointer', fontSize: '11px', color: 'var(--muted)', display: 'flex', alignItems: 'center', gap: '4px', padding: '2px' }} title="Export Excel">
<span className="material-symbols-outlined" style={{ fontSize: '14px' }}>download</span> Export Excel
</button>
<button onClick={handleEditClick} style={{ border: 'none', background: 'transparent', cursor: 'pointer', fontSize: '11px', color: 'var(--emerald)', display: 'flex', alignItems: 'center', gap: '4px', padding: '2px', fontWeight: 600 }} title="Edit Summary">
<span className="material-symbols-outlined" style={{ fontSize: '14px' }}>edit</span> Edit
</button>
+2 -2
View File
@@ -23,7 +23,7 @@ export default function ExpandableValue({ value, isArray }) {
style={{
background: 'none',
border: 'none',
color: 'var(--primary)',
color: 'var(--emerald)',
fontSize: '12px',
fontWeight: 600,
padding: '4px 0',
@@ -60,7 +60,7 @@ export default function ExpandableValue({ value, isArray }) {
style={{
background: 'none',
border: 'none',
color: 'var(--primary)',
color: 'var(--emerald)',
fontSize: '12px',
fontWeight: 600,
padding: '4px 0',
+2 -1
View File
@@ -20,7 +20,8 @@ export default function Footer() {
<div className="footer-contact">
<h3>Reach us</h3>
<p>USA · 2520 Indigo Dr, McKinney, TX 75072</p>
<p>India · 508 White Square, Hinjewadi Road, Pune 411057</p>
<p>India · Office no.405, Fourth floor, Above Just In Time,<br />
Landmark Centre, Survey No 46/1B, Plot No 2, Satara Rd,<br /> Opposite City Pride Theater, Pune, Maharashtra-411009</p>
<p>atharvg.aiindia@gmail.com</p>
<p>+91 8275367267</p>
</div>
+23
View File
@@ -0,0 +1,23 @@
import React from 'react';
export default function StatusChip({ status, note }) {
const s = (status || 'pending').toLowerCase();
let badgeClass = 'badge-yellow';
if (s === 'approved' || s === 'filed' || s === 'verified') badgeClass = 'badge-green';
if (s === 'rejected' || s === 'error') badgeClass = 'badge-red';
if (s === 'sent_for_approval') badgeClass = 'badge-blue';
const statusText = s.replace(/_/g, ' ').toUpperCase();
return (
<div className="status-chip-container">
<span className={`badge ${badgeClass} `}>{statusText}</span>
{note && (
<div className="status-chip-note">
{s === 'rejected' ? 'Reason: ' : 'Note: '}{note}
</div>
)}
</div>
);
}
+70 -3
View File
@@ -5,19 +5,19 @@
--color-brand-emerald: #1F5D46;
--color-brand-emerald-dark: #163F30;
--color-brand-emerald-light: #E8F1EC;
--color-brand-brass: #B0803D;
--color-brand-brass: #8F6528;
--color-brand-brass-dark: #8F6528;
--color-brand-brass-light: #F6EEE0;
--color-brand-paper: #F5F2E9;
--color-brand-card: #FFFFFF;
--color-brand-muted: #6B7268;
--color-brand-muted: #656C62;
--color-brand-border: #E3DDC9;
--color-status-success: #1F5D46;
--color-status-success-bg: #E8F1EC;
--color-status-error: #A63A3A;
--color-status-error-bg: #F7E9E9;
--color-status-warn: #B0803D;
--color-status-warn: #8F6528;
--color-status-warn-bg: #F6EEE0;
--font-sans: "IBM Plex Sans", system-ui, sans-serif;
@@ -321,3 +321,70 @@ h3 { @apply text-2xl md:text-3xl; }
.toast-info { border-left: 4px solid var(--emerald); }
.toast-message { flex: 1; font-size: 14px; font-weight: 500; }
.toast-close { background: none; border: none; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
/* -------------------------------- */
/* Fixes from QA */
/* -------------------------------- */
.tab-bar {
display: flex;
gap: 8px;
border-bottom: 1px solid var(--border);
margin-bottom: 24px;
overflow-x: auto;
scrollbar-width: none; /* Firefox */
position: relative;
white-space: nowrap;
}
.tab-bar::-webkit-scrollbar {
display: none; /* Chrome/Safari */
}
/* Fade on the right edge to indicate scrolling */
.tab-bar-container {
position: relative;
}
.tab-bar-container::after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 40px;
background: linear-gradient(to right, transparent, var(--paper));
pointer-events: none;
}
.tab-btn {
background: transparent;
border: none;
border-bottom: 2px solid transparent;
padding: 12px 16px;
font-weight: 600;
font-size: 15px;
color: var(--muted);
cursor: pointer;
display: flex;
align-items: center;
gap: 8px;
transition: all 0.2s;
}
.tab-btn:hover {
color: var(--navy);
}
.tab-btn.active {
color: var(--emerald);
border-bottom-color: var(--emerald);
}
.card-title {
font-family: var(--font-sans);
font-weight: 600;
}
.footer-copy {
color: #8c9289; /* Increased contrast for footer copyright */
}
+3 -2
View File
@@ -1,9 +1,10 @@
import { Outlet, Link, useNavigate } from 'react-router-dom';
import { Outlet, Link, useNavigate, useLocation } from 'react-router-dom';
import { useAuth } from '../context/AuthContext';
export default function DashboardLayout() {
const { user, logout } = useAuth();
const navigate = useNavigate();
const { pathname } = useLocation();
return (
<div className="app-body">
@@ -21,7 +22,7 @@ export default function DashboardLayout() {
</div>
</header>
<main className={`${(user?.role === 'admin' || user?.role === 'super_admin') ? 'page-main-wide' : 'page-main'} page-enter`}>
<main key={pathname} className={`${(user?.role === 'admin' || user?.role === 'super_admin') ? 'page-main-wide' : 'page-main'} page-enter`}>
<Outlet />
</main>
</div>
+3 -2
View File
@@ -1,12 +1,13 @@
import { Outlet } from 'react-router-dom';
import { Outlet, useLocation } from 'react-router-dom';
import Navbar from '../components/Navbar';
import Footer from '../components/Footer';
export default function MarketingLayout() {
const { pathname } = useLocation();
return (
<>
<Navbar />
<main>
<main key={pathname} className="page-enter">
<Outlet />
</main>
<Footer />
+3 -1
View File
@@ -1,2 +1,4 @@
import { Outlet } from 'react-router-dom';
export default function PublicLayout() { return <Outlet />; }
export default function PublicLayout() { return <main>
<Outlet />
</main>; }
+2
View File
@@ -3,6 +3,7 @@ import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App.jsx'
import { initScrollReveal } from './utils/scrollReveal.js'
import { initMotion } from './utils/motion.js'
createRoot(document.getElementById('root')).render(
<StrictMode>
@@ -11,3 +12,4 @@ createRoot(document.getElementById('root')).render(
)
initScrollReveal()
initMotion()
+5 -5
View File
@@ -11,7 +11,7 @@ export default function AdminDashboard() {
const [confirmConfig, setConfirmConfig] = useState({
isOpen: false, title: "", message: "", confirmText: "OK", isDestructive: false, onConfirm: () => {}
});
const [activeTab, setActiveTab] = useState("users");
// activeTab state removed (unused)
const [stats, setStats] = useState({ total_users: 0, pending_personal: 0, pending_business: 0, admins: 0 });
const [bookmarks, setBookmarks] = useState([]);
const [users, setUsers] = useState([]);
@@ -225,7 +225,7 @@ export default function AdminDashboard() {
<input
type="text"
className="search-input"
style={{ width: '100%', padding: '10px 12px 10px 40px', border: '1px solid var(--border)', borderRadius: 'var(--radius-full)', outline: 'none' }}
style={{ width: '100%', padding: '10px 12px 10px 40px', border: '1px solid var(--border)', borderRadius: 'var(--radius-pill)', outline: 'none' }}
placeholder="Search by name or email"
value={search}
onChange={(e) => setSearch(e.target.value)}
@@ -233,7 +233,7 @@ export default function AdminDashboard() {
</div>
<select
className="select-input"
style={{ width: 'auto', padding: '10px 16px', borderRadius: 'var(--radius-full)', border: '1px solid var(--border)', outline: 'none', background: 'white' }}
style={{ width: 'auto', padding: '10px 16px', borderRadius: 'var(--radius-pill)', border: '1px solid var(--border)', outline: 'none', background: 'white' }}
value={userSort}
onChange={(e) => setUserSort(e.target.value)}
>
@@ -245,7 +245,7 @@ export default function AdminDashboard() {
</select>
<select
className="select-input"
style={{ width: 'auto', padding: '10px 16px', borderRadius: 'var(--radius-full)', border: '1px solid var(--border)', outline: 'none', background: 'white' }}
style={{ width: 'auto', padding: '10px 16px', borderRadius: 'var(--radius-pill)', border: '1px solid var(--border)', outline: 'none', background: 'white' }}
value={filterYear}
onChange={(e) => setFilterYear(e.target.value)}
>
@@ -300,7 +300,7 @@ export default function AdminDashboard() {
</div>
</div>
</div>
<div className="user-bottom" style={{marginTop: 'auto', paddingTop: '16px', borderTop: '1px solid var(--border)', display: 'flex', alignItems: 'center', flexWrap: 'wrap', gap: '8px', paddingTop: '16px', marginTop: '20px'}}>
<div className="user-bottom" style={{marginTop: 'auto', paddingTop: '16px', borderTop: '1px solid var(--border)', display: 'flex', alignItems: 'center', flexWrap: 'wrap', gap: '8px'}}>
<span className={`badge ${b.type === 'personal' ? 'badge-blue' : b.type === 'business' ? 'badge-green' : 'badge-gray'}`} style={{textTransform:'uppercase', fontSize: '12px'}}>
{b.type}
</span>
+38 -49
View File
@@ -4,6 +4,7 @@ import { useAuth } from '../context/AuthContext';
import { useToast } from '../context/ToastContext';
import ExpandableSummaryBlock from '../components/ExpandableSummaryBlock';
import ConfirmModal from '../components/ConfirmModal';
import StatusChip from '../components/StatusChip';
export default function AdminUserDetail() {
@@ -44,29 +45,7 @@ export default function AdminUserDetail() {
const [markFiledLoading, setMarkFiledLoading] = useState(false);
// Export Excel Function
const exportToExcel = async () => {
try {
showToast("Preparing Excel export...", "info");
const res = await authFetch(`/api/upload/admin/users/${userId}/export`);
if (res.ok) {
const blob = await res.blob();
const url = window.URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = `user_${userId}_excel_summaries.zip`;
document.body.appendChild(a);
a.click();
a.remove();
window.URL.revokeObjectURL(url);
showToast("Excel export ready!", "success");
} else {
showToast("Failed to export Excel file", "error");
}
} catch (err) {
console.error(err);
showToast("Error exporting Excel file", "error");
}
};
;
// States for Audit Log
const [auditLog, setAuditLog] = useState([]);
@@ -261,6 +240,7 @@ export default function AdminUserDetail() {
if (res.ok) {
setSendApprovalPanel(null);
showToast("Document sent to client for approval ✔", "success");
setDocuments(prev => prev.map(d => d.id === docId ? { ...d, review_status: 'sent_for_approval', review_note: note || d.review_note } : d));
fetchUserDetails();
} else {
const data = await res.json().catch(() => ({}));
@@ -393,13 +373,10 @@ export default function AdminUserDetail() {
const sendEmail = async (type) => {
const docsToReview = documents.filter(d => d.type === type);
const approved = docsToReview.filter(d => d.review_status === "approved").map(d => d.doc_type);
const rejected = docsToReview.filter(d => d.review_status === "rejected").map(d => d.doc_type);
const approved = docsToReview.filter(d => d.review_status === "approved").map(d => d.filename || d.doc_type);
const rejected = docsToReview.filter(d => d.review_status === "rejected").map(d => d.filename || d.doc_type);
if (approved.length === 0 && rejected.length === 0) {
showToast(`No ${type} documents selected.`, "warning");
return;
}
try {
const res = await authFetch("/api/review/notify-user", {
@@ -540,7 +517,7 @@ export default function AdminUserDetail() {
{(userDetail.name || "U").charAt(0).toUpperCase()}
</div>
<div>
<div style={{fontWeight:700, fontSize:'18px', color:'var(--navy)'}}>{userDetail.name || "—"}</div>
<h1 style={{fontWeight: 700, fontSize: "18px", color: "var(--navy)", margin: 0}}>{userDetail.name || "?"}</h1>
<div style={{fontSize:'13px', color:'var(--muted)', marginTop:'2px'}}>{userDetail.email}</div>
<div style={{display:'flex', gap:'8px', marginTop:'6px', flexWrap:'wrap'}}>
{currentUser?.role === 'super_admin' && currentUser.id !== userDetail.id ? (
@@ -756,7 +733,7 @@ export default function AdminUserDetail() {
</div>
<div className="doc-review-sidebar">
<div className="card-flat" style={{display:'flex', flexDirection:'column', gap:'16px'}}>
<h3>Filing Timeline</h3>
<h3 className="card-title">Filing Timeline</h3>
{deadlines.filter(d => d.doc_type === 'personal').map(d => (
<div key="personal-dl" style={{
margin: '0 0 16px', padding: '12px 16px',
@@ -929,7 +906,7 @@ export default function AdminUserDetail() {
</div>
<div className="doc-review-sidebar">
<div className="card-flat" style={{display:'flex', flexDirection:'column', gap:'16px'}}>
<h3>Filing Timeline</h3>
<h3 className="card-title">Filing Timeline</h3>
{deadlines.filter(d => d.doc_type === 'business').map(d => (
<div key="business-dl" style={{
margin: '0 0 16px', padding: '12px 16px',
@@ -971,7 +948,7 @@ export default function AdminUserDetail() {
<div className="tab-panel active">
<div className="card-flat">
<div style={{display:'flex', justifyContent:'space-between', alignItems:'center', marginBottom:'16px', flexWrap:'wrap', gap:'8px'}}>
<h3 style={{margin:0}}>Admin Returns / Documents</h3>
<h3 style={{margin:0}} className="card-title">Admin Returns / Documents</h3>
<div style={{display:'flex', gap:'8px', flexWrap:'wrap'}}>
<input type="file" hidden ref={adminDocInputRef} accept=".pdf,.doc,.docx,.xls,.xlsx" onChange={e => {if(e.target.files[0]) uploadAdminDoc(e.target.files[0])}} />
<button className="btn btn-primary btn-sm" style={{borderRadius:'var(--radius-sm)'}} onClick={() => adminDocInputRef.current?.click()}>+ Upload Return</button>
@@ -1009,18 +986,9 @@ export default function AdminUserDetail() {
<div className="text-sm text-muted">{doc.filename}</div>
</td>
<td>{doc.tax_year || <span className="text-muted">N/A</span>}</td>
<td>{new Date(doc.uploaded_at).toLocaleDateString()}</td>
<td>{new Date(doc.uploaded_at).toLocaleDateString('en-US', { year: 'numeric', month: 'short', day: 'numeric' })}</td>
<td>
{(() => {
const s = doc.review_status || 'pending';
const cls = s === 'approved' ? 'badge-green' : s === 'rejected' ? 'badge-red' : s === 'sent_for_approval' ? 'badge-blue' : s === 'filed' ? 'badge-green' : 'badge-yellow';
return (
<div>
<span className={`badge ${cls}`} style={{fontWeight:700}}>{s.replace(/_/g,' ').toUpperCase()}</span>
{doc.review_note && <div className="text-sm text-muted" style={{marginTop:'3px', fontSize:'11px'}}>{doc.review_note}</div>}
</div>
);
})()}
<StatusChip status={doc.review_status} note={doc.review_note} />
</td>
<td>
<div style={{display:'flex', gap:'6px', flexWrap:'wrap'}}>
@@ -1031,7 +999,17 @@ export default function AdminUserDetail() {
{doc.bookmarked ? 'star' : 'star_border'}
</span>
</button>
{doc.review_status !== 'filed' && doc.review_status !== 'approved' && (
{doc.review_status === 'sent_for_approval' ? (
<button
className="btn btn-secondary btn-sm"
style={{fontSize:'12px', display:'inline-flex', alignItems:'center', gap:'4px'}}
onClick={() => setSendApprovalPanel({ docId: doc.id, note: '' })}
disabled={sendingApproval}
title="Already sent to client. Click to resend notification."
>
<span>📨 Resend for Approval</span>
</button>
) : (doc.review_status !== 'filed' && doc.review_status !== 'approved') ? (
<button
className="btn btn-primary btn-sm"
style={{background:'#2c7a5b', borderColor:'#2c7a5b', fontSize:'12px'}}
@@ -1040,8 +1018,19 @@ export default function AdminUserDetail() {
>
📤 Send for Approval
</button>
) : null}
{doc.review_status === 'approved' ? (
<button
className="btn btn-secondary btn-sm"
disabled
title="Approved return is locked from deletion"
style={{ opacity: 0.5, cursor: 'not-allowed' }}
>
Locked
</button>
) : (
<button className="btn btn-danger btn-sm" onClick={() => deleteAdminDoc(doc.id)}>Delete</button>
)}
<button className="btn btn-danger btn-sm" onClick={() => deleteAdminDoc(doc.id)}>Delete</button>
</div>
</td>
</tr>
@@ -1058,7 +1047,7 @@ export default function AdminUserDetail() {
display:'flex', flexDirection:'column', gap:'10px'
}}>
<div style={{fontWeight:600, fontSize:'13px', color:'#2c7a5b'}}>
📤 Send this document to client for review
{doc.review_status === 'sent_for_approval' ? '📨 Resend this document to client for review' : '📤 Send this document to client for review'}
</div>
<textarea
rows={2}
@@ -1080,7 +1069,7 @@ export default function AdminUserDetail() {
disabled={sendingApproval}
onClick={() => sendReturnForApproval(doc.id, sendApprovalPanel.note)}
>
{sendingApproval ? 'Sending...' : 'Confirm & Email Client'}
{sendingApproval ? 'Sending...' : doc.review_status === 'sent_for_approval' ? 'Resend & Email Client' : 'Confirm & Email Client'}
</button>
</div>
</div>
@@ -1101,7 +1090,7 @@ export default function AdminUserDetail() {
{activeTab === 'audit' && (
<div className="tab-panel active">
<div className="card-flat">
<h3 style={{marginBottom:'16px'}}>Recent Activity</h3>
<h3 style={{marginBottom:'16px'}} className="card-title">Recent Activity</h3>
{auditLog.length === 0 ? (
<p className="text-muted">No audit logs found.</p>
) : (
+3 -3
View File
@@ -59,7 +59,7 @@ export default function Contact() {
<div className="contact-container">
<div className="contact-info">
<div className="info-box usa">
<h3>USA</h3>
<h3 className="card-title">USA</h3>
<p>2520 Indigo Dr<br />McKinney, TX<br />75072, United States</p>
<p className="phone">
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>call</span> +1 469-796-6151
@@ -67,7 +67,7 @@ export default function Contact() {
</div>
<div className="info-box ind">
<h3>India</h3>
<h3 className="card-title">India</h3>
<p>508, White Square,<br />Hinjewadi Road, Pune<br />411057, India</p>
<p className="phone">
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>call</span> +91 738 793 6020
@@ -76,7 +76,7 @@ export default function Contact() {
</div>
<form className="contact-form" onSubmit={handleSubmit}>
<h3 style={{ marginBottom: '22px' }}>Send us a message</h3>
<h3 style={{ marginBottom: '22px' }} className="card-title">Send us a message</h3>
<div className="form-row">
<input
type="text"
+5 -4
View File
@@ -1,4 +1,5 @@
import { Link } from 'react-router-dom';
import CountUp from '../components/CountUp';
const SERVICES = [
{
@@ -39,15 +40,15 @@ export default function Home() {
<div className="hero-stats">
<div className="stat-block">
<div className="stat-figure tnum">27</div>
<div className="stat-figure tnum"><CountUp value={27} /></div>
<div className="stat-caption">Years in accounting</div>
</div>
<div className="stat-block">
<div className="stat-figure tnum">2</div>
<div className="stat-figure tnum"><CountUp value={2} /></div>
<div className="stat-caption">Countries operating</div>
</div>
<div className="stat-block">
<div className="stat-figure tnum">100%</div>
<div className="stat-figure tnum"><CountUp value={100} suffix="%" /></div>
<div className="stat-caption">Filings on schedule</div>
</div>
</div>
@@ -89,7 +90,7 @@ export default function Home() {
</div>
<div className="service-body">
<span className="service-label">{s.label}</span>
<h3>{s.title}</h3>
<h3 className="card-title">{s.title}</h3>
<Link to="/contact"><button className="btn btn-outline btn-sm w-full">Get consultation</button></Link>
</div>
</div>
+2 -2
View File
@@ -83,7 +83,7 @@ export default function Profile() {
</div>
<div className="card" style={{ marginBottom: '20px' }}>
<h3 style={{ marginBottom: '20px', paddingBottom: '12px', borderBottom: '1px solid var(--border)' }}>Account Info</h3>
<h3 style={{ marginBottom: '20px', paddingBottom: '12px', borderBottom: '1px solid var(--border)' }} className="card-title">Account Info</h3>
<div className="form-group">
<label className="form-label">Email Address <span style={{ color: 'var(--muted)', fontWeight: 400 }}>(cannot be changed)</span></label>
<input type="email" className="input" readOnly value={user?.email || ''} />
@@ -102,7 +102,7 @@ export default function Profile() {
<div className="card" style={{ marginBottom: '24px' }}>
<div className="flex-between" style={{ marginBottom: '4px', cursor: 'pointer' }} onClick={() => setShowPwSection(!showPwSection)}>
<h3>Change Password</h3>
<h3 className="card-title">Change Password</h3>
<span style={{ color: 'var(--muted)', fontSize: '18px' }}>{showPwSection ? '▼' : '▶'}</span>
</div>
<p className="text-sm" style={{ marginBottom: 0 }}>Click to expand and update your password</p>
+6 -6
View File
@@ -158,8 +158,8 @@ export default function UploadBusiness() {
<p className="page-meta">Upload your business tax documents securely</p>
</div>
<div style={{display:'flex', flexDirection:'column', alignItems:'flex-end', gap:'4px'}}>
<label className="form-label" style={{margin:0}}>Tax Year</label>
<select
<label htmlFor="taxYearSelect" className="form-label" style={{margin:0}}>Tax Year</label>
<select id="taxYearSelect"
className="select-input"
style={{width:'auto', padding:'8px 14px'}}
value={taxYear}
@@ -171,7 +171,7 @@ export default function UploadBusiness() {
</div>
<div className="card" style={{marginBottom: '20px'}}>
<h3 style={{marginBottom: '16px'}}>Required Documents</h3>
<h3 style={{marginBottom: '16px'}} className="card-title">Required Documents</h3>
<div id="docWrapper">
{loading ? (
<div className="empty-state">Loading templates...</div>
@@ -226,7 +226,7 @@ export default function UploadBusiness() {
) : uploaded.length ? (
<span className="pill-pending"><span className="material-symbols-outlined">pending</span> Pending Review</span>
) : dt.download ? (
<a href={dt.download} target="_blank" rel="noopener noreferrer" className="btn-link" style={{ fontSize: '14px', color: 'var(--brand)', textDecoration: 'underline' }}>View Template</a>
<a href={dt.download} target="_blank" rel="noopener noreferrer" className="btn-link" style={{ fontSize: '14px', color: 'var(--emerald)', textDecoration: 'underline' }}>View Template</a>
) : (
"Missing"
)}
@@ -282,7 +282,7 @@ export default function UploadBusiness() {
<div className="card">
<div className="flex-between" style={{marginBottom: '16px'}}>
<div>
<h3>Additional Documents</h3>
<h3 className="card-title">Additional Documents</h3>
<p className="text-sm" style={{marginTop:'2px'}}>Upload any supplementary business documents</p>
</div>
<label
@@ -348,7 +348,7 @@ export default function UploadBusiness() {
<div className="card mt-20" style={{marginTop: '20px'}}>
<div style={{display:'flex', alignItems:'center', justifyContent:'space-between', flexWrap:'wrap', gap:'16px'}}>
<div>
<h3 style={{marginBottom:'4px'}}>Finished Uploading?</h3>
<h3 style={{marginBottom:'4px'}} className="card-title">Finished Uploading?</h3>
<p className="text-sm" style={{margin:0}}>Send your business documents for review.</p>
</div>
<button className="btn btn-primary" onClick={notifyComplete}>
+6 -6
View File
@@ -160,8 +160,8 @@ export default function UploadPersonal() {
<p className="page-meta">Upload your personal tax documents securely</p>
</div>
<div style={{display:'flex', flexDirection:'column', alignItems:'flex-end', gap:'4px'}}>
<label className="form-label" style={{margin:0}}>Tax Year</label>
<select
<label htmlFor="taxYearSelect" className="form-label" style={{margin:0}}>Tax Year</label>
<select id="taxYearSelect"
className="select-input"
style={{width:'auto', padding:'8px 14px'}}
value={taxYear}
@@ -173,7 +173,7 @@ export default function UploadPersonal() {
</div>
<div className="card" style={{marginBottom: '20px'}}>
<h3 style={{marginBottom: '16px'}}>Required Documents</h3>
<h3 style={{marginBottom: '16px'}} className="card-title">Required Documents</h3>
<div id="docWrapper">
{loading ? (
<div className="empty-state">Loading templates...</div>
@@ -228,7 +228,7 @@ export default function UploadPersonal() {
) : uploaded.length ? (
<span className="pill-pending"><span className="material-symbols-outlined">pending</span> Pending Review</span>
) : dt.download ? (
<a href={dt.download} target="_blank" rel="noopener noreferrer" className="btn-link" style={{ fontSize: '14px', color: 'var(--brand)', textDecoration: 'underline' }}>View Template</a>
<a href={dt.download} target="_blank" rel="noopener noreferrer" className="btn-link" style={{ fontSize: '14px', color: 'var(--emerald)', textDecoration: 'underline' }}>View Template</a>
) : (
"Missing"
)}
@@ -284,7 +284,7 @@ export default function UploadPersonal() {
<div className="card">
<div className="flex-between" style={{marginBottom: '16px'}}>
<div>
<h3>Additional Documents</h3>
<h3 className="card-title">Additional Documents</h3>
<p className="text-sm" style={{marginTop:'2px'}}>Upload any supplementary personal documents</p>
</div>
<label
@@ -350,7 +350,7 @@ export default function UploadPersonal() {
<div className="card mt-20" style={{marginTop: '20px'}}>
<div style={{display:'flex', alignItems:'center', justifyContent:'space-between', flexWrap:'wrap', gap:'16px'}}>
<div>
<h3 style={{marginBottom:'4px'}}>Finished Uploading?</h3>
<h3 style={{marginBottom:'4px'}} className="card-title">Finished Uploading?</h3>
<p className="text-sm" style={{margin:0}}>Send your personal documents for review.</p>
</div>
<button className="btn btn-primary" onClick={notifyComplete}>
+80 -37
View File
@@ -1,4 +1,4 @@
import { useState, useEffect, useCallback } from 'react';
import React, { useState, useEffect, useCallback } from 'react';
import { useNavigate } from 'react-router-dom';
import { useAuth } from '../context/AuthContext';
import { useToast } from '../context/ToastContext';
@@ -13,37 +13,15 @@ export default function UserDashboard() {
const [loadingDocs, setLoadingDocs] = useState(false);
const [docLoading, setDocLoading] = useState(false);
const [engagementLink, setEngagementLink] = useState(null);
// Track which doc rows have the AI summary panel open
const [expandedSummary, setExpandedSummary] = useState({});
const [searchQuery, setSearchQuery] = useState("");
const [searchResults, setSearchResults] = useState([]);
const [isSearching, setIsSearching] = useState(false);
const [deadlines, setDeadlines] = useState([]);
// Reject comment panel for admin docs: { docId, note }
const [rejectPanel, setRejectPanel] = useState(null);
// ── declare callbacks BEFORE the effects that reference them ──
const handleSearch = async (e) => {
e.preventDefault();
if (!searchQuery.trim()) return;
setIsSearching(true);
try {
const res = await authFetch(`/api/search/semantic?q=${encodeURIComponent(searchQuery)}`);
if (res.ok) {
setSearchResults(await res.json());
} else {
showToast("Search failed", "error");
}
} catch (err) {
console.error(err);
showToast("Search failed", "error");
} finally {
setIsSearching(false);
}
};
const checkEngagement = useCallback(async () => {
try {
const res = await authFetch("/api/auth/me");
@@ -87,10 +65,23 @@ export default function UserDashboard() {
}
}, [authFetch]);
const loadDeadlines = useCallback(async () => {
try {
const res = await authFetch("/api/review/my-deadlines");
if (res.ok) {
const data = await res.json();
setDeadlines(Array.isArray(data) ? data : []);
}
} catch (err) {
console.error("Failed to load deadlines:", err);
}
}, [authFetch]);
useEffect(() => {
checkEngagement();
loadAdminDocs();
}, [checkEngagement, loadAdminDocs]);
loadDeadlines();
}, [checkEngagement, loadAdminDocs, loadDeadlines]);
// Poll every 15s while any doc still has ai_summary === null (backend still processing)
useEffect(() => {
@@ -187,9 +178,6 @@ export default function UserDashboard() {
};
const toggleSummary = (docId) => {
setExpandedSummary(prev => ({ ...prev, [docId]: !prev[docId] }));
};
return (
<div>
@@ -200,6 +188,36 @@ export default function UserDashboard() {
</div>
</div>
{/* Action Required: Deadline Warning Banner */}
{deadlines && deadlines.length > 0 && deadlines.some(d => d.days_left <= 7) && (
<div className="card fade-up" style={{
background: 'rgba(230, 81, 0, 0.08)',
border: '1px solid rgba(230, 81, 0, 0.35)',
borderRadius: 'var(--radius-sm)',
padding: '16px 20px',
marginBottom: '20px',
display: 'flex',
alignItems: 'center',
gap: '16px'
}}>
<span className="material-symbols-outlined" style={{fontSize: '32px', color: '#e65100'}}>warning</span>
<div style={{flex: 1}}>
<div style={{fontWeight: 700, color: '#e65100', fontSize: '15px'}}>Action Required: Upcoming Filing Deadlines</div>
<div style={{fontSize: '13px', color: 'var(--navy)', marginTop: '4px'}}>
{deadlines.filter(d => d.days_left <= 7).map((d, idx) => (
<span key={idx} style={{marginRight: '16px', display: 'inline-block'}}>
<strong>{d.doc_type?.toUpperCase()}</strong>: {d.is_overdue ? (
<span style={{color: '#c0392b', fontWeight: 600}}>Overdue by {Math.abs(d.days_left)} day(s)</span>
) : (
<span>Due in {d.days_left} day(s) ({new Date(d.deadline_date).toLocaleDateString()})</span>
)}
</span>
))}
</div>
</div>
</div>
)}
<div className="card fade-up">
<div style={{display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', flexWrap: 'wrap', gap: '16px', marginBottom: '16px'}}>
<div>
@@ -292,7 +310,7 @@ export default function UserDashboard() {
</thead>
<tbody>
{adminDocs.map(doc => (
<>
<React.Fragment key={doc.id}>
<tr key={doc.id}>
<td>
<div style={{fontWeight: 500, color: 'var(--navy)'}}>{doc.doc_label}</div>
@@ -302,14 +320,19 @@ export default function UserDashboard() {
<td>
{doc.review_status ? (
<div>
<span className={`badge ${doc.review_status === 'approved' ? 'badge-green' : doc.review_status === 'rejected' ? 'badge-red' : 'badge-yellow'}`} style={{fontWeight:700}}>
{doc.review_status.toUpperCase()}
<span className={`badge ${doc.review_status === 'approved' ? 'badge-green' : doc.review_status === 'rejected' ? 'badge-red' : doc.review_status === 'sent_for_approval' ? 'badge-blue' : 'badge-yellow'}`} style={{fontWeight:700}}>
{doc.review_status.replace(/_/g, ' ').toUpperCase()}
</span>
{doc.review_status === 'rejected' && doc.review_note && (
<div style={{fontSize:'12px', color:'#c0392b', fontStyle:'italic', marginTop:'4px'}}>
Reason: "{doc.review_note}"
</div>
)}
{doc.review_status === 'sent_for_approval' && doc.review_note && (
<div style={{fontSize:'12px', color:'var(--blue)', fontStyle:'italic', marginTop:'4px'}}>
Note from Admin: "{doc.review_note}"
</div>
)}
</div>
) : (
<span className="badge badge-yellow">PENDING</span>
@@ -318,9 +341,29 @@ export default function UserDashboard() {
<td>
<div style={{display:'flex', gap:'8px', flexWrap:'wrap', alignItems:'center'}}>
<button className="btn btn-secondary btn-sm" onClick={() => viewDoc(doc.storage_key)}>View</button>
<button className="btn btn-secondary btn-sm" onClick={() => downloadDoc(doc.storage_key, doc.filename)} style={{display:'flex', alignItems:'center', gap:'4px'}}><span className="material-symbols-outlined" style={{fontSize:'16px'}}>download</span></button>
<button className="btn btn-primary btn-sm" onClick={() => respondDoc(doc.id, true)} disabled={docLoading}>Approve</button>
<button className="btn btn-danger btn-sm" onClick={() => openUserRejectPanel(doc.id)} disabled={docLoading}>Reject</button>
<button className="btn btn-secondary btn-sm" onClick={() => downloadDoc(doc.storage_key, doc.filename)} style={{display:'flex', alignItems:'center', gap:'4px'}}><span className="material-symbols-outlined" style={{fontSize:'16px'}}>download</span></button>
{(doc.review_status === 'sent_for_approval' || doc.review_status === 'pending' || !doc.review_status) && (
<>
<button
className="btn btn-primary btn-sm"
style={{background:'#2c7a5b', borderColor:'#2c7a5b', display:'inline-flex', alignItems:'center', gap:'4px'}}
onClick={() => respondDoc(doc.id, true)}
disabled={docLoading}
>
<span className="material-symbols-outlined" style={{fontSize:'15px'}}>check_circle</span>
Approve
</button>
<button
className="btn btn-danger btn-sm"
style={{display:'inline-flex', alignItems:'center', gap:'4px'}}
onClick={() => openUserRejectPanel(doc.id)}
disabled={docLoading}
>
<span className="material-symbols-outlined" style={{fontSize:'15px'}}>cancel</span>
Reject
</button>
</>
)}
</div>
</td>
</tr>
@@ -380,7 +423,7 @@ export default function UserDashboard() {
</td>
</tr>
)}
</>
</React.Fragment>
))}
</tbody>
</table>
+46
View File
@@ -0,0 +1,46 @@
// Dynamic-UI runtime (tiny, dependency-free, CSP-safe: only classList + CSSOM property writes).
// - html.motion : opts in to scroll-reveal hiding (never set for reduced-motion users)
// - html[data-scrolled]: navbar / header react after 24px of scroll
// - --scroll : 0..1 page progress, drives the brass progress rule
// - --mx / --my : pointer position inside cards, drives the hover spotlight
const SPOT = '.stat-card, .user-card, .service-card, .card';
export function initMotion() {
if (typeof window === 'undefined') return;
const root = document.documentElement;
const reduce = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
if (!reduce) root.classList.add('motion');
const bar = document.createElement('div');
bar.className = 'scroll-progress';
bar.setAttribute('aria-hidden', 'true');
document.body.appendChild(bar);
let ticking = false;
const update = () => {
const max = root.scrollHeight - root.clientHeight;
const y = window.scrollY || root.scrollTop || 0;
root.style.setProperty('--scroll', max > 0 ? (y / max).toFixed(4) : '0');
root.toggleAttribute('data-scrolled', y > 24);
ticking = false;
};
window.addEventListener('scroll', () => {
if (!ticking) { ticking = true; requestAnimationFrame(update); }
}, { passive: true });
window.addEventListener('resize', update, { passive: true });
update();
if (!reduce && window.matchMedia('(hover: hover)').matches) {
let raf = 0;
document.addEventListener('pointermove', (e) => {
const el = e.target instanceof Element ? e.target.closest(SPOT) : null;
if (!el) return;
cancelAnimationFrame(raf);
raf = requestAnimationFrame(() => {
const r = el.getBoundingClientRect();
el.style.setProperty('--mx', `${e.clientX - r.left}px`);
el.style.setProperty('--my', `${e.clientY - r.top}px`);
});
}, { passive: true });
}
}
+2 -1
View File
@@ -9,9 +9,10 @@ export default defineConfig({
react(),
],
server: {
host: true,
proxy: {
'/api': {
target: 'http://localhost:8000',
target: 'http://127.0.0.1:8000',
changeOrigin: true,
},
},