Home
SaneDevelopers Logo

SANEDEVELOPERSDatabase Spec

Quiz Portal
Ready · 10 Steps
REST / HTTPSQuery User1:N Identities1:N Farms1:N CropsFK Crop1:N ScansDiagnosis FK1:N Daily BhavDispatch Alerts

Farmer Client (App / Web)

client

Node.js Express API Gateway

core

users

table

auth_identities

table

farms

table

farm_crops

table

crop_catalog

table

disease_scans

table

disease_catalog

table

mandi_locations

table

mandi_prices

table

notifications

table
Table Entity Core / ML Service Relational Link / FK

users

table
Purpose & Function

Primary user profile and account record with localized language preferences.

Primary Key: id (UUID)
Key Table Attributes
idPrimary Key (gen_random_uuid())
UUID
full_nameFarmer's full name
VARCHAR(120)
phone_numberUnique registered mobile number
VARCHAR(20)
preferred_languageDefault 'hi', 'mr', 'te', 'en'...
VARCHAR(10)
is_activeAccount status active
BOOLEAN
Performance Indexes
idx_users_phone (UNIQUE)idx_users_email (UNIQUE)

Note for Engineers

All queries to users should use parameterized queries via Prisma / pg driver with indexed UUID lookups.