ASTROAYODHYA.COM Admin Panel Complete AI-Powered Architecture Document Dual AI Engine: Anthropic Claude (Core Vedic Logic) + Gemini/OpenAI (Content Support) | Doc v1.0 Table of Contents PART 1 — AI ARCHITECTURE Section 1: Dual AI Engine — Master Architecture Section 2: Anthropic Claude — Core Vedic Logic Engine Section 3: Gemini Pro and OpenAI — Supporting Content Engine Section 4: AI Routing Rules — Decision Framework Section 5: AI Prompt Library — All System Prompts PART 2 — ADMIN PANEL MODULES Section 6: Admin Dashboard — Overview and KPIs Section 7: User Management Module Section 8: Forecast Management and AI Pipeline Section 9: Acharya Management Module Section 10: Consultation Management Section 11: Puja Management Module Section 12: Shop and Product Management Section 13: Order and Payment Management Section 14: Membership Management Section 15: Content and Blog Management Section 16: Rashifal and Panchang Management Section 17: SEO and Marketing Tools Section 18: Foundation Management Section 19: Notification and Communication Center Section 20: Analytics and Reporting Section 21: Financial and Payout Management Section 22: System Configuration and Settings Section 23: Queue and Job Monitor Section 24: Security and Audit Log Section 25: Admin Roles and Permissions APPENDIX A: Complete Database Schema APPENDIX B: API Endpoints Reference APPENDIX C: Queue Job Reference APPENDIX D: AI Cost and Token Budget PART 1 — DUAL AI ARCHITECTURE SECTION 1 — Dual AI Engine — Master Architecture 1.1 Why Dual AI? 1.2 The Golden Rule 1.3 Master AI Routing Table SECTION 2 — Anthropic Claude — Core Vedic Logic Engine 2.1 Claude Integration Architecture — Step by Step Vedic Engine (Python/Swiss Ephemeris) computes full chart JSON — all planetary positions, houses, aspects, Dashas, Shadbala Chart JSON stored in Redis cache (key: chart:[user_id], TTL: 30 days) — never recomputed unless birth data changes After forecast order payment confirmed — ForecastGenerationJob dispatched to Laravel Horizon high-priority queue Worker fetches chart JSON + user language preference + plan type (1yr/2yr/3yr/5yr) For each chapter (12-19 chapters depending on plan): ClaudeChapterJob dispatched ClaudeChapterJob calls Claude API via ClaudeForecastService.php with: system_prompt + chart_json + chapter_instructions Claude returns structured JSON response per chapter — NOT free text Chapter JSON stored in forecasts.content column (JSON type in MySQL) After all chapters complete: Acharya review triggered via notification After Acharya approval: PDFGenerationJob dispatched — Puppeteer renders HTML to PDF PDF stored in S3 (private bucket) — signed URL generated for user download User notified via email + WhatsApp + in-app: 'Aapki forecast ready hai' DEV: Claude API endpoint: https://api.anthropic.com/v1/messages. Use anthropic-php SDK (anthropics/anthropic-sdk-php) via Composer. Store API key in AWS Parameter Store — NEVER in .env file or Git. 2.2 ClaudeForecastService.php — Core Structure 2.3 Claude System Prompt — Master Jyotish Prompt Master Jyotish System Prompt — key instructions (stored encrypted in DB): 2.4 Chart JSON Input Schema — Sent to Claude Complete chart JSON structure passed to Claude as user message: 2.5 Claude Output — Structured JSON Response Claude must return valid JSON (enforced in system prompt). Parsed by Laravel and stored in forecasts.content: 2.6 Claude Token Usage and Cost Control NOTE: At Rs 99 plan: Claude cost ~Rs 45. Net margin ~Rs 20 + Rs 32 to Foundation. Premium plans have 3x better margins. Monitor via Anthropic Usage Dashboard monthly. SECTION 3 — Gemini Pro and OpenAI — Supporting Content Engine 3.1 Gemini Pro — Daily Rashifal Generation Use case: Roz raat 3 AM IST — 12 rashiyon ka daily rashifal generate karna. 9 sections each. 108 content blocks per day. 3.2 OpenAI GPT-4o — Blog Draft Generation Use case: Admin blog section mein 'Generate Draft' button — GPT-4o se initial draft, editor review karta hai. 3.3 Gemini Flash — Customer Support Auto-Reply SECTION 4 — AI Routing Rules — Decision Framework 4.1 AI Task Decision Tree Question 1: Kya is task mein chart data (kundali) se koi interpretation ya recommendation hai? YES -> Use ANTHROPIC CLAUDE. No exception whatsoever. NO -> Proceed to Question 2. Question 2: Kya yeh task legally or ethically sensitive hai? (Medical prediction, marriage decision, financial guidance) YES -> Use ANTHROPIC CLAUDE. For careful, nuanced reasoning. NO -> Proceed to Question 3. Question 3: Kya yeh high-volume daily content hai? (Rashifal, social posts, simple support emails) YES -> Use GEMINI PRO/FLASH. Cost-efficient, fast, excellent Hindi. NO -> Proceed to Question 4. Question 4: Kya yeh English mein creative/structured content hai? (Blog, product descriptions, email copy) YES -> Use GPT-4o / GPT-4o-mini. Best English creative output. NO -> Default: Use GEMINI PRO. Multilingual Hindi tasks. 4.2 Model Selection — Cost vs Quality Matrix 4.3 Fallback Strategy SECTION 5 — AI Prompt Library 5.1 Claude Prompts Stored in DB 5.2 Gemini Prompts 5.3 OpenAI Prompts 5.4 Prompt Versioning and A/B Testing PART 2 — ADMIN PANEL MODULES SECTION 6 — Admin Dashboard — Overview and KPIs 6.1 Main Dashboard — 16 KPI Cards (4x4 Grid) 6.2 Live Activity Feed (Laravel Echo + Pusher) 'New order: 3-Year Forecast — [User Name] — Rs 399' 'Forecast generated: [User] — ready for Acharya review' 'Puja booked: Kaal Sarp Dosha Puja — [User] — Rs 7,099' 'New Premium member: [User] — Rs 399/month' 'Foundation contribution: Rs [X] this month so far' 'AI Alert: Claude API response time exceeded 8 seconds' 'Payment failed: [User] — Rs [X] — retrying in 3 days' 6.3 Revenue and Analytics Charts SECTION 7 — User Management Module 7.1 User List View 7.2 User Detail Page — 6 Tabs 7.3 User Impersonation (Support Tool) SECTION 8 — Forecast Management and AI Pipeline 8.1 Forecast Status Pipeline 8.2 AI Generation Controls (Admin Configurable) 8.3 Prompt Editor in Admin Panel 'AI Prompts' section in admin sidebar — Super Admin access only List all prompts: name | model | last updated | version | active/inactive toggle Edit view: system prompt textarea + user prompt template + model selector + max tokens + temperature 'Test Prompt' button: paste sample chart JSON -> see live Claude output in real time 'Version History' tab: see all past versions with diff view. Rollback button on each. 'A/B Test' tab: activate two versions simultaneously — compare approval rates CRITICAL: All prompt changes logged in audit trail with: old content, new content, changed_by, timestamp. Irreversible from UI — requires database restore to undo deleted prompts. 8.4 Acharya Review Interface 8.5 PDF Generation Configuration SECTION 9 — Acharya Management Module 9.1 Acharya List 9.2 Acharya Onboarding Pipeline — 9 Steps Acharya submits application via /acharyas/apply form — admin sees in 'Pending Applications' tab Admin reviews: Brahman lineage certificate + Gurukul certificate + Aadhaar — mark each Verified/Rejected Phone/video interview — admin records notes in interview_notes field Demo review assignment — give 1 test forecast to review — evaluate quality and easy Hindi writing Approve or Reject — if approved: account activated + welcome email + onboarding video sent Badge assignment: Brahman Verified | Ayodhya Resident | Gurukul Trained | Experience years Access setup: Acharya admin panel credentials + 2FA setup + mobile app walkthrough Soft launch: first 5 consultations under supervision — Super Admin monitors Full activation: profile goes live on /acharyas — available for bookings 9.3 Acharya Availability Management SECTION 10 — Consultation Management 10.1 Consultation List 10.2 Live Consultation Monitor 'Live Now' tab — all in-progress sessions with: room ID, participants joined, duration elapsed Connection quality indicator per participant: Green/Yellow/Red 'Join as silent observer' — Super Admin can monitor quality (disclosed in platform terms) Emergency end session button — for policy violations (misconduct, inappropriate content) Auto-alert if session runs > 5 minutes past booked end time without extension payment 10.3 Dispute Resolution Workflow SECTION 11 — Puja Management Module 11.1 Puja Bookings List 11.2 Puja Scheduling Workflow Booking received -> system auto-assigns to available Acharya matching puja type If no Acharya auto-available -> 'Needs Assignment' queue -> admin manually assigns Acharya notified: WhatsApp + email + admin panel notification with sankalp details Day before puja: automated reminder to Acharya with user's sankalp summary Puja day: Acharya opens GPS location on mobile -> 'Capture GPS' in their app -> coordinates stored After puja: Acharya uploads recording -> GPS certificate auto-generated by system Prasad dispatch: admin marks 'Prasad Dispatched' + enters courier + tracking number User notified at each step via WhatsApp 11.3 GPS Certificate Generator Input: booking_id, gps_latitude, gps_longitude, recording_cloudinary_url, acharya_id, puja_timestamp System generates: PDF certificate with QR code linking to /verify/puja/[certificate_id] Certificate contains: puja name + yajman name + GPS coordinates + Google Maps link + Acharya signature Certificate stored in S3 + linked to puja_booking record in DB User auto-notified: 'Aapka GPS certificate ready hai' — download link in email + in-app 11.4 Puja Catalog Management SECTION 12 — Shop and Product Management 12.1 Product Management 12.2 AI Product Description Generator How it works: Admin clicks 'Generate with AI' in product edit form -> enters key facts -> GPT-4o-mini writes Hindi description. Admin enters: product name + key features + planet association + main benefit GPT-4o-mini generates: 200-300 word Hindi description + one-line English summary 'Regenerate' button if not satisfied — generates fresh version Admin edits final text before saving to DB AI ROUTING: Uses: openai_product_desc prompt | Model: gpt-4o-mini | Cost: approx Rs 0.50 per description SECTION 13 — Order and Payment Management 13.1 Unified Orders View 13.2 Payment Management 13.3 Razorpay and Stripe Webhook Management All webhooks logged in webhook_logs table: gateway | event | payload (encrypted) | processed_at | success Failed webhooks: admin alert + manual reprocess button Webhook signature verification status shown per record — auto-reject unsigned webhooks Replay capability: reprocess any past webhook from admin panel SECTION 14 — Membership Management 14.1 Subscription Dashboard 14.2 Subscription List 14.3 WhatsApp Broadcast Management SECTION 15 — Content and Blog Management 15.1 Blog Post Management AI ROUTING: SEO Checker: openai_blog_seo prompt | gpt-4o-mini | Returns JSON: {score, issues[], suggestions[]} | Cost: Rs 0.50/check 15.2 Rashifal Daily Content Management SECTION 16 — Rashifal and Panchang Management 16.1 Rashifal Generation Control 16.2 Panchang Data Management SECTION 17 — SEO and Marketing Tools 17.1 SEO Management Panel 17.2 Email Marketing 17.3 Coupon and Discount Management SECTION 18 — Foundation Management 18.1 Foundation Dashboard 18.2 Foundation Transfer Workflow — Admin Steps End of quarter: CFO calculates net profit in accounting software Opens Admin -> Foundation -> New Transfer button Enters: quarter (Q1/Q2/Q3/Q4), year, total_revenue, operating_costs, net_profit, transfer_amount (50%) Uploads: bank transfer screenshot as proof System creates: foundation_transfers record + public impact report entry 'Notify All Users' button: sends email blast + WhatsApp broadcast about transfer /foundation/impact page auto-updates via ISR — no separate content update needed Foundation team receives notification to issue acknowledgment letter SECTION 19 — Notification and Communication Center 19.1 Notification Queue Management 19.2 Support Ticket System AI ROUTING: Support AI: gemini_support_reply prompt | Agent always reviews — never auto-send | Reduces avg first-response from 4hr to under 30min SECTION 20 — Analytics and Reporting 20.1 Analytics Dashboard 20.2 Custom Report Builder SECTION 21 — Financial and Payout Management 21.1 Acharya Payout System 21.2 GST and Tax Compliance SECTION 22 — System Configuration and Settings 22.1 Platform Settings 22.2 AI Configuration Panel 22.3 Language and Localization SECTION 23 — Queue and Job Monitor 23.1 Queue Monitor 23.2 Key Job Types and Queue Assignment 23.3 Cron Schedule Reference SECTION 24 — Security and Audit Log 24.1 Security Configuration 24.2 Audit Log — What Is Recorded 24.3 Data Security Architecture All PII (birth data, phone numbers, birth locations) encrypted at rest using AES-256 Database credentials stored in AWS Secrets Manager — rotated every 90 days — never in code AI API keys in AWS Parameter Store — Super Admin access only — rotated quarterly S3 buckets: private (forecasts, certificates, recordings) + public-CDN (product images only) HTTPS everywhere — HSTS with 1-year max-age — HTTPS-only cookies PII excluded from all application logs — only user IDs and order IDs logged DPDP Act compliance: user data deletion within 30 days of verified deletion request Database backups: automated daily S3 snapshots — 30-day retention — encrypted SECTION 25 — Admin Roles and Permissions 25.1 Seven Admin Roles 25.2 Permission Implementation Using Filament Shield package for granular permissions per resource per role: NOTE: Each Filament Resource has granular permissions: ViewAny, View, Create, Update, Delete, BulkDelete. Assign per role in admin panel. Changes take effect immediately. APPENDIX A — Complete Database Schema A.1 Core Tables Summary APPENDIX B — Admin API Endpoints Reference B.1 Internal Admin APIs APPENDIX C — Queue Job Reference C.1 All Laravel Horizon Jobs APPENDIX D — AI Cost and Token Budget D.1 Monthly AI Cost Projections NOTE: At 2000 forecasts/day: revenue = Rs 1,56,000/day (avg Rs 78 price). Claude cost = Rs 5,200/day. Cost ratio: 3.3%. Excellent economics. Monitor monthly via Anthropic console. D.2 Cost Optimization Strategies Cache chart JSON in Redis 30 days — same chart never recomputed for returning users Use claude-3-haiku for moderation and safety checks — 60x cheaper than Sonnet Gemini 1.5 Flash for rashifal — 17x cheaper than Gemini Pro — quality sufficient for daily content Set hard max_tokens per chapter type — prevents Claude from generating unnecessarily long responses Batch multiple low-urgency Gemini calls — reduces API call overhead Monitor top-5 most expensive prompt calls monthly — optimize those first D.3 Monthly AI Budget Alerts (Configurable in Admin) AstroAyodhya.com — Admin Panel Document v1.0 STRICTLY CONFIDENTIAL — Internal Developer Reference Only Dual AI: Anthropic Claude (Core Vedic Logic) + Gemini Pro / GPT-4o (Content Support) 25 Sections + 4 Appendices | Filament 3 | Laravel Horizon | Full AI Pipeline 50% profit to larawarefoundation.com | A Laraware Group Initiative — End of AstroAyodhya Complete Documentation Series — 17 Documents — All Pages Covered — Classification | STRICTLY CONFIDENTIAL — Internal developer document only Admin URL | admin.astroayodhya.com — subdomain, NOT accessible from main site Auth | 2FA mandatory. IP whitelist + Laravel Sanctum + TOTP. Role-based access (7 roles). AI Architecture | Dual AI: Anthropic Claude 3.5 Sonnet (Core Vedic logic) + Gemini Pro / GPT-4o (Content + Support) Core Principle | All Jyotish computation = Vedic Engine (Python/Swiss Ephemeris). AI only generates TEXT, never computes charts. Sections | 25 major sections covering every aspect of platform administration Framework | Laravel 11 + Filament 3 admin UI + Horizon queues + Redis + MySQL + AWS S3 AI Architecture Principle AstroAyodhya uses a DUAL AI strategy: (1) Anthropic Claude 3.5 Sonnet — for all sacred Jyotish core logic, forecast writing, dosha analysis, and chart interpretation. (2) Google Gemini Pro / OpenAI GPT-4o — for general content, customer support, translations, and non-critical tasks. The Vedic Engine (Python/Swiss Ephemeris) ALWAYS computes chart data — AI only generates human-readable text from that data. AI never calculates planetary positions. Ever. Claude for Core Vedic Logic | Superior reasoning for complex Jyotish interpretation. 200K context window fits full chart JSON + multi-house analysis in one call. Accuracy critical for trust — no hallucinated numbers. Deeply aligned with classical Parashari reasoning. Gemini/OpenAI for Content | High-volume lower-stakes tasks: daily rashifal, customer replies, blog drafts, translations. 60-70% cost savings vs using Claude everywhere. Fast, reliable, excellent for Hindi content generation. Cost optimization | Claude API: approx $15/million input tokens. GPT-4o: approx $5/million. Gemini Pro: approx $1-3/million. Smart routing cuts monthly AI costs by ~65% vs using Claude for everything. GOLDEN RULE — Never Violate ANY task involving chart data (kundali) interpretation = ANTHROPIC CLAUDE. ANY generic content task = Gemini or OpenAI. No exceptions. No overrides. This rule is the foundation of user trust. Task Category | Specific Task | AI Engine | Model CORE — Kundali | Forecast report writing — all chapters | Anthropic | claude-3-5-sonnet-20241022 CORE — Kundali | Dosha analysis text generation | Anthropic | claude-3-5-sonnet-20241022 CORE — Kundali | Remedy recommendations from chart | Anthropic | claude-3-5-sonnet-20241022 CORE — Kundali | Mahadasha/Antardasha interpretation | Anthropic | claude-3-5-sonnet-20241022 CORE — Kundali | House-by-house life area analysis | Anthropic | claude-3-5-sonnet-20241022 CORE — Kundali | Transit impact on natal chart | Anthropic | claude-3-5-sonnet-20241022 CORE — Tools | Dosha checker explanation text | Anthropic | claude-3-5-sonnet-20241022 CORE — Moderation | Acharya-authored content check | Anthropic | claude-3-haiku-20240307 CONTENT — Rashifal | Daily rashifal — all 12 rashis | Gemini | gemini-1.5-pro CONTENT — Rashifal | Weekly + monthly rashifal | Gemini | gemini-1.5-pro CONTENT — Blog | Blog article draft generation | OpenAI | gpt-4o CONTENT — Blog | SEO title + meta desc + tags | OpenAI | gpt-4o-mini CONTENT — Support | Customer support auto-reply draft | Gemini | gemini-1.5-flash CONTENT — Translation | Hindi to English | OpenAI | gpt-4o CONTENT — Translation | English to Hindi / Regional langs | Gemini | gemini-1.5-pro CONTENT — Product | Shop product description writing | OpenAI | gpt-4o-mini CONTENT — Email | Marketing email copy draft | OpenAI | gpt-4o-mini CONTENT — Social | WhatsApp broadcast / social captions | Gemini | gemini-1.5-flash MODERATION | User review content moderation | OpenAI | gpt-4o-mini MODERATION | Push notification copy | OpenAI | gpt-4o-mini Claude Is the Sacred Engine Claude handles everything sacred: chart JSON se Jyotish interpretation, dosha analysis, remedy recommendations, Mahadasha guidance. Kisi doosre AI se yeh kaam nahi hoga. Classical Jyotish texts (BPHS, Saravali) ke context mein Claude ka reasoning genuinely superior hai. ClaudeForecastService.php — Laravel Service Class use Anthropic\SDK\Anthropic; class ClaudeForecastService { private Anthropic $client; private string $model = 'claude-3-5-sonnet-20241022'; public function generateChapter( array $chartJson, string $chapterType, // career|finance|health|vivah|dasha|etc string $planType, // 1yr|2yr|3yr|5yr string $language = 'hi' // hi|en|hinglish ): array { $systemPrompt = $this->getSystemPrompt($chapterType, $language); $userMessage = $this->buildUserMessage($chartJson, $chapterType, $planType); $response = $this->client->messages()->create([ 'model' => $this->model, 'max_tokens' => 4096, 'system' => $systemPrompt, 'messages' => [['role' => 'user', 'content' => $userMessage]] ]); $raw = $response->content[0]->text; return json_decode($raw, true) // Claude returns structured JSON ?? throw new RuntimeException('Claude did not return valid JSON'); } } System Prompt Security Yeh system prompt AstroAyodhya ka core IP hai — saalon ki Jyotish knowledge encode ki gayi hai. Store: DB table ai_prompts, encrypted at rest. Never log. Never expose in API response. Admin-only access. CLAUDE MASTER SYSTEM PROMPT — Vedic Jyotish Engine (abbreviated) You are a senior Brahman Jyotishacharya with 30+ years Parashari Jyotish practice. Deep knowledge of BPHS, Saravali, Brihat Jataka. Warm, trusted family-pandit tone. CRITICAL RULES: 1. NEVER compute planetary positions — use ONLY data in provided chart JSON. 2. Write in Easy Hindi (aam boli) — NOT pure Sanskrit. 'mushkil waqt' not 'pratikulta'. 3. Be SPECIFIC — reference actual planets, houses, dashas from the provided data. 4. NEVER predict death, severe illness, or irreversible negative events. 5. Every difficult period MUST have actionable remedy + positive opportunity. 6. Use 'ho sakta hai' / 'sambhavna hai' — never absolute certainty. 7. NEVER suggest Neelam (Blue Sapphire) without 'consult Acharya first' warning. 8. NEVER suggest 6th/8th/12th house lord gemstone as primary remedy. 9. Output MUST be structured JSON with chapter keys — never free text. 10. Always include: summary, yearly_breakdown[], remedies[], acharya_note. Chart JSON Schema (Python Vedic Engine Output) { lagna: { rashi: 'Mesh', rashi_num: 1, degree: 14.5 }, moon_sign: { rashi: 'Tula', nakshatra: 'Vishakha', pada: 2 }, planets: { Sun: { house:1, rashi:'Mesh', degree:12.3, nakshatra:'Ashwini', status:'exalted', retrograde:false, shadbala:1.42 }, Moon: { house:7, rashi:'Tula', degree:21.1, nakshatra:'Vishakha', status:'normal', retrograde:false, shadbala:0.87 }, Mars: { house:8, rashi:'Vrishchik', degree:5.7, nakshatra:'Anuradha', status:'swagrahi', retrograde:false, shadbala:1.15 }, // ... all 9 planets same structure }, houses: { 1: { lord:'Mars', planets:['Sun'] }, ... all 12 }, current_dasha: { maha:'Saturn', antar:'Jupiter', pratyantar:'Mercury', maha_start:'2023-10-15', maha_end:'2042-10-15', antar_start:'2025-01-01', antar_end:'2027-06-01' }, doshas: { mangal: { present:true, house:8, cancellations:['swagrahi'] }, kaal_sarp:{ present:false }, sade_sati:{ present:true, phase:2, rashi:'Tula' }, pitra: { present:false } }, transits: { saturn_rashi:'Kumbh', jupiter_rashi:'Meen', rahu_rashi:'Mesh' }, plan_type: '3yr', forecast_period: { start:'2025-01-01', end:'2028-01-01' }, language: 'hi' } Expected Claude JSON Output — Career Chapter Example { chapter: 'career', title: 'Aapka Career aur Kaam-Dhanda — 2025 se 2028', summary: 'Shani Mahadasha chal rahi hai. Aapka 10th lord Shani 11th', 'house mein hai — yeh ek strong position hai business ke liye...', yearly_breakdown: [ { year: 2025, theme: 'Nayi shuruwaat ka samay — promotion ya naya project sambhav', shubh_mahine: ['March', 'July', 'November'], savdhani: ['September mein koi bada financial decision mat lena'] }, { year: 2026, theme: '...', shubh_mahine: [...], savdhani: [...] }, { year: 2027, theme: '...', shubh_mahine: [...], savdhani: [...] } ], remedies: [ { type:'mantra', text:'Shani Beej Mantra — roz 108 baar Shaniwar subah' }, { type:'daan', text:'Kale til + sarson ka tel Shaniwar ko daan karein' }, { type:'gemstone', name:'Neelam', note:'PEHLE ACHARYA SE CONSULT KAREIN' } ], acharya_note: 'Is period mein sabse zaroori hai patience — Shani dhire kaam karta hai...' } Plan | Chapters | Avg Tokens per Report | Est. Claude Cost 1-Year (Rs 99) | 12 chapters x 3500 tokens | 42K input + 18K output = 60K total | ~Rs 45 per report 2-Year (Rs 199) | 14 chapters x 4000 | 56K + 22K = 78K total | ~Rs 60 per report 3-Year (Rs 399) | 16 chapters x 4500 | 72K + 28K = 100K total | ~Rs 78 per report 5-Year (Rs 499) | 19 chapters x 5000 | 95K + 38K = 133K total | ~Rs 100 per report Supporting AI Role Gemini Pro (Google) aur GPT-4o (OpenAI) handle karte hain: daily rashifal, weekly content, blog drafts, customer support replies, translations, product descriptions, social captions. Yeh tasks Claude se 60-70% sasta hain aur Claude ki unique Jyotish reasoning ki zaroorat nahi. GeminiRashifalService.php — Daily Rashifal Generation class GeminiRashifalService { public function generateDailyRashifal(string $rashi, array $panchang): array { $prompt = $this->buildRashifalPrompt($rashi, $panchang); $response = Http::withHeaders(['Content-Type' => 'application/json']) ->post( 'https://generativelanguage.googleapis.com/v1beta/models/' . 'gemini-1.5-pro:generateContent?key=' . config('services.gemini.key'), [ 'contents' => [['parts' => [['text' => $prompt]]]], 'generationConfig' => [ 'response_mime_type' => 'application/json', 'max_output_tokens' => 2048 ] ] ); $raw = $response->json()['candidates'][0]['content']['parts'][0]['text']; return json_decode($raw, true); } } OpenAIBlogService.php — Blog Draft Generation class OpenAIBlogService { public function generateBlogDraft(string $topic, string $lang = 'hi'): string { $client = OpenAI::client(config('services.openai.key')); $response = $client->chat()->create([ 'model' => 'gpt-4o', 'messages' => [ ['role' => 'system', 'content' => $this->getBlogSystemPrompt($lang)], ['role' => 'user', 'content' => 'Write detailed blog article: ' . $topic] ], 'max_tokens' => 3000, ]); return $response->choices[0]->message->content; } } Trigger | New support ticket created via email/WhatsApp Context sent | Ticket text + user account type + last 3 orders + membership status Output | Draft reply in Hindi — 3-4 sentences, warm tone, actionable solution Review | Support agent reviews — edits if needed — THEN sends. AI is assistant not agent. Never auto-send | Agent ALWAYS reviews before sending. This is mandatory policy. Model | gemini-1.5-flash — fastest, cheapest. Rs 0.10 per support draft. Decision Framework Yeh decision tree follow karo jab bhi koi naya AI task aaye. Is tree ke bahar mat jaao. Model | Cost (approx per M tokens) | Best For | Context Window claude-3-5-sonnet-20241022 | $15 input / $75 output | Core Vedic logic, all kundali tasks | 200K tokens claude-3-haiku-20240307 | $0.25 input / $1.25 output | Moderation, quick checks, safety | 200K tokens gpt-4o | $5 input / $15 output | Blog drafts, product copy, English content | 128K tokens gpt-4o-mini | $0.15 input / $0.60 output | SEO tags, push notifications, summaries | 128K tokens gemini-1.5-pro | $1.25 input / $5 output | Rashifal, Hindi content, translations | 2M tokens! gemini-1.5-flash | $0.075 input / $0.30 output | Support drafts, social captions, quick tasks | 1M tokens Claude fails/timeout | Retry 3x with 5s delay. If still fails: FAILED status + admin alert + manual Acharya write. Gemini fails | Fallback to GPT-4o-mini for same task. Log the failure. OpenAI fails | Fallback to Gemini for same task. Log the failure. All AI fails — rashifal | Use yesterday's content with modified date intro. Alert admin immediately. All AI fails — forecast | Mark FAILED. Acharya writes manually. User refunded if >2 hours delay. Cost spike alert | Daily spend > Rs 5,000 — auto-email to Super Admin. Review and optimize. Prompt Security All prompts stored in DB table: ai_prompts. Encrypted at rest (AES-256). Editable ONLY by Super Admin from admin panel. Full version history maintained — roll back anytime. Never logged in plain text. Never in Git. Prompt Name | Chapter/Use | Key Instructions | Ver claude_forecast_career | Career chapter | 10th/6th house analysis, Dasha lord on profession, year-wise shubh mahine | v1.2 claude_forecast_finance | Finance chapter | 2nd/11th house, wealth yogas, investment timing, avoid periods | v1.1 claude_forecast_health | Health chapter | 6th/1st house, Moon strength, vulnerable seasons, precautions | v1.1 claude_forecast_vivah | Marriage chapter | 7th house, Navamsa D9, Venus, Dasha timing, Mangal Dosha impact | v1.3 claude_forecast_dasha | Dasha chapter | Full Maha-Antar timeline, best + challenging sub-periods | v1.0 claude_forecast_spirituality | Spirituality chapter | 12th/9th house, Ketu position, dharma path | v1.0 claude_dosha_mangal | Mangal Dosha check | All 25 cancellations, severity, marriage + health impact, remedies | v2.0 claude_dosha_kaalsarp | Kaal Sarp check | 12 types identification, partial vs complete, life impact areas | v1.1 claude_dosha_sade_sati | Sade Sati check | 3 phase analysis, per-rashi effects, year-wise guidance | v1.0 claude_remedy_gemstone | Gemstone recommendation | 14 rules including 6/8/12 lord filter, combustion check, retrograde note | v1.5 claude_remedy_rudraksha | Rudraksha recommendation | 27-nakshatra mapping, planet weakness check, wearing instructions | v1.0 Prompt Name | Use | Language | Model gemini_rashifal_daily | Daily rashifal for all 12 rashis — 9 sections each | Hindi primary | gemini-1.5-pro gemini_rashifal_weekly | Weekly rashifal with transits | Hindi | gemini-1.5-pro gemini_rashifal_monthly | Monthly rashifal — comprehensive | Hindi | gemini-1.5-pro gemini_support_reply | Customer support draft reply | Hindi + English | gemini-1.5-flash gemini_translate_hi_en | Hindi to English article translation | Both | gemini-1.5-pro gemini_translate_en_hi | English to Hindi translation | Both | gemini-1.5-pro gemini_social_caption | WhatsApp broadcast + social captions | Hindi | gemini-1.5-flash gemini_product_desc | Product descriptions for shop items | Hindi | gemini-1.5-pro Prompt Name | Use | Notes | Model openai_blog_draft | Blog article draft — Hindi or English | 1500-2500 word output | gpt-4o openai_blog_seo | SEO title + meta desc + tags + schema | Returns structured JSON | gpt-4o-mini openai_email_marketing | Marketing email copy | Persuasive, easy Hindi, CTA focused | gpt-4o-mini openai_review_moderate | User review content moderation | Returns: approve/flag/reject + reason | gpt-4o-mini openai_push_notification | Push notification copy | Under 100 chars, engaging Hindi | gpt-4o-mini Version history | Every prompt change stored: old content + new content + changed_by + changed_at Rollback | One-click rollback to any previous version from admin panel A/B testing | Run two prompt versions simultaneously — compare Acharya approval rates and report quality scores Test prompt | Admin can enter sample chart JSON and see live Claude output before going live Prompt analytics | Per-prompt: avg tokens used, avg response time, failure rate, cost per call Framework: Filament 3 Admin panel built on Laravel Filament 3. URL: admin.astroayodhya.com. All modules are Filament Resources and Pages. Authentication: Filament Auth + mandatory 2FA (TOTP via Google Authenticator). IP allowlist enforced. Row 1 — Revenue | Row 2 — Users | Row 3 — Operations | Row 4 — AI Health Today Revenue (Rs) | New Signups Today | Forecasts In Queue | Claude API Calls Today MRR (Monthly Recurring) | Active Members | Pujas Pending | Gemini API Calls Today Forecast Revenue MTD | DAU (Daily Active Users) | Acharya Reviews Pending | OpenAI API Calls Today Foundation Transfer QTD | Total Registered Users | Support Tickets Open | Total AI Cost Today (Rs) Daily revenue chart | Bar chart — last 30 days — breakdown by: Forecasts, Pujas, Shop, Membership, Consultations MRR growth line | Last 12 months membership revenue growth Product mix pie | Forecasts % | Pujas % | Shop % | Membership % | Consultations % Foundation tracker | Quarterly transfers with targets vs actuals — green/red bar User growth | Cumulative users + daily new — last 6 months — two-line chart AI cost trend | Daily AI spend by model — Claude vs Gemini vs OpenAI — stacked bar Columns displayed | ID | Name | Email | Phone | Rashi | Membership Plan | Orders Count | Joined Date | Last Login | Status Quick filters | By: Membership plan | Rashi | Registration date range | Has kundali | Active/Inactive | Country Search | Instant search: name, email, phone number — debounced 300ms Bulk actions | Export CSV | Send bulk notification | Suspend multiple | Delete (soft) Per-user actions | View full profile | Edit data | Impersonate (support) | Send direct message | View all orders Profile tab | All personal data + kundali info + edit capability. Birth details with impact warning if changed. Orders tab | All orders: forecasts, pujas, shop, consultations — sorted newest first Membership tab | Current plan + billing history + UPI mandate status + WhatsApp connection status Kundali tab | All saved charts — view D1 inline + planet table + dosha flags + Dasha timeline Foundation tab | Estimated lifetime contribution to Foundation from all purchases Audit tab | Complete activity log: logins, purchases, data changes, support tickets Security Policy Impersonation (acting as a user for support) MUST be logged in audit trail: who impersonated, which user, at what time, from which IP. ONLY Super Admin and Support Manager roles can impersonate. Auto-expires in 15 minutes. Red banner visible to admin during impersonation: 'You are viewing as [User Name]'. Most Complex Module Forecast management is the most AI-intensive module. Manages the complete pipeline: kundali compute -> Claude write -> Acharya review -> PDF generate -> deliver. Every step monitored and alertable. COMPUTING | Vedic Engine (Python) computing chart JSON — typically < 3 seconds WRITING | Claude generating chapters — 5-15 minutes for full report ACHARYA_REVIEW | Waiting for Acharya to review and approve — SLA: 2 hours max FORMATTING | Puppeteer generating PDF from approved content — typically < 2 minutes DELIVERED | PDF ready in S3 — user notified — download link active FAILED | Any step failed — admin alerted — manual intervention needed Setting | Description | Default | Allowed Range Claude model | Which model for forecast generation | claude-3-5-sonnet-20241022 | claude-3-5-sonnet or claude-3-haiku Max tokens/chapter | Token limit per chapter generation | 4096 | 1000 to 8000 Temperature | Claude creativity (0=precise, 1=creative) | 0.7 | 0.5 to 0.9 Retry attempts | Times to retry failed Claude calls | 3 | 1 to 5 Chapter sequence | Order of chapter generation | Career,Finance,Health... | Admin reorderable Auto-approve hours | Auto-approve if no Acharya action | 2 hours | 1 to 8 hours Parallel chapters | Chapters generated simultaneously | 3 at once | 1 to 5 Review queue | All forecasts assigned to this Acharya — oldest first. SLA timer visible. Review view | Full forecast rendered in beautiful HTML — chapter by chapter with PDF styling Action bar | Approve | Edit Section (inline) | Add Personal Note | Request Regeneration | Flag Issue Edit mode | Rich text editor per chapter — Acharya rewrites in easy Hindi Personal note | 300-char max — Acharya's personal observation — appears in PDF Reference panel | Right sidebar: user's D1 chart + planet table + current Dasha — for reference while reviewing Timer | Soft timer showing review duration. Target: 10 min per report. Not enforced. Template editor | Admin edits PDF HTML/CSS template. Uses Tailwind CSS. Live preview. Cover page | User name + order ID + forecast period + AstroAyodhya logo + saffron design Chapter headers | Each chapter with custom icon + saffron heading + chapter summary Acharya section | Acharya photo + name + verification badge + personal note Remedies section | Formatted remedy cards — mantra, daan, gemstone, puja recommendations Footer | Page numbers + 'Prepared for [Name]' watermark + AstroAyodhya branding Foundation note | Last page: Foundation mission + how this report helped Foundation Test PDF | 'Generate Test PDF' button — uses dummy chart data — preview before going live Columns | ID | Name | Photo | Status | Specializations | Avg Rating | Total Reviews | Consultations Done | Reports Reviewed | Monthly Earnings Status badges | ACTIVE | ON_LEAVE | SUSPENDED | PENDING_VERIFICATION | TRAINEE Filters | By: Status | Specialization tag | Rating range | Ayodhya-based | Consultation-enabled Actions | View profile | Edit | Suspend | Payout history | Review queue | Availability calendar Weekly schedule | Acharya sets available days + time slots via their admin panel Admin override | Force-block any slot for training, meetings, platform events Bulk schedule | Set Acharya availability for entire week in one action — batch update Calendar view | Color-coded: Green = available, Red = booked, Yellow = Acharya-blocked, Grey = unavailable Capacity | Admin sets max consultations per day per Acharya — prevents burnout Leave management | Acharya marks leave in advance — bookings blocked for those dates automatically Columns | ID | User | Acharya | Date/Time | Duration | Status | Amount | Has Recording | Review Given Status | BOOKED | CONFIRMED | IN_PROGRESS | COMPLETED | CANCELLED | NO_SHOW | DISPUTED Filters | By: Acharya | Status | Date range | Duration | Amount | Has recording Actions | View full details | Issue refund | Resolve dispute | Join as silent observer (Super Admin) Dispute raised | User or Acharya raises dispute from their dashboard — reason + description Admin notification | Immediate alert to Admin Manager + support team Evidence review | Recording URL + chat log + both party statements visible in dispute panel AI assist | GPT-4o-mini summarizes consultation chat log for admin — flags key moments Resolution options | Full refund | Partial refund (50%) | No refund | Reschedule free | Warning to Acharya Timeline | Resolution required within 48 hours of dispute raised. Auto-escalate to Super Admin after 24hr. Columns | ID | User | Puja Name | Tier | Assigned Acharya | Scheduled Date/Time | Status | Amount | Samagri Ordered | GPS Captured Status flow | BOOKED -> CONFIRMED -> SCHEDULED -> IN_PROGRESS -> COMPLETED -> CANCELLED Actions | View details | Assign Acharya | Reschedule | Cancel+Refund | Mark GPS Captured | View Certificate | Track Prasad Puja list | All 25+ pujas — name, slug, price tiers, puja model, active status, booking count Edit puja | All fields: name (hi+en), description, pricing tiers, samagri list, what user receives, SEO Add new puja | Full creation form — goes live after admin activates toggle Availability toggle | Active/Inactive — inactive pujas hidden from /puja page immediately via ISR Seasonal blocking | Block puja bookings during Chaturmas (Aug-Oct) — automated or manual Product list | SKU | Name | Category | Price | Sale Price | Stock | Status | Last 30d Sales | Rating Add product | Form: name hi+en | category | price | sale_price | images (multi-upload) | planet | mukhi (for rudraksha) | description | caution_level | consult_required Edit product | All fields editable + SEO fields (meta title, description) + schema markup Stock management | Update count. Low stock threshold configurable per product. Auto-alert at threshold. Images | Multiple upload with drag-drop reorder. Auto-compress to WebP. CDN via Cloudinary. Energization | Upload Acharya energization video + assign Acharya who performed it + GPS timestamp QR generation | One-click QR code generation — unique per product unit — stored in DB + printed on package Order types | Forecasts | Shop products | Pujas | Consultations — all in one list with type badge Columns | Order ID | Type | User | Amount | Payment Status | Order Status | Created At | Actions Filters | By: type | payment status | order status | date range | amount range | user Export | CSV export with active filters applied — for monthly accounting reconciliation Payment list | All transactions: Razorpay (INR) + Stripe (USD) — with gateway status Failed payments tab | Dedicated view — manual retry button + 'Send payment link' to user Refund tool | Issue partial or full refund — amount editable — reason required — syncs to gateway Daily reconciliation | Automated: DB orders vs Razorpay/Stripe dashboard — mismatch alert to Finance Manager GST reports | Monthly summary: B2C invoices + B2B (GSTIN users) — GSTR-1 compatible CSV export Webhook logs | All incoming webhooks: event_type + payload + processing_status + timestamp Active members | Count by plan: Basic | Premium | VIP. MRR per plan. Total MRR. Churn metrics | Monthly churn % — last 3 months trend. Churn reason breakdown. Trial conversions | % of 7-day trials converting to paid — by plan type Dunning status | Failed payment recovery: how many in grace period, how many converted Columns | User | Plan | Status | Next Billing Date | Amount | WhatsApp Connected | Paused Until | Started Status | TRIAL | ACTIVE | PAUSED | CANCELLED | FAILED | PENDING Actions | View | Edit plan | Pause | Cancel | Apply discount coupon | Manually retry payment Composer | Write message + select audience: all members | Basic only | Premium+ | specific rashi Scheduling | Queue message for specific date/time — e.g. daily rashifal at 7AM IST Delivery stats | Per broadcast: Sent count | Delivered | Read (where available) | STOP replies Template management | WhatsApp message templates — view Meta approval status for each Opt-outs | Auto-maintained list of users who replied STOP — never contacted again AI draft | 'Draft with Gemini' button — generates broadcast text — admin edits then sends Post list | All posts: title | author | category | status | published_at | views (30d) | SEO score Statuses | DRAFT | IN_REVIEW | PUBLISHED | SCHEDULED | ARCHIVED New post editor | Tiptap rich text editor with Hindi Devanagari support + image upload + SEO fields AI draft button | 'Generate with AI' -> enter title + category -> GPT-4o writes initial Hindi draft SEO checker | 'Check SEO' -> AI analyzes heading structure, keyword density, meta length -> scores out of 100 Auto-fix | 'AI Optimize' button: AI rewrites title/meta for better SEO — admin reviews before saving Schedule | Set future date/time for automatic publication — useful for festival content Daily rashifal view | All 12 rashis x 9 sections grid — shows today's generated content for review Inline edit | Click any cell (rashi x section) — opens inline editor with Hindi text Regenerate section | 'Redo with Gemini' on any single section — fresh content in 3 seconds Bulk approve | 'Approve All for Today' — marks entire day's rashifal as reviewed and ready Pre-generate | System pre-generates 3 days ahead — admin can review in advance Quality flag | Flag any section as 'Needs Review' — prevents it from going out in WhatsApp Cron log | Generation history — last 30 days. Success/fail per run. Execution time. Manual trigger | 'Generate Today's Rashifal' button — runs Gemini immediately without waiting for cron Preview mode | See tomorrow's pre-generated content before it goes live Prompt tuning | Direct link to gemini_rashifal_daily prompt — edit quality parameters ISR trigger | After bulk edit: 'Revalidate Next.js' button — pushes changes to live site instantly Data source | Swiss Ephemeris Python engine — auto-calculated daily for all 50 cities City management | Add/edit/remove cities from Panchang city list — each city with lat/lng/timezone Daily validation | Automated sanity check: if any city data seems anomalous — admin alert Manual override | Correct specific Panchang value if calculation error detected — with reason field Festival calendar | Manage festival entries shown in Panchang: name (hi+en), date, significance, tithi Vivah muhurat | Annual vivah muhurat list: date, time, details — admin adds/edits/removes Sitemap | Auto-generated sitemap.xml — 'Regenerate' button after major content changes Robots.txt | Direct editor — update crawling rules without code deployment Meta defaults | Site-wide og:image, Twitter card defaults, structured data base settings 301 Redirects | Add/edit/delete URL redirects — for old content URLs, rebranded pages Core Web Vitals | Google Search Console data embedded in admin — monitor all green/red signals Hreflang | Auto-generated for multilingual pages — review table + override per URL Campaign list | All campaigns: name | status | audience size | sent count | open rate | click rate Composer | Subject + HTML body + audience segment + send time + A/B subject test option AI draft | 'Draft with GPT' -> enter goal -> gpt-4o-mini writes persuasive Hindi email body Segments | Pre-built: All users | Members only | Non-members | Last 30d inactive | By rashi | By purchase type Transactional logs | All transactional emails: user + type + sent_at + opened + clicked — searchable Deliverability | Postmark reputation score + bounce rate + spam rate — visible in dashboard Coupon list | Code | Type (% or fixed) | Discount | Used count | Max uses | Expiry | Status Create coupon | Percentage OR fixed amount | specific plan/product/category | expiry date | max uses limit Referral codes | User-specific referral codes — track conversions + reward referrer Auto-apply rules | E.g.: first purchase = 10% off, 6-month member = 5% shop discount — rule engine Revenue tracker | Running quarterly revenue total + auto-calculated 50% Foundation transfer amount Transfer log | All past Foundation transfers: quarter | amount (Rs) | bank proof URL | acknowledgment URL | date Impact numbers | Update Foundation program stats shown across entire site — one-click update all pages via ISR Quarterly report | 'Generate Report' — pulls stats + AI formats intro copy (GPT-4o-mini) + admin edits + publishes Automation Win Transfer record in admin = Foundation impact page at /foundation/impact auto-updates instantly. Users see real-time transparency. No manual CMS update needed. Queue view | All pending notifications: channel (WhatsApp/Email/Push/SMS) | user | scheduled_at | status Manual blast | Compose + audience selection + channel + schedule time + preview before send Template library | All notification templates — edit copy, placeholders, CTA links per template Delivery reporting | Per notification: sent | delivered | opened | clicked | failed — download CSV Frequency controls | User-level frequency caps — e.g. max 3 WhatsApp messages per day per user Ticket list | All tickets: source (WhatsApp/Email/In-app) | user | subject | status | assigned_to | SLA timer Status flow | OPEN -> IN_PROGRESS -> PENDING_USER_REPLY -> RESOLVED -> CLOSED AI first response | Gemini Flash generates draft reply within 30 seconds of ticket creation — agent reviews + sends Auto-assignment | By category: Technical -> Dev team | Billing -> Finance | Puja -> Ops India SLA alerts | Red highlight: ticket > 24hr open. Orange: > 8hr. Slack/email alert to team lead. WhatsApp integration | Reply to WhatsApp tickets directly from admin — real-time bidirectional Resolution analytics | Avg resolution time by category | agent performance | satisfaction scores Traffic analytics | Daily/weekly/monthly visitors + sessions + bounce rate + top pages Conversion funnel | Tool visit -> Email signup -> Forecast purchase — drop-off rates at each stage Revenue analytics | By product type | by time period | by user cohort | by acquisition channel User behavior | Most-used tools | most-read blog articles | shop bestsellers | avg session time AI cost analytics | Per-model daily spend: Claude vs Gemini vs OpenAI — trend + budget remaining WhatsApp analytics | Delivery rate | read rate | STOP rate | per-broadcast comparison Retention cohorts | User retention by signup month — see which cohorts stay longest Revenue report | Date range + product filter -> revenue by category + payment method + GST breakdown + CSV User report | New users by source channel | retention by cohort | active vs churn | geographic split Acharya performance | Per Acharya: reviews/month, consultations/month, earnings, rating trend, response time Foundation report | Quarterly transfer details + program allocation + impact numbers — formatted for public AI cost report | Per-model cost breakdown + token usage + cost per report/rashifal/blog — weekly/monthly SEO report | Organic traffic + ranking keywords + Core Web Vitals — pulls from Search Console API Payout list | Acharya name | period | reports_reviewed x rate | consultations x 70% | total due | status Calculation | Auto: (reports_reviewed * per_report_rate) + (consultation_fees * 0.70) — generated weekly Approve payout | 'Process Payout' -> verify UPI ID -> initiate transfer -> mark PAID + receipt number Payout rates | Forecast review: Rs 15-25/report. Consultation: 70% of booking fee. Bonus for volume. Payout history | Full statement per Acharya — downloadable PDF + CSV for their records Failed payouts | Alert if transfer fails — retry mechanism + alternative payment method option Monthly GST | B2C invoice summary + B2B (GSTIN users) — GSTR-1 compatible CSV export for CA TDS (26Q) | Acharya payouts > Rs 30,000/year — TDS deduction tracking + Form 16A generation Annual summary | Total revenue | GST collected | Foundation transfer | Acharya payouts — CA package Invoice generation | Auto-generate GST invoices for all orders — downloadable by users from /dashboard Export formats | CSV + Excel + PDF — all financial reports — date range filterable General | Site name, tagline, contact emails, support WhatsApp, default timezone (IST) Feature flags | Toggle on/off: Consultations | Shop | Membership | Blog | Tools | any individual feature Maintenance mode | Enable: site shows maintenance page. Specific IPs (dev team) stay accessible. API keys storage | All secrets in AWS Parameter Store — Razorpay | Stripe | Twilio | Meta WABA | Anthropic | Gemini | OpenAI | Google Maps Email config | Postmark SMTP settings + from address + reply-to + email footer template Storage config | AWS S3 bucket names + Cloudinary credentials + CDN base URLs Model defaults | Global default model per task type — override per individual task if needed Token budgets | Max tokens per task type — hard ceiling to prevent runaway costs Rate limits | Max AI API calls per hour per model — protects against abuse or misconfiguration Cost alerts | Email alert thresholds: daily > Rs 5,000 | weekly > Rs 25,000 | monthly > Rs 1,00,000 AI logs | Every AI call: model | prompt_name | input_tokens | output_tokens | cost | response_time | status Prompt library | All prompts with version history — see Section 5 for full spec Active languages | Toggle each of 20 languages active/inactive — inactive = no content shown in that lang Default language | Hindi — not editable. Platform-level decision. UI strings | Key-value translation editor for UI text in all active languages Hreflang config | Auto-generated hreflang tags review table — override per-URL if needed Language priority | Hindi > English > Hinglish > Regional — fallback chain when content missing Horizon Dashboard Laravel Horizon at admin.astroayodhya.com/horizon — real-time queue monitoring. Super Admin access only. Shows all queues, workers, jobs, throughput, failures. Pending jobs | Count per queue: high-priority | default | low-priority. Backlog alert if > 100. Processing | Currently running jobs: name + started_at + estimated completion + worker ID Failed jobs | All failures: job name + error message + stack trace + retry button + delete Throughput chart | Jobs processed per minute — last 60 minutes — detect slowdowns Worker scaling | Number of active workers per queue — restart all workers button Job Name | Queue | Priority | Triggered By ForecastGenerationJob | high | Critical — SLA 30 min | Order payment confirmed webhook ClaudeChapterJob | high | Critical — per chapter | ForecastGenerationJob dispatches GeminiRashifalJob | high | Daily at 3AM | Cron scheduler PanchangGenerationJob | high | Daily at 2AM | Cron scheduler PDFGenerationJob | default | Normal | After Acharya approval EmailDeliveryJob | low | Normal — async | Any event triggering email WhatsAppBroadcastJob | default | Normal | Daily 7AM cron WebhookProcessJob | high | Urgent — < 5s | Razorpay/Stripe webhook received ISRRevalidationJob | default | Normal | After content publish/update FoundationReportJob | low | Quarterly | After Foundation transfer recorded AcharyaPayoutCalcJob | low | Weekly Friday 9AM | Cron scheduler UserActivityTrackJob | low | Background | Various user events 0 2 * * * | 2 AM IST — Panchang generation for all 50 cities 0 3 * * * | 3 AM IST — Daily Rashifal generation via Gemini (12 rashis x 9 sections) 30 3 * * * | 3:30 AM IST — Next.js ISR revalidation for rashifal + panchang pages 0 3 1 * * | 3 AM on 1st — Monthly rashifal generation 0 7 * * * | 7 AM IST — WhatsApp daily rashifal broadcast to all members */5 * * * * | Every 5 minutes — Acharya availability status refresh to Redis 0 */6 * * * | Every 6 hours — Foundation stats counter cache refresh 0 0 * * 1 | Monday midnight — Weekly payment reconciliation with Razorpay/Stripe 0 9 * * 5 | Friday 9 AM — Acharya payout calculation + notification dispatch 0 10 1 1,4,7,10 * | Quarterly: Foundation transfer reminder to Super Admin 2FA enforcement | Mandatory TOTP for ALL admin accounts. Setup forced on first login. No bypass. IP allowlist | Admin panel accessible only from approved IP addresses — managed in settings Session timeout | Admin session: 8 hours inactivity -> auto-logout + re-auth required Failed logins | 5 consecutive failures -> account locked 30 minutes. Alert to Super Admin. API rate limiting | Admin APIs: 300 req/min per user. Public APIs: 60 req/min. Violations logged. CSP headers | Strict Content-Security-Policy — prevents XSS in admin panel Audit retention | All audit logs retained 2 years. Cannot be deleted via UI — DB admin only. User actions | Edit user profile | Change user membership | Suspend user | Delete user Financial | Issue refund | Process payout | Record Foundation transfer | Create coupon AI config | Edit any prompt | Change model | Update token limits | Test prompt Content | Publish blog post | Approve forecast | Modify rashifal content | Update puja System | Change API keys | Modify feature flags | Enable maintenance mode | Change roles Access | Admin login | Impersonation start/end | Failed login attempts | 2FA events Role | Who Has It | Key Capabilities | Cannot Do Super Admin | Founder + CTO only | Everything — all 25 modules, AI prompts, payouts, data deletion, role management | Nothing restricted Admin Manager | Operations head | All modules except: AI prompt editing, bulk data deletion, payout processing | Edit prompts, bulk delete Content Manager | Blog + SEO team | Blog, Rashifal, Panchang, SEO tools, AI product desc, coupon creation | User PII, payments, AI config Acharya Coordinator | Acharya onboarding team | Acharya management, consultation monitoring, puja scheduling, GPS certs | Financial data, user PII, AI Support Agent | Customer support | User view read-only, ticket management, order status view, refund < Rs 500 | Edit users, financial reports Finance Manager | Accountant / CFO | Orders, payments, GST reports, Acharya payouts, Foundation transfers | User PII, content, AI config Acharya (Self-panel) | Each Acharya individually | Own review queue, own profile, own schedule, own earnings dashboard | Any other user's data Setup Commands (one-time) # Install Filament Shield php artisan shield:install # Generate policies for all Filament resources php artisan shield:generate --all # Make first user Super Admin php artisan shield:super-admin --user=1 # Create roles and assign permissions via Admin Panel UI # No additional code needed — managed from Settings > Roles Table | Primary Key | Key Columns | Relationships users | UUID | name,email,phone,dob,tob,pob_lat/lng/tz,rashi,nakshatra,lagna,whatsapp_number,badges(JSON),membership_id | -> subscriptions,orders,kundalis kundalis | UUID | user_id,chart_data(JSON),lagna,rashi,nakshatra,dasha_data(JSON) | -> users orders | UUID | user_id,order_type,amount,currency,razorpay_order_id,stripe_payment_id,status | -> users,forecasts forecasts | UUID | order_id,user_id,plan_type,language,chart_data(JSON),content(JSON chapters),pdf_s3_key,status,verified_by,verification_note | -> orders,acharyas acharyas | UUID | name_hi,name_en,slug,photo_url,video_intro_url,specializations(JSON),rating_avg,is_verified,payout_upi,consultation_enabled | -> bookings,puja_bookings bookings | UUID | user_id,acharya_id,duration_min,scheduled_at,agora_channel,status,user_topic,session_notes,recording_url | -> users,acharyas puja_bookings | UUID | user_id,puja_slug,tier,acharya_id,scheduled_at,sankalp_data(JSON),model,status,gps_coordinates(JSON),certificate_url,prasad_tracking(JSON) | -> users,acharyas subscriptions | UUID | user_id,plan,billing_cycle,amount,currency,status,razorpay_sub_id,stripe_sub_id,whatsapp_number,whatsapp_opted_in,notification_prefs(JSON),pause_until | -> users products | UUID | name_hi,name_en,slug,category,price,planet,mukhi,caution_level,consult_required,energized,qr_code,stock,energization_video_url | — shop_orders | UUID | user_id,items(JSON),amount,status,shipping_address(JSON),courier,tracking_number | -> users ai_prompts | UUID | name,model,system_prompt(encrypted),user_prompt_template,max_tokens,temperature,version,is_active,created_by | — ai_logs | bigint | prompt_name,model,input_tokens,output_tokens,cost_usd,response_time_ms,status,error_message,created_at | — foundation_transfers | UUID | quarter,year,total_revenue,net_profit,transfer_amount,bank_proof_s3_url,acknowledgment_s3_url,transferred_at | — admin_users | bigint | name,email,password(bcrypt),role,two_factor_secret,last_login_at,last_login_ip | — audit_logs | bigint | admin_user_id,action,resource_type,resource_id,old_values(JSON),new_values(JSON),ip_address,user_agent,created_at | -> admin_users webhook_logs | bigint | gateway,event_type,payload(JSON encrypted),signature_valid,processed_at,processing_status,error | — Endpoint | Method | Auth Role | Purpose GET /admin/api/dashboard | GET | Any Admin | Dashboard KPI data — all counters GET /admin/api/ai/logs | GET | Super Admin | AI call logs with cost breakdown PUT /admin/api/ai/prompts/{id} | PUT | Super Admin | Update AI prompt — versioned POST /admin/api/ai/prompts/test | POST | Super Admin | Live test prompt with sample chart JSON POST /admin/api/forecasts/{id}/regenerate | POST | Admin Manager | Re-trigger Claude generation for failed forecast POST /admin/api/forecasts/{id}/approve | POST | Acharya + Admin | Approve forecast — triggers PDF generation POST /admin/api/pujas/{id}/gps | POST | Admin + Coordinator | Record GPS coordinates for puja POST /admin/api/foundation/transfer | POST | Finance + Super Admin | Record quarterly Foundation transfer POST /admin/api/isr/revalidate | POST | Admin Manager | Trigger Next.js ISR page revalidation GET /admin/api/analytics/revenue | GET | Finance + Admin | Revenue report — date range + breakdown POST /admin/api/whatsapp/broadcast | POST | Admin Manager | Send WhatsApp broadcast to members GET /admin/api/queue/stats | GET | Super Admin | Horizon queue statistics POST /admin/api/users/{id}/impersonate | POST | Super + Support | Start user impersonation session DELETE /admin/api/users/{id}/impersonate | DELETE | Super + Support | End impersonation session POST /admin/api/payments/{id}/refund | POST | Finance + Support | Issue full or partial refund Job Class | File Path | Queue | Max Attempts ForecastGenerationJob | Jobs/ForecastGenerationJob.php | high | 1 (no retry — manual) ClaudeChapterJob | Jobs/ClaudeChapterJob.php | high | 3 (auto-retry) GeminiRashifalJob | Jobs/GeminiRashifalJob.php | high | 2 PanchangGenerationJob | Jobs/PanchangGenerationJob.php | high | 2 PDFGenerationJob | Jobs/PDFGenerationJob.php | default | 2 EmailDeliveryJob | Jobs/EmailDeliveryJob.php | low | 3 WhatsAppBroadcastJob | Jobs/WhatsAppBroadcastJob.php | default | 2 WebhookProcessJob | Jobs/WebhookProcessJob.php | high | 3 ISRRevalidationJob | Jobs/ISRRevalidationJob.php | default | 2 FoundationReportJob | Jobs/FoundationReportJob.php | low | 1 AcharyaPayoutCalcJob | Jobs/AcharyaPayoutCalcJob.php | low | 1 GPSCertificateJob | Jobs/GPSCertificateJob.php | default | 2 PrasadDispatchJob | Jobs/PrasadDispatchJob.php | low | 1 UserBadgeCheckJob | Jobs/UserBadgeCheckJob.php | low | 1 Volume Scenario | Claude Cost | Gemini + OpenAI | Total Monthly Launch: 100 forecasts/day | 100 x Rs 78 = Rs 7,800 | Rashifal + Blog + Support = Rs 940 | ~Rs 8,740/month Growth: 500 forecasts/day | 500 x Rs 78 = Rs 39,000 | Same = Rs 940 | ~Rs 39,940/month Scale: 2000 forecasts/day | 2000 x Rs 78 = Rs 1,56,000 | Same = Rs 940 | ~Rs 1,56,940/month Daily alert | Rs 5,000/day — email to Super Admin + Slack notification Weekly alert | Rs 25,000/week — email to Super Admin + Finance Manager Monthly budget | Rs 1,00,000/month — if approaching, some tasks auto-downgrade to cheaper model Per-report ceiling | Rs 200 maximum per individual forecast — if Claude job exceeds: fail gracefully + alert Anomaly detection | If any single hour costs > Rs 2,000 — immediate alert — possible abuse or misconfiguration