Skip to content

Commit 77febea

Browse files
committed
Final deployment: New logo + Advanced multi-agent system ready for production
1 parent a159837 commit 77febea

69 files changed

Lines changed: 5390 additions & 1352 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

check_mui_icons.py

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
#!/usr/bin/env python3
2+
"""
3+
Script to check for invalid Material-UI icon imports across the frontend
4+
"""
5+
6+
import os
7+
import re
8+
import subprocess
9+
import json
10+
from pathlib import Path
11+
12+
def get_available_mui_icons():
13+
"""Get list of available Material-UI icons by checking the package"""
14+
try:
15+
# Try to get icons from node_modules
16+
result = subprocess.run([
17+
'node', '-e',
18+
'console.log(JSON.stringify(Object.keys(require("@mui/icons-material"))))'
19+
], capture_output=True, text=True, cwd='frontend')
20+
21+
if result.returncode == 0:
22+
return json.loads(result.stdout.strip())
23+
else:
24+
print(f"Error getting MUI icons: {result.stderr}")
25+
return []
26+
except Exception as e:
27+
print(f"Error: {e}")
28+
return []
29+
30+
def find_icon_imports(file_path):
31+
"""Find all Material-UI icon imports in a file"""
32+
try:
33+
with open(file_path, 'r', encoding='utf-8') as f:
34+
content = f.read()
35+
36+
# Find import statements from @mui/icons-material
37+
import_pattern = r"import\s*\{([^}]+)\}\s*from\s*['\"]@mui/icons-material['\"]"
38+
matches = re.findall(import_pattern, content, re.MULTILINE)
39+
40+
icons = []
41+
for match in matches:
42+
# Split by comma and clean up
43+
icon_list = [icon.strip().split(' as ')[0].strip() for icon in match.split(',')]
44+
icons.extend(icon_list)
45+
46+
return icons
47+
except Exception as e:
48+
print(f"Error reading {file_path}: {e}")
49+
return []
50+
51+
def check_all_files():
52+
"""Check all frontend files for invalid icon imports"""
53+
frontend_path = Path('frontend/src')
54+
if not frontend_path.exists():
55+
print("Frontend directory not found!")
56+
return
57+
58+
print("🔍 Checking for invalid Material-UI icon imports...")
59+
print("=" * 60)
60+
61+
# Get available icons
62+
available_icons = get_available_mui_icons()
63+
if not available_icons:
64+
print("❌ Could not get list of available icons. Make sure @mui/icons-material is installed.")
65+
return
66+
67+
print(f"✅ Found {len(available_icons)} available Material-UI icons")
68+
print()
69+
70+
# Find all JS/JSX/TS/TSX files
71+
files_to_check = []
72+
for ext in ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx']:
73+
files_to_check.extend(frontend_path.glob(ext))
74+
75+
invalid_imports = []
76+
77+
for file_path in files_to_check:
78+
icons = find_icon_imports(file_path)
79+
if icons:
80+
invalid_in_file = []
81+
for icon in icons:
82+
if icon not in available_icons:
83+
invalid_in_file.append(icon)
84+
85+
if invalid_in_file:
86+
invalid_imports.append({
87+
'file': str(file_path),
88+
'invalid_icons': invalid_in_file
89+
})
90+
91+
# Report results
92+
if invalid_imports:
93+
print("❌ Found invalid icon imports:")
94+
print()
95+
for item in invalid_imports:
96+
print(f"📁 {item['file']}")
97+
for icon in item['invalid_icons']:
98+
print(f" ❌ {icon}")
99+
100+
# Suggest similar icons
101+
similar = [available for available in available_icons
102+
if icon.lower() in available.lower() or available.lower() in icon.lower()]
103+
if similar:
104+
print(f" 💡 Similar: {', '.join(similar[:3])}")
105+
print()
106+
else:
107+
print("✅ No invalid icon imports found!")
108+
109+
return invalid_imports
110+
111+
if __name__ == "__main__":
112+
check_all_files()

