How ganeshkumart3095-cyber/samaroh works
Samaroh is a multilingual planner for Indian celebrations. A person enters an event brief through the wizard or asks for a plan; the plan API validates the request, obtains an AI blueprint or curated fallback, and assembles a deterministic plan. The dashboard then supports budget, timeline, vendors, guests, ideas, assistant-driven changes, sharing, and calendar export, with plans saved locally and optionally mirrored to Firestore. README capabilities such as regional calendar checks, grounded ideas, and Google Calendar sync are represented where the tree supports them; unsampled implementations are not assumed to have specific call paths.
Main entry points: Dashboard.tsx Plan dashboard · route.ts Plan API · provider.ts AI provider selection · assemble.ts Plan assembly
Components 25
Planning experience
- Brief wizard
src/ui/wizard/Wizard.tsx - Plan dashboard
src/ui/dashboard/Dashboard.tsx - Plan detail route
src/app/plan/[id]/page.tsx - Four-language UI
src/i18n/index.ts - Browser API client
src/ui/api.ts
Plan generation
- Plan API
src/app/api/plan/route.ts - Ideas API
src/app/api/ideas/route.ts - Brief API
src/app/api/brief/route.ts - Curated templates
src/core/templates.ts
AI and ideas
- Assistant API
src/app/api/assistant/route.ts - Assistant engine
src/ai/assistant.ts - AI provider selection
src/ai/provider.ts - Grounded ideas
src/ai/gemini.ts
Event domain
- Plan assembly
src/core/assemble.ts - Calendar rules
src/core/calendar.ts - Schedule logic
src/core/schedule.ts - Event presets
src/core/presets.ts - Plan mutations
src/core/changes.ts - Rupee allocation
src/core/money.ts - Calendar export
src/core/ics.ts
Persistence and services
- Local plan store
src/store/local.ts - Cloud plan sync
src/store/cloud.ts - Firestore
src/store/firebase.ts - Request validation
src/server/guard.ts
Other components
- Event planner
Connections 31
- Event planner → Brief wizard: enters brief
src/ui/wizard/Wizard.tsx - Brief wizard → Browser API client: requests plan
src/ui/wizard/Wizard.tsx - Browser API client → Plan API: POSTs brief
- Event planner → Plan detail route: opens plan
- Plan detail route → Plan dashboard: renders
src/app/plan/[id]/page.tsx - Plan dashboard → Local plan store: loads and saves
src/ui/dashboard/Dashboard.tsx - Plan dashboard → Browser API client: requests refresh
src/ui/dashboard/Dashboard.tsx - Plan dashboard → Plan mutations: applies changes
src/ui/dashboard/Dashboard.tsx - Plan dashboard → Calendar export: exports calendar
src/ui/dashboard/Dashboard.tsx - Plan dashboard → Assistant API: asks assistant
- Plan dashboard → Four-language UI: translates UI
src/ui/dashboard/Dashboard.tsx - Plan API → Request validation: validates request
src/app/api/plan/route.ts - Plan API → AI provider selection: selects model
src/app/api/plan/route.ts - Plan API → Curated templates: falls back
src/app/api/plan/route.ts - Plan API → Plan assembly: assembles plan
src/app/api/plan/route.ts - Plan assembly → Event presets: uses defaults
src/core/assemble.ts - Plan assembly → Schedule logic: builds schedule
src/core/assemble.ts - Curated templates → Event presets: uses function defaults
src/core/templates.ts - Brief API → AI provider selection: selects model
src/app/api/brief/route.ts - Brief API → Schedule logic: uses trusted date
src/app/api/brief/route.ts - Ideas API → AI provider selection: requests ideas
src/app/api/ideas/route.ts - Ideas API → Curated templates: uses fallback ideas
src/app/api/ideas/route.ts - Assistant API → AI provider selection: selects model
src/app/api/assistant/route.ts - AI provider selection → Assistant engine: creates assistant
src/ai/provider.ts - Assistant engine → Plan mutations: proposes mutations
src/ai/assistant.ts - Assistant engine → Grounded ideas: grounds ideas
- Ideas API → Grounded ideas: uses grounding
- Local plan store → Cloud plan sync: mirrors changes
src/store/local.ts - Cloud plan sync → Firestore: persists remotely
src/store/cloud.ts - Plan dashboard → Calendar rules: calendar constraints
- Plan assembly → Rupee allocation: allocates budget