How divyasree-7/smart-bharat-ai works
Smart Bharat AI is a browser-based civic guidance assistant. Citizens can ask general questions, get profile-based scheme suggestions, or generate complaint drafts; each AI workflow sends a prompt to Groq and presents its response in the UI. Login/profile settings and theme preferences are client-side. The graph preserves the documented informational capabilities, but unsampled pages are represented only where the README or SOURCE INDEX supports them.
Main entry points: App.jsx App routes · AuthContext.jsx Auth and key state · ChakraWheel.jsx Chakra visual · groqService.js Prompt and API client
Components 21
Civic experience
- Application entry
src/main.jsx - App routes
src/App.jsx - Home
src/pages/Home.jsx - Login
src/pages/Login.jsx - Profile settings
src/pages/Profile.jsx - About
src/pages/About.jsx - Not found
src/pages/NotFound.jsx
AI guidance
- Assistant chat
src/pages/Chat.jsx - Scheme finder
src/pages/Schemes.jsx - Complaint assistant
src/pages/Complaint.jsx - Prompt and API client
src/services/groqService.js
Browser state
- Auth and key state
src/context/AuthContext.jsx - Browser local storage
- Theme state
src/context/ThemeContext.jsx - Theme preference
Shared UI
- Navigation bar
src/components/Navbar.jsx - Footer
src/components/Footer.jsx - Chat responses
src/components/ChatMessage.jsx - Chakra visual
src/components/ChakraWheel.jsx
Other components
- Citizen
- Groq chat API
Connections 39
- Citizen → App routes: opens app
src/App.jsx - App routes → Navigation bar: renders
src/App.jsx - App routes → Footer: renders
src/App.jsx - App routes → Home: routes to
src/App.jsx - App routes → Assistant chat: routes to
src/App.jsx - App routes → Scheme finder: routes to
src/App.jsx - App routes → Complaint assistant: routes to
src/App.jsx - App routes → Login: routes to
src/App.jsx - App routes → Profile settings: routes to
src/App.jsx - App routes → About: routes to
src/App.jsx - App routes → Not found: routes to
src/App.jsx - Assistant chat → Prompt and API client: requests guidance
src/pages/Chat.jsx - Scheme finder → Prompt and API client: requests recommendations
src/pages/Schemes.jsx - Complaint assistant → Prompt and API client: requests draft
src/pages/Complaint.jsx - Prompt and API client → Groq chat API: posts completion
src/services/groqService.js - Groq chat API → Prompt and API client: returns response
src/services/groqService.js - Assistant chat → Auth and key state: uses API key
src/pages/Chat.jsx - Scheme finder → Auth and key state: uses API key
src/pages/Schemes.jsx - Complaint assistant → Auth and key state: uses API key
src/pages/Complaint.jsx - Auth and key state → Browser local storage: reads and writes
src/context/AuthContext.jsx - Login → Auth and key state: uses login state
src/pages/Login.jsx - Profile settings → Auth and key state: manages profile
src/pages/Profile.jsx - Theme state → Theme preference: reads and writes
src/context/ThemeContext.jsx - Navigation bar → Auth and key state: uses user state
src/components/Navbar.jsx - Navigation bar → Theme state: toggles theme
src/components/Navbar.jsx - Assistant chat → Chat responses: renders messages
src/pages/Chat.jsx - Scheme finder → Chat responses: renders result
src/pages/Schemes.jsx - Complaint assistant → Chat responses: renders result
src/pages/Complaint.jsx - Chat responses → Chakra visual: renders motif
src/components/ChatMessage.jsx - Navigation bar → Chakra visual: renders motif
src/components/Navbar.jsx - Home → Chakra visual: renders motif
src/pages/Home.jsx - Footer → Chakra visual: uses motif
src/components/Footer.jsx - About → Chakra visual: uses motif
src/pages/About.jsx - Login → Chakra visual: uses motif
src/pages/Login.jsx - Profile settings → Chakra visual: uses motif
src/pages/Profile.jsx - Not found → Chakra visual: uses motif
src/pages/NotFound.jsx - Application entry → App routes: mounts
src/main.jsx - Application entry → Auth and key state: provides state
src/main.jsx - Application entry → Theme state: provides state
src/main.jsx