How gnanadurga09/landsafe-ai works
This repository is a NER risk-command application with a React client, a TypeScript API/authentication foundation, and a separate Python ML backend. The visible client entry routes users to Home; the sampled materials do not establish how Home’s risk workflow invokes backend services, so those domain components are shown without inferred connections. The API router exposes auth and system procedures, with system notifications delegated to the notification module. Source evidence is incomplete, and the README provides no additional capability descriptions.
Main entry points: App.tsx App routes · context.ts Request context · main.tsx Client bootstrap · systemRouter.ts System procedures
Components 19
Client experience
- Client bootstrap
client/src/main.tsx - App routes
client/src/App.tsx - Risk dashboard
client/src/pages/Home.tsx - AI chat
client/src/components/AIChatBox.tsx - Map view
client/src/components/Map.tsx - Auth hook
client/src/_core/hooks/useAuth.ts - tRPC client
client/src/lib/trpc.ts
API and identity
- API router
server/routers.ts - System procedures
server/_core/systemRouter.ts - tRPC middleware
server/_core/trpc.ts - Request context
server/_core/context.ts - OAuth flow
server/_core/oauth.ts - Owner notifications
server/_core/notification.ts
Risk and persistence
- ML backend
ml_backend/app.py - Risk logic
shared/risk.ts - User persistence
server/db.ts - Users table
drizzle/schema.ts
Other components
- User
- Notification service
Connections 11
- User → Client bootstrap: opens
- Client bootstrap → App routes: renders
client/src/main.tsx - App routes → Risk dashboard: routes to
client/src/App.tsx - App routes → tRPC client
- API router → System procedures: registers
server/routers.ts - System procedures → Owner notifications: invokes
server/_core/systemRouter.ts - Request context → Users table
server/_core/context.ts - Request context → OAuth flow
- OAuth flow → User persistence: uses
server/_core/oauth.ts - User persistence → Users table: reads/writes
server/db.ts - Owner notifications → Notification service: delivers