Spaces:
Sleeping
Sleeping
Update app.py
Browse files37 unmodified lines3839404142434445464748296 unmodified lines345346347343344345346348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435349436437438439228 unmodified lines6686696706716726736746756766776786791 unmodified line6816826835915925935946846856866876886896906915975985996006016926936946956966976036046056066986997007016086096106117027037047057067076156166177087097107117127137147157167177187197207217227237247257267277287297307316206216226236246256266277327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887896337907917927939 unmodified lines80380480564965065165280680780880981081181281381481581681781881982082182282382482582637 unmodified lines } .nav-cta:hover { background: #9FE1CB; transform: translateY(-1px); }
.tab-btn { font-size:13px;font-weight:600;padding:8px 18px;border-radius:8px;border:1.5px solid #e4e0d8;background:#fff;color:#666;cursor:pointer;font-family:'Inter',sans-serif;transition:all 0.2s; } .tab-btn:hover { border-color:#1D9E75;color:#1D9E75; } .tab-active { background:#1D9E75 !important;color:#fff !important;border-color:#1D9E75 !important; }
/* PAGES */ .page { display: none; animation: fadeIn 0.4s ease; } .page.active { display: block; }296 unmodified lines
<!-- APP DEMO PAGE --><div class="page" id="page-app"> <div style="text-align:center;padding:40px 20px 20px"> <div class="section-label">Interactive demo</div> <div class="section-title" style="font-size:28px">The <span class="grad">NourishNet</span> restaurant app</div> <p style="color:#666;font-size:14px;margin-top:10px">Tap through the full experience</p>
<div style="background:#1D9E75;padding:56px 48px 48px;text-align:center"> <div style="font-size:12px;color:#9FE1CB;letter-spacing:0.1em;text-transform:uppercase;font-weight:600;margin-bottom:12px">Interactive demo</div> <div style="font-size:36px;font-weight:700;color:#fff;letter-spacing:-0.02em;margin-bottom:14px">The NourishNet restaurant app</div> <p style="color:#9FE1CB;font-size:16px;max-width:480px;margin:0 auto;line-height:1.7">A full walkthrough of how restaurants log surplus, get AI-matched to communities, and track their real-world impact.</p> </div>
<div style="background:#F7F5F0;padding:24px 48px;border-bottom:1px solid #e4e0d8;display:flex;gap:12px;justify-content:center;flex-wrap:wrap"> <button onclick="showAppScreen('as-home');highlightTab(this)" class="tab-btn tab-active">π Home</button> <button onclick="showAppScreen('as-donate');highlightTab(this)" class="tab-btn">β Donate</button> <button onclick="showAppScreen('as-impact');highlightTab(this)" class="tab-btn">π Impact</button> <button onclick="showAppScreen('as-leaderboard');highlightTab(this)" class="tab-btn">π Leaderboard</button> </div>
<div style="display:grid;grid-template-columns:1fr 420px;gap:48px;max-width:1020px;margin:0 auto;padding:48px">
<div id="screen-desc" style="padding-top:8px"> <div id="desc-home"> <div style="font-size:12px;font-weight:700;color:#1D9E75;letter-spacing:0.08em;text-transform:uppercase;margin-bottom:12px">Home screen</div> <div style="font-size:28px;font-weight:700;color:#111;letter-spacing:-0.01em;margin-bottom:16px;line-height:1.25">Your restaurant dashboard at a glance</div> <p style="font-size:15px;color:#555;line-height:1.8;margin-bottom:24px">The home screen shows this week's impact metrics, the AI's prediction for tonight's surplus, and your current donation streak β all in one place.</p> <div style="display:flex;flex-direction:column;gap:12px"> <div style="display:flex;gap:14px;align-items:flex-start;background:#fff;border:1px solid #e4e0d8;border-radius:12px;padding:16px"> <div style="width:36px;height:36px;border-radius:9px;background:#dff4ec;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0">π</div> <div><div style="font-size:14px;font-weight:700;color:#111;margin-bottom:4px">Live impact metrics</div><div style="font-size:13px;color:#666;line-height:1.6">Meals saved, COβ avoided, and points earned update in real time each week.</div></div> </div> <div style="display:flex;gap:14px;align-items:flex-start;background:#fff;border:1px solid #e4e0d8;border-radius:12px;padding:16px"> <div style="width:36px;height:36px;border-radius:9px;background:#dff4ec;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0">π€</div> <div><div style="font-size:14px;font-weight:700;color:#111;margin-bottom:4px">AI surplus prediction</div><div style="font-size:13px;color:#666;line-height:1.6">The AI predicts tonight's leftover portions before they happen, based on your history.</div></div> </div> <div style="display:flex;gap:14px;align-items:flex-start;background:#fff;border:1px solid #e4e0d8;border-radius:12px;padding:16px"> <div style="width:36px;height:36px;border-radius:9px;background:#dff4ec;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0">π₯</div> <div><div style="font-size:14px;font-weight:700;color:#111;margin-bottom:4px">Donation streak tracker</div><div style="font-size:13px;color:#666;line-height:1.6">Build a streak to unlock badges like Community Hero and Zero Waste Champion.</div></div> </div> </div> </div>
<div id="desc-donate" style="display:none"> <div style="font-size:12px;font-weight:700;color:#1D9E75;letter-spacing:0.08em;text-transform:uppercase;margin-bottom:12px">Donate screen</div> <div style="font-size:28px;font-weight:700;color:#111;letter-spacing:-0.01em;margin-bottom:16px;line-height:1.25">Log surplus in 30 seconds</div> <p style="font-size:15px;color:#555;line-height:1.8;margin-bottom:24px">Just tell the app what food you have, how many portions, and when it expires. The AI instantly recommends the best recipient β no manual searching needed.</p> <div style="display:flex;flex-direction:column;gap:12px"> <div style="display:flex;gap:14px;align-items:flex-start;background:#fff;border:1px solid #e4e0d8;border-radius:12px;padding:16px"> <div style="width:36px;height:36px;border-radius:9px;background:#dff4ec;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0">ποΈ</div> <div><div style="font-size:14px;font-weight:700;color:#111;margin-bottom:4px">Portion slider</div><div style="font-size:13px;color:#666;line-height:1.6">Drag the slider β the AI recommendation updates live as the quantity changes.</div></div> </div> <div style="display:flex;gap:14px;align-items:flex-start;background:#fff;border:1px solid #e4e0d8;border-radius:12px;padding:16px"> <div style="width:36px;height:36px;border-radius:9px;background:#dff4ec;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0">πΊοΈ</div> <div><div style="font-size:14px;font-weight:700;color:#111;margin-bottom:4px">Smart matching</div><div style="font-size:13px;color:#666;line-height:1.6">Small batches go to nearby elderly individuals. Large ones route to refugee centers or food banks.</div></div> </div> <div style="display:flex;gap:14px;align-items:flex-start;background:#fff;border:1px solid #e4e0d8;border-radius:12px;padding:16px"> <div style="width:36px;height:36px;border-radius:9px;background:#dff4ec;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0">β
</div> <div><div style="font-size:14px;font-weight:700;color:#111;margin-bottom:4px">One-tap confirm</div><div style="font-size:13px;color:#666;line-height:1.6">Tap confirm and a volunteer is dispatched automatically β no phone calls needed.</div></div> </div> </div> </div>
<div id="desc-impact" style="display:none"> <div style="font-size:12px;font-weight:700;color:#1D9E75;letter-spacing:0.08em;text-transform:uppercase;margin-bottom:12px">Impact screen</div> <div style="font-size:28px;font-weight:700;color:#111;letter-spacing:-0.01em;margin-bottom:16px;line-height:1.25">See exactly who you fed</div> <p style="font-size:15px;color:#555;line-height:1.8;margin-bottom:24px">Every donation creates a story. See which communities received your food, how much COβ you saved, and read real thank-you messages from recipients.</p> <div style="background:#dff4ec;border:1px solid #9FE1CB;border-radius:14px;padding:20px 22px"> <div style="font-size:13px;color:#085041;line-height:1.75;font-style:italic">"Your Monday surplus fed 47 elderly residents at Al Qasba Care Home, saving 12kg of COβ and providing a warm halal meal to people who needed it most."</div> <div style="font-size:12px;color:#1D9E75;margin-top:10px;font-weight:600">β Al Qasba Elderly Home Β· 2 days ago</div> </div> </div>
<div id="desc-leaderboard" style="display:none"> <div style="font-size:12px;font-weight:700;color:#1D9E75;letter-spacing:0.08em;text-transform:uppercase;margin-bottom:12px">Leaderboard screen</div> <div style="font-size:28px;font-weight:700;color:#111;letter-spacing:-0.01em;margin-bottom:16px;line-height:1.25">Compete with restaurants citywide</div> <p style="font-size:15px;color:#555;line-height:1.8;margin-bottom:24px">A live city leaderboard ranks restaurants by total meals donated. Top spots earn public recognition, press features, and verified sustainability badges on Google Maps.</p> <div style="display:flex;flex-direction:column;gap:10px"> <div style="background:#FAEEDA;border-radius:10px;padding:14px 16px;display:flex;align-items:center;gap:12px"> <span style="font-size:20px;font-weight:700;color:#BA7517">π₯</span> <div><div style="font-size:13px;font-weight:700;color:#633806">Zero Waste Champion</div><div style="font-size:12px;color:#854F0B">Donate the most meals in your city this month</div></div> </div> <div style="background:#dff4ec;border-radius:10px;padding:14px 16px;display:flex;align-items:center;gap:12px"> <span style="font-size:20px;font-weight:700;color:#0F6E56">π
</span> <div><div style="font-size:13px;font-weight:700;color:#085041">Community Hero</div><div style="font-size:12px;color:#1D9E75">Maintain a 7-day donation streak</div></div> </div> <div style="background:#E6F1FB;border-radius:10px;padding:14px 16px;display:flex;align-items:center;gap:12px"> <span style="font-size:20px;font-weight:700;color:#185FA5">β</span> <div><div style="font-size:13px;font-weight:700;color:#0C447C">1,000 Meals Badge</div><div style="font-size:12px;color:#185FA5">Reach 1,000 total meals donated</div></div> </div> </div> </div> </div>
<div class="app-shell"> <div class="app-shell" style="margin:0"> <!-- HOME SCREEN --> <div class="app-screen active" id="as-home"> <div class="app-topbar">228 unmodified lines </div> </div>
</div>
</div> </div>
<div style="text-align:center;padding:32px 20px 56px"> <button class="btn-outline" onclick="showPage('home')">β Back to homepage</button> </div>1 unmodified line
<!-- ABOUT PAGE --><div class="page" id="page-about"> <div class="about-hero"> <div class="section-label">Our mission</div> <h1>No food left behind<br><span class="grad">in the UAE</span></h1> <p>NourishNet was built to solve one of the Gulf's most pressing problems β 3.27 million tons of food wasted every year, while thousands go without a meal. We use AI to close that gap, automatically.</p>
<!-- Hero --> <div style="background:#1D9E75;padding:80px 48px 72px;text-align:center"> <div style="font-size:12px;color:#9FE1CB;letter-spacing:0.1em;text-transform:uppercase;font-weight:600;margin-bottom:14px">Our mission</div> <h1 style="font-size:48px;font-weight:700;color:#fff;letter-spacing:-0.025em;line-height:1.15;margin-bottom:20px">No food left behind<br>in the UAE</h1> <p style="font-size:17px;color:#9FE1CB;max-width:540px;margin:0 auto;line-height:1.8">NourishNet was built to close one of the Gulf's most pressing gaps β 3.27 million tons wasted every year, while thousands go without a meal.</p> </div>
<div class="team-grid"> <div class="team-card"> <div class="team-avatar" style="background:#dff4ec;color:#1D9E75">π€</div> <div class="team-name">AI Routing Engine</div> <div class="team-role">Matches food to communities in seconds</div> <!-- Impact numbers --> <div style="display:grid;grid-template-columns:repeat(3,1fr);background:#F7F5F0;border-bottom:1px solid #e4e0d8"> <div style="padding:40px 20px;text-align:center;border-right:1px solid #e4e0d8"> <div style="font-size:36px;font-weight:700;color:#1D9E75;margin-bottom:6px">3.27M</div> <div style="font-size:13px;color:#888;font-weight:500">Tons wasted in UAE yearly</div> </div> <div class="team-card"> <div class="team-avatar" style="background:#E6F1FB;color:#185FA5">π€</div> <div class="team-name">UAE Food Bank</div> <div class="team-role">Distribution partner across the Emirates</div> <div style="padding:40px 20px;text-align:center;border-right:1px solid #e4e0d8"> <div style="font-size:36px;font-weight:700;color:#1D9E75;margin-bottom:6px">60%</div> <div style="font-size:13px;color:#888;font-weight:500">Food wasted during Ramadan</div> </div> <div class="team-card"> <div class="team-avatar" style="background:#FAEEDA;color:#854F0B">πΏ</div> <div class="team-name">Ne'ma Initiative</div> <div class="team-role">National food waste reduction partner</div> <div style="padding:40px 20px;text-align:center"> <div style="font-size:36px;font-weight:700;color:#1D9E75;margin-bottom:6px">$3.5B</div> <div style="font-size:13px;color:#888;font-weight:500">Annual economic cost</div> </div> </div>
<div class="mission-section"> <h2>Why we built this</h2> <p>Dubai wastes 38% of prepared food daily β rising to 60% during Ramadan. Existing solutions are manual and don't distinguish between a refugee center needing 200 portions and an elderly home needing 40 soft halal meals. NourishNet's AI does that distinction automatically, every time.</p> <!-- Story section --> <div style="max-width:900px;margin:0 auto;padding:80px 48px;display:grid;grid-template-columns:1fr 1fr;gap:56px;align-items:center"> <div> <div style="font-size:12px;font-weight:700;color:#1D9E75;letter-spacing:0.08em;text-transform:uppercase;margin-bottom:14px">Why we built this</div> <div style="font-size:28px;font-weight:700;color:#111;line-height:1.3;margin-bottom:18px;letter-spacing:-0.01em">A problem hiding in plain sight</div> <p style="font-size:15px;color:#555;line-height:1.85;margin-bottom:16px">Dubai wastes 38% of prepared food daily. Every evening, restaurants throw away perfectly good meals while elderly residents, refugee families, and low-income households nearby go without.</p> <p style="font-size:15px;color:#555;line-height:1.85">Existing solutions are manual and one-size-fits-all. They don't distinguish between a refugee center needing 200 portions and an elderly home needing 40 soft halal meals. NourishNet's AI does that automatically, every time.</p> </div> <div style="display:flex;flex-direction:column;gap:14px"> <div style="background:#fff;border:1px solid #e4e0d8;border-radius:14px;padding:20px 22px;border-left:4px solid #1D9E75;border-radius:0 14px 14px 0"> <div style="font-size:22px;font-weight:700;color:#1D9E75;margin-bottom:4px">38%</div> <div style="font-size:13px;color:#555;line-height:1.6">of prepared food wasted daily in Dubai alone β rising sharply during holiday seasons</div> </div> <div style="background:#fff;border:1px solid #e4e0d8;border-radius:14px;padding:20px 22px;border-left:4px solid #185FA5;border-radius:0 14px 14px 0"> <div style="font-size:22px;font-weight:700;color:#185FA5;margin-bottom:4px">80β90%</div> <div style="font-size:13px;color:#555;line-height:1.6">of UAE food is imported β making every wasted meal a double economic and environmental loss</div> </div> <div style="background:#fff;border:1px solid #e4e0d8;border-radius:14px;padding:20px 22px;border-left:4px solid #BA7517;border-radius:0 14px 14px 0"> <div style="font-size:22px;font-weight:700;color:#BA7517;margin-bottom:4px">50%</div> <div style="font-size:13px;color:#555;line-height:1.6">UAE national target to reduce food waste by 2030 β NourishNet is built to help hit that goal</div> </div> </div> </div>
<section class="section"> <div class="section-label">The problem we solve</div> <div class="section-title">A gap <span class="grad">no one has filled</span> in the Gulf</div> <div class="section-sub">Most food redistribution platforms in the region are manual and one-size-fits-all. NourishNet is the first to use AI-powered quantity-based routing.</div> <div class="steps-grid"> <div class="step-card"><div class="step-icon">π</div><div class="step-title">3.27M tons wasted</div><div class="step-desc">Every year in the UAE alone. Costing the economy $3.5 billion and contributing massively to methane emissions.</div></div> <div class="step-card"><div class="step-icon">π§</div><div class="step-title">Vulnerable communities</div><div class="step-desc">Elderly residents, refugees, and low-income families all have different needs. Generic redistribution ignores this entirely.</div></div> <div class="step-card"><div class="step-icon">π€</div><div class="step-title">AI fills the gap</div><div class="step-desc">NourishNet's routing engine analyzes quantity, type, expiry, and proximity to make the perfect match β in seconds.</div></div> <!-- How NourishNet is different --> <div style="background:#eeeae2;padding:80px 48px;border-top:1px solid #e4e0d8;border-bottom:1px solid #e4e0d8"> <div style="max-width:1000px;margin:0 auto"> <div style="font-size:12px;font-weight:700;color:#999;letter-spacing:0.1em;text-transform:uppercase;text-align:center;margin-bottom:12px">What makes us different</div> <div style="font-size:34px;font-weight:700;color:#111;text-align:center;margin-bottom:12px;letter-spacing:-0.015em">Not just redistribution. <span class="grad">Smart redistribution.</span></div> <div style="font-size:16px;color:#666;text-align:center;max-width:560px;margin:0 auto 52px;line-height:1.75">Every existing platform in the Gulf does the same thing β pass food along. We match it intelligently.</div> <div style="display:grid;grid-template-columns:1fr 1fr;gap:20px"> <div style="background:#fff;border:1px solid #e4e0d8;border-radius:16px;padding:28px"> <div style="font-size:13px;font-weight:700;color:#999;margin-bottom:16px;text-transform:uppercase;letter-spacing:0.06em">Other platforms</div> <div style="display:flex;flex-direction:column;gap:10px"> <div style="display:flex;gap:10px;align-items:center;font-size:14px;color:#666"><span style="color:#E24B4A;font-weight:700;font-size:16px">β</span> Manual donor-recipient matching</div> <div style="display:flex;gap:10px;align-items:center;font-size:14px;color:#666"><span style="color:#E24B4A;font-weight:700;font-size:16px">β</span> One-size-fits-all distribution</div> <div style="display:flex;gap:10px;align-items:center;font-size:14px;color:#666"><span style="color:#E24B4A;font-weight:700;font-size:16px">β</span> No dietary or cultural filters</div> <div style="display:flex;gap:10px;align-items:center;font-size:14px;color:#666"><span style="color:#E24B4A;font-weight:700;font-size:16px">β</span> No impact tracking for donors</div> <div style="display:flex;gap:10px;align-items:center;font-size:14px;color:#666"><span style="color:#E24B4A;font-weight:700;font-size:16px">β</span> No incentives for restaurants</div> </div> </div> <div style="background:#fff;border:2px solid #1D9E75;border-radius:16px;padding:28px"> <div style="font-size:13px;font-weight:700;color:#1D9E75;margin-bottom:16px;text-transform:uppercase;letter-spacing:0.06em">NourishNet</div> <div style="display:flex;flex-direction:column;gap:10px"> <div style="display:flex;gap:10px;align-items:center;font-size:14px;color:#111"><span style="color:#1D9E75;font-weight:700;font-size:16px">β</span> AI-powered smart matching</div> <div style="display:flex;gap:10px;align-items:center;font-size:14px;color:#111"><span style="color:#1D9E75;font-weight:700;font-size:16px">β</span> Quantity-based recipient routing</div> <div style="display:flex;gap:10px;align-items:center;font-size:14px;color:#111"><span style="color:#1D9E75;font-weight:700;font-size:16px">β</span> Halal, dietary & cultural matching</div> <div style="display:flex;gap:10px;align-items:center;font-size:14px;color:#111"><span style="color:#1D9E75;font-weight:700;font-size:16px">β</span> Full impact dashboard per donor</div> <div style="display:flex;gap:10px;align-items:center;font-size:14px;color:#111"><span style="color:#1D9E75;font-weight:700;font-size:16px">β</span> Gamification, badges & leaderboard</div> </div> </div> </div> </div> </div>
<!-- Partners --> <section style="padding:80px 48px;max-width:1000px;margin:0 auto"> <div style="font-size:12px;font-weight:700;color:#999;letter-spacing:0.1em;text-transform:uppercase;text-align:center;margin-bottom:12px">Our partners</div> <div style="font-size:34px;font-weight:700;color:#111;text-align:center;margin-bottom:14px;letter-spacing:-0.015em">Built with the <span class="grad">right people</span></div> <div style="font-size:16px;color:#666;text-align:center;max-width:500px;margin:0 auto 48px;line-height:1.75">We didn't build NourishNet in isolation. We partnered with the organisations already doing the work on the ground.</div> <div style="display:grid;grid-template-columns:repeat(3,1fr);gap:20px"> <div class="step-card" style="text-align:center"> <div style="width:56px;height:56px;border-radius:14px;background:#dff4ec;display:flex;align-items:center;justify-content:center;font-size:28px;margin:0 auto 16px">π¦</div> <div style="font-size:16px;font-weight:700;color:#111;margin-bottom:6px">UAE Food Bank</div> <div style="font-size:13px;color:#666;line-height:1.65">Our primary distribution partner. Handles last-mile delivery to families and shelters across all seven Emirates.</div> </div> <div class="step-card" style="text-align:center"> <div style="width:56px;height:56px;border-radius:14px;background:#dff4ec;display:flex;align-items:center;justify-content:center;font-size:28px;margin:0 auto 16px">πΏ</div> <div style="font-size:16px;font-weight:700;color:#111;margin-bottom:6px">Ne'ma Initiative</div> <div style="font-size:13px;color:#666;line-height:1.65">The UAE's national food waste reduction initiative, targeting 50% reduction by 2030. We're aligned with their roadmap.</div> </div> <div class="step-card" style="text-align:center"> <div style="width:56px;height:56px;border-radius:14px;background:#dff4ec;display:flex;align-items:center;justify-content:center;font-size:28px;margin:0 auto 16px">π€</div> <div style="font-size:16px;font-weight:700;color:#111;margin-bottom:6px">Claude AI</div> <div style="font-size:13px;color:#666;line-height:1.65">Powers the intelligent routing engine that matches surplus to communities in real time, learning from every donation.</div> </div> </div> </section>
<!-- CTA --> <section class="cta-section"> <div class="cta-title">Join the movement</div> <div class="cta-sub">186 restaurants are already making a difference. Be next.</div> <div class="cta-sub">186 restaurants are already making a difference across the UAE.<br>Your surplus can feed someone tonight.</div> <button class="cta-btn" onclick="showPage('app')">Try the app demo β</button> </section>
9 unmodified lines</div>
<script> function showPage(id) { document.querySelectorAll('.page').forEach(p => p.classList.remove('active')); document.getElementById('page-' + id).classList.add('active'); window.scrollTo({top: 0, behavior: 'smooth'}); function highlightTab(el) { document.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('tab-active')); el.classList.add('tab-active'); const map = {'as-home':'desc-home','as-donate':'desc-donate','as-impact':'desc-impact','as-leaderboard':'desc-leaderboard'}; } function showAppScreen(id) { document.querySelectorAll('.app-screen').forEach(s => s.classList.remove('active')); document.getElementById(id).classList.add('active'); const map = {'as-home':'desc-home','as-donate':'desc-donate','as-impact':'desc-impact','as-leaderboard':'desc-leaderboard'}; document.querySelectorAll('[id^=desc-]').forEach(d => d.style.display='none'); if(map[id]) document.getElementById(map[id]).style.display='block'; } function showPage(id) { document.querySelectorAll('.page').forEach(p => p.classList.remove('active')); document.getElementById('page-' + id).classList.add('active'); window.scrollTo({top: 0, behavior: 'smooth'}); }
function selectRecipient(el) { document.querySelectorAll('.recipient-card').forEach(c => c.classList.remove('selected')); el.classList.add('selected');app.py+204-38