// ───────────────────────────────────────── // Hidrogen App — root with auth + data boot // ───────────────────────────────────────── const { useState: uS, useEffect: uE } = React; const HDR = window.HDR_DATA; const API = window.HDR_API; const C = window.HDR_CONSTANTS; const U = window.HDR_UTIL; function App() { const [me, setMe] = uS(null); const [loading, setLoading] = uS(true); const [mode, setMode] = uS(() => localStorage.getItem('hdr.mode') || 'user'); const [route, setRoute] = uS(() => localStorage.getItem('hdr.route') || 'overview'); const [theme, setTheme] = uS(() => localStorage.getItem('hdr.theme') || 'dark'); const [accent, setAccent] = uS(() => localStorage.getItem('hdr.accent') || 'saffron'); const [density, setDensity]=uS(() => localStorage.getItem('hdr.density') || 'comfortable'); const [showTweaks, setShowTweaks] = uS(false); // Load user + initial data uE(() => { (async () => { try { const user = await API.me(); setMe(user); // Force user mode if not admin if (!user.is_admin && localStorage.getItem('hdr.mode') === 'admin') { setMode('user'); localStorage.setItem('hdr.mode', 'user'); } window.HDR_USER = user; } catch (e) { if (e.message !== 'unauthorized') console.error(e); } finally { setLoading(false); } })(); }, []); uE(() => { document.documentElement.setAttribute('data-theme', theme); localStorage.setItem('hdr.theme', theme); }, [theme]); uE(() => { document.documentElement.setAttribute('data-density', density); localStorage.setItem('hdr.density', density); }, [density]); uE(() => { localStorage.setItem('hdr.mode', mode); localStorage.setItem('hdr.route', route); }, [mode, route]); uE(() => { const map = { saffron: { h: '62', c: '0.16' }, indigo: { h: '265', c: '0.15' }, emerald: { h: '155', c: '0.14' }, coral: { h: '30', c: '0.16' }, }; const v = map[accent] || map.saffron; document.documentElement.style.setProperty('--accent', `oklch(0.745 ${v.c} ${v.h})`); document.documentElement.style.setProperty('--accent-soft', `oklch(0.745 ${v.c} ${v.h} / 0.14)`); document.documentElement.style.setProperty('--accent-line', `oklch(0.745 ${v.c} ${v.h} / 0.32)`); localStorage.setItem('hdr.accent', accent); }, [accent]); if (loading) { return (
Built in India, for India. Hidrogen routes every request through the right model automatically — chat, voice, images, Indian languages — with INR billing and zero vendor lock-in.
{/* Hidrogen model aliases — NOT provider names */}{tab === 'login' ? 'Sign in to your dashboard.' : 'Free ₹50 credits on signup, no card needed.'}
By accessing or using the Hidrogen API platform ("Service"), provided by Hidrogen, Lucknow, India ("Hidrogen", "we", "us", "our"), you ("User", "you", "your") agree to be bound by these Terms & Conditions. If you do not agree, do not use the Service.
Hidrogen provides a unified API gateway for AI services (chat, image, voice, speech-to-text). The Service routes requests intelligently across underlying AI infrastructure, bills in INR, and is intended primarily for Indian developers and businesses.
You must be at least 18 years old and capable of forming a legally binding contract under the Indian Contract Act, 1872. You are responsible for keeping your account credentials and API keys secure. Any activity through your account is your responsibility.
You agree NOT to use the Service to:
All charges are in Indian Rupees (INR). You pre-fund your wallet via Razorpay (UPI, cards, net-banking) or set up Auto-Pay for recurring monthly recharges. API usage is metered per request and deducted from your wallet balance. Pricing is published in the dashboard and may change with 30 days' notice.
Auto-Pay: If you enable Auto-Pay, you authorize Razorpay to charge your selected payment instrument every month for the configured amount until you pause or cancel the mandate from your bank/UPI app or Hidrogen dashboard.
API keys (prefix hi_) are sensitive credentials. Never commit them to version control, share publicly, or expose them client-side. Compromised keys must be revoked immediately. Hidrogen is not liable for unauthorized usage resulting from your key disclosure.
We target 99.9% uptime but do not guarantee uninterrupted service. Maintenance windows, third-party provider outages, and force-majeure events may cause temporary unavailability. No service credits are issued unless explicitly mentioned in a separate SLA agreement.
The Hidrogen platform, branding, and documentation are owned by Hidrogen. You retain ownership of your prompts and the outputs you generate (subject to applicable law on AI-generated content). You grant Hidrogen a limited license to process your inputs solely to deliver the Service.
Your data is handled per our Privacy Policy. We do not train models on your data.
To the maximum extent permitted by law, Hidrogen's total aggregate liability for any claims relating to the Service shall not exceed the amount paid by you to Hidrogen in the three (3) months preceding the claim. We are not liable for indirect, incidental, consequential, or punitive damages.
You may close your account anytime. We may suspend or terminate access for violations of these Terms, prolonged inactivity (12+ months), or if required by law. Unused wallet balance may be refunded per the Refund Policy on closure.
These Terms are governed by the laws of India. Any disputes shall be subject to the exclusive jurisdiction of courts at Lucknow, Uttar Pradesh.
We may update these Terms; continued use after updates means acceptance. Material changes will be notified by email.
Hidrogen, Lucknow, Uttar Pradesh, India · hello@hidrogen.in
> ) }, privacy: { title: 'Privacy Policy', subtitle: 'Last updated: ' + new Date().toLocaleDateString('en-IN', { day: 'numeric', month: 'long', year: 'numeric' }), content: ( <>Hidrogen is operated by Hidrogen, based in Lucknow, Uttar Pradesh, India. This Privacy Policy describes how we collect, use, and protect your information.
Account information: Name, email, password (hashed), phone (optional).
Payment information: Processed entirely by Razorpay. We store transaction IDs and amounts but never see or store your card numbers, UPI PINs, or bank credentials.
Usage data: API request metadata (endpoint, model alias, latency, token counts, status codes). We do NOT log the content of your prompts or model responses in plain text by default.
Technical data: IP address, user agent, timestamps — used for security and rate limiting.
We use the following processors strictly to deliver the Service:
Data is stored in India (Mumbai, ap-south-1). We use industry-standard encryption (TLS in transit, hashed credentials at rest). Despite our efforts, no system is 100% secure — please use strong passwords and rotate API keys regularly.
Account data is retained while your account is active and for 12 months after closure (for audit/tax compliance). Usage logs are retained for 90 days. You can request earlier deletion by emailing us, subject to legal retention requirements.
Under the Digital Personal Data Protection Act, 2023, you have the right to:
We use only essential cookies (session JWT for authentication). No tracking, advertising, or third-party analytics cookies.
Hidrogen is not directed at children under 18. We do not knowingly collect data from minors.
We will notify users by email of material changes. Continued use after updates means acceptance.
Per Indian IT Rules, our designated Grievance Officer is reachable at: grievance@hidrogen.in · Hidrogen, Lucknow, Uttar Pradesh, India. Response within 30 days.
> ) }, refund: { title: 'Refund & Cancellation Policy', subtitle: 'Last updated: ' + new Date().toLocaleDateString('en-IN', { day: 'numeric', month: 'long', year: 'numeric' }), content: ( <>Hidrogen wallet recharges (one-time or via Auto-Pay) are non-refundable once credited, except in the following cases:
API charges are metered per successful request and deducted from your wallet at the time of use. Once a request is successfully processed, the deduction is final. Failed requests (HTTP 5xx errors caused by Hidrogen) are not billed; failed requests due to client errors (4xx) may or may not be billed depending on whether work was performed.
You may pause or cancel Auto-Pay anytime from:
Cancellation stops future charges but does not refund prior cycles.
Email billing@hidrogen.in within 14 days of the disputed charge with:
We respond within 3 working days. Approved refunds are processed via Razorpay to the original payment method within 5-7 working days.
If you initiate a chargeback without first contacting us, we reserve the right to suspend your account pending resolution.
> ) } }; const d = docs[doc] || docs.tc; return (