How priyadharshinik15/astra-lex-analyser works
AstraLex is a contract-intelligence workbench. Users authenticate, then manage contract records from the dashboard or use separate AI analysis, generation, scanning, chat, and translation tools; map and chart views visualize contract data. The frontend is the primary product, while the README describes the backend as proposed/in progress. Links reflect sampled imports and calls or explicit README capabilities; unsampled implementation details and backend persistence connections are not inferred.
Main entry points: App.tsx App and navigation · geminiService.ts Gemini service · Dashboard.tsx Dashboard · AIWorkbench.tsx AI workbench
Components 23
Application shell
- App and navigation
App.tsx
Contract workspace
- Dashboard
components/Dashboard.tsx - Contract service
services/contractService.ts - Prototype contract data
data/mockData.ts - Contract details
components/shared/ContractDetailModal.tsx - Distribution chart
components/ContractDistributionChart.tsx - Global contracts map
components/GlobalContractsMap.tsx
AI tools
- AI workbench
components/AIWorkbench.tsx - Risk analysis result
components/shared/RiskAnalysisResult.tsx - Contract generator
components/ContractGenerator.tsx - Camera scanner
components/CameraScanner.tsx - Camera capture
hooks/useCamera.ts - AI chatbot
components/Chatbot.tsx - Translation
components/shared/TranslationModal.tsx - Gemini service
services/geminiService.ts
Identity services
- Login and registration
components/LoginPage.tsx - Registration page
components/RegisterPage.tsx - Auth service
services/authService.ts - Express server
backend/server.js - Auth routes
backend/routes/auth.js - User model
backend/models/User.js
Other components
- User
- Google Gemini API
Connections 28
- User → App and navigation: uses
README.md - App and navigation → Dashboard: renders
App.tsx - App and navigation → AI workbench: routes to
App.tsx - App and navigation → Contract generator: routes to
App.tsx - App and navigation → Camera scanner: routes to
App.tsx - App and navigation → Global contracts map: routes to
App.tsx - App and navigation → AI chatbot: renders
App.tsx - App and navigation → Translation: renders
App.tsx - App and navigation → Contract service: fetches and updates
App.tsx - Contract service → Prototype contract data: reads
services/contractService.ts - Dashboard → Contract details: opens
components/Dashboard.tsx - Dashboard → Distribution chart: renders
components/Dashboard.tsx - Global contracts map → Contract details: opens
components/GlobalContractsMap.tsx - AI workbench → Gemini service: requests analysis
components/AIWorkbench.tsx - AI workbench → Risk analysis result: shows results
components/AIWorkbench.tsx - Contract generator → Gemini service: requests generation
components/ContractGenerator.tsx - Camera scanner → Camera capture: captures frames
components/CameraScanner.tsx - Camera scanner → Gemini service: requests OCR
components/CameraScanner.tsx - AI chatbot → Gemini service: requests replies
components/Chatbot.tsx - Translation → Gemini service: requests translation
components/shared/TranslationModal.tsx - Gemini service → Google Gemini API: calls
services/geminiService.ts - User → Login and registration: authenticates
README.md - App and navigation → Registration page: shows registration
App.tsx - Login and registration → Auth service: submits credentials
services/authService.ts - Registration page → Auth service: submits registration
services/authService.ts - Auth service → Auth routes: sends auth requests
services/authService.ts - Express server → Auth routes: mounts routes
backend/server.js - Auth routes → User model: queries users
backend/routes/auth.js