How shlokgit-04/samajh works
Samajh is an Indian paperwork assistant: users can get plain-language document readings, verified form and scheme guidance, application tracking, profile-based recommendations, and nearby office listings. The main AI workflow runs from document upload or a chat question through the document/chat routes to prompts, tools, and Gemma; signed-in users can also save encrypted scans. Other routes serve accounts, tracker data, recommendations, centres, and printable PDFs. The README documents capabilities whose route implementations were not sampled; their internal connections are shown only where evidenced.
Main entry points: routes_docs.py Read and ask · routes_reco.py Scheme recommendations · store.py User record store · routes_pdf.py Printable checklists
Components 19
User workflows
- Web experience
static/app.js
Guidance and AI
- Read and ask
app/routes_docs.py - AI instructions
app/prompts.py - Gemma client
app/gemini_client.py - Validated readings
app/schemas.py - Knowledge tools
app/tools.py - Form knowledge
data/forms.json - Scheme knowledge
data/schemes.json
Accounts and records
- Accounts and rights
app/routes_auth.py - Sessions and encryption
app/security.py - Encrypted scan vault
app/routes_scans.py - Application tracker
app/routes_tracker.py - User record store
app/store.py
Directories and PDFs
- Scheme recommendations
app/routes_reco.py - Office directory
data/centres.json - Printable checklists
app/routes_pdf.py - PDF renderer
app/pdf.py - Optional Supabase forms
Other components
- Paperwork user
Connections 22
- Paperwork user → Web experience: uses
README.md - Paperwork user → Read and ask: uploads or asks
README.md - Read and ask → AI instructions: uses prompts
app/routes_docs.py - Read and ask → Gemma client: requests analysis
app/routes_docs.py - Read and ask → Knowledge tools: runs chat tools
app/routes_docs.py - Read and ask → Validated readings: validates results
README.md - Paperwork user → Accounts and rights: registers or signs in
README.md - Accounts and rights → Sessions and encryption: creates sessions
app/routes_auth.py - Accounts and rights → User record store: reads and updates
app/routes_auth.py - Read and ask → User record store: saves scans
app/routes_docs.py - Read and ask → Sessions and encryption: encrypts scans
app/routes_docs.py - Encrypted scan vault → User record store: reads and writes
app/routes_scans.py - Encrypted scan vault → Sessions and encryption: encrypts and decrypts
app/routes_scans.py - Application tracker → User record store: persists applications
README.md - Scheme recommendations → Knowledge tools: filters centres
app/routes_reco.py - Scheme recommendations → Office directory: searches directory
README.md - Scheme recommendations → Form knowledge: serves forms
README.md - Scheme recommendations → Scheme knowledge: serves schemes
README.md - Printable checklists → PDF renderer: builds PDFs
app/routes_pdf.py - Printable checklists → Form knowledge: reads form details
app/routes_pdf.py - Printable checklists → Scheme knowledge: reads scheme details
README.md - Optional Supabase forms → Form knowledge: optional forms backend
README.md