frontend/craco.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const path = require('path');
2+
13
module.exports = {
24
webpack: {
35
configure: (webpackConfig) => {
@@ -25,5 +27,6 @@ module.exports = {
2527
devServer: {
2628
historyApiFallback: true,
2729
hot: true,
30+
port: 3002,
2831
},
2932
};

frontend/public/logo192.png

1.37 MB
Loading

frontend/public/logo512.png

1.36 MB
Loading
1.37 MB
Loading

frontend/src/App.js

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import Contact from './pages/Contact';
3333
// Core layout components
3434
import Header from './components/Header';
3535
import Footer from './components/Footer';
36+
import ScrollToTop from './components/ScrollToTop';
3637

3738
// Page components
3839
import HomePage from './pages/HomePage';
@@ -46,6 +47,21 @@ import AdminDashboard from './pages/AdminDashboard';
4647
import NotFoundPage from './pages/NotFoundPage';
4748
import UnauthorizedPage from './pages/UnauthorizedPage';
4849

50+
// Footer link pages
51+
import StatusPage from './pages/StatusPage';
52+
import HelpPage from './pages/HelpPage';
53+
import BugReportPage from './pages/BugReportPage';
54+
import FeatureRequestPage from './pages/FeatureRequestPage';
55+
import PartnersPage from './pages/PartnersPage';
56+
import PressPage from './pages/PressPage';
57+
import CareersPage from './pages/CareersPage';
58+
import TeamPage from './pages/TeamPage';
59+
import OurMissionPage from './pages/OurMissionPage';
60+
import GlossaryPage from './pages/GlossaryPage';
61+
import FAQPage from './pages/FAQPage';
62+
import BlogPage from './pages/BlogPage';
63+
import LiveChatPage from './pages/LiveChatPage';
64+
4965
// New components
5066
import DocumentGenerator from './components/DocumentGenerator';
5167
import ExpungementWizard from './components/ExpungementWizard';
@@ -97,11 +113,7 @@ const ServicesLayout = () => (
97113
<Immigration />
98114
</ProtectedRoute>
99115
} />
100-
<Route path="virtual-paralegal" element={
101-
<ProtectedRoute>
102-
<VirtualParalegalPage />
103-
</ProtectedRoute>
104-
} />
116+
105117
<Route
106118
path="analytics"
107119
element={
@@ -230,14 +242,7 @@ function AppContent() {
230242
}
231243
/>
232244

233-
<Route
234-
path="/chat"
235-
element={
236-
<ProtectedRoute>
237-
<LegalAIChatPage />
238-
</ProtectedRoute>
239-
}
240-
/>
245+
<Route path="/chat" element={<LiveChatPage />} /> {/* NO LOGIN REQUIRED */}
241246

242247
<Route
243248
path="/profile"
@@ -266,12 +271,37 @@ function AppContent() {
266271
<Route path="/documents" element={<DocumentsPage />} />
267272
<Route path="/expert-help" element={<ExpertHelpPage />} />
268273

274+
{/* Virtual Paralegal - Top level route */}
275+
<Route
276+
path="/virtual-paralegal"
277+
element={
278+
<ProtectedRoute>
279+
<VirtualParalegalPage />
280+
</ProtectedRoute>
281+
}
282+
/>
283+
269284
{/* Additional MVP routes */}
270285
<Route path="/about" element={<About />} />
271286
<Route path="/services" element={<Services />} />
272287
<Route path="/resources" element={<Resources />} />
273288
<Route path="/contact" element={<Contact />} />
274289

290+
{/* Footer links - NO LOGIN REQUIRED */}
291+
<Route path="/status" element={<StatusPage />} />
292+
<Route path="/help" element={<HelpPage />} />
293+
<Route path="/bug-report" element={<BugReportPage />} />
294+
<Route path="/feature-request" element={<FeatureRequestPage />} />
295+
<Route path="/partners" element={<PartnersPage />} />
296+
<Route path="/press" element={<PressPage />} />
297+
<Route path="/careers" element={<CareersPage />} />
298+
<Route path="/team" element={<TeamPage />} />
299+
<Route path="/mission" element={<OurMissionPage />} />
300+
<Route path="/rights" element={<RightsPage />} />
301+
<Route path="/glossary" element={<GlossaryPage />} />
302+
<Route path="/faq" element={<FAQPage />} />
303+
<Route path="/blog" element={<BlogPage />} />
304+
275305
{/* Conditionally render premium features */}
276306
<Route
277307
path="/legal-chat/premium"
@@ -328,6 +358,7 @@ function App() {
328358
<I18nextProvider i18n={i18n}>
329359
<SnackbarProvider maxSnack={3}>
330360
<Router>
361+
<ScrollToTop />
331362
<AuthProvider>
332363
<AnalyticsProvider>
333364
<AppContent />

0 commit comments

Comments
 (0)