Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
967870a
Merge branch 'origin/backend-dev' into frontend-dev
RishabhRana37 Jun 20, 2026
06b1daa
feat(frontend): add optional sex field for donors, display rare group…
RishabhRana37 Jun 20, 2026
ad9d934
feat(frontend): implement premium ui primitives and backdrops from ef…
RishabhRana37 Jun 20, 2026
06824c4
feat(frontend): add motion background image slideshow to landing page…
RishabhRana37 Jun 20, 2026
7f2efa9
Restyle select dropdowns in Emergency Dispatch form to match dark car…
RishabhRana37 Jun 20, 2026
b9bc734
Replace landing page emoji icons with Lucide-react icons (MapPin, Bui…
RishabhRana37 Jun 20, 2026
3f4d7ed
Standardize and unify all landing page CTA buttons into the reusable …
RishabhRana37 Jun 20, 2026
3b49e8e
Update Console labels to Live and Live Dispatch for better user under…
RishabhRana37 Jun 20, 2026
db2f0b2
feat(ui): further tighten landing page vertical spacing
RishabhRana37 Jun 20, 2026
45e9dd2
fix(hero): make background image deliberate with proper 5-layer overl…
RishabhRana37 Jun 20, 2026
dad59c7
fix(design): limit red-amber gradient text to exactly 2 placements
RishabhRana37 Jun 20, 2026
1915863
fix(a11y): raise muted text color to pass WCAG AA on dark backgrounds
RishabhRana37 Jun 20, 2026
37d612e
fix(cursor): remove ambiguous red dot — restyle custom cursor dot
RishabhRana37 Jun 20, 2026
fb6e1a3
fix(content): replace hero_app_mockup.png to show 112 instead of 911
RishabhRana37 Jun 20, 2026
2456866
feat(hero): add 3 cinematic background slides inspired by red.health …
RishabhRana37 Jun 21, 2026
8827e72
fix(hero): make background images fully visible — red.health style
RishabhRana37 Jun 21, 2026
e9ba128
Merge main into frontend-dev: take backend from main, frontend from f…
SarmaHighOnCode Jun 21, 2026
7f57ef3
fix(results): normalize ETA seconds→minutes at all frontend ingestion…
RishabhRana37 Jun 21, 2026
103f3ca
fix(results): gate debug labels behind import.meta.env.DEV
RishabhRana37 Jun 21, 2026
cc1a017
style(results): make status badge visually prominent & add status lef…
RishabhRana37 Jun 21, 2026
f0331c3
feat(scroll): add global Lenis smooth scrolling and GSAP ScrollTrigge…
RishabhRana37 Jun 21, 2026
aaca746
fix(results): fix ScrollTrigger setup by adding isLoading to useGSAP …
RishabhRana37 Jun 21, 2026
8a6b3b4
feat(premium-ui): implement scroll reveals, hero parallax, dispatch o…
RishabhRana37 Jun 21, 2026
dd0bc2f
fix(scroll-reveal): restore scroll-driven TextReveal component and ad…
RishabhRana37 Jun 22, 2026
6cd3f74
style(hero): move SOS phone mockup to the beginning of the slide sequ…
RishabhRana37 Jun 22, 2026
4c06308
feat(landing): build one-time session-gated terminal boot sequence co…
RishabhRana37 Jun 22, 2026
9832a0b
style(landing): remove both shader compilation and typewriter console…
RishabhRana37 Jun 22, 2026
c511217
feat(results): implement dark theme, layout alignment, orchestrated c…
RishabhRana37 Jun 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions backend/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class EmergencyRequest(BaseModel):
class HospitalCard(BaseModel):
hospital_id: str
name: str
lat: float
lng: float
eta_minutes: int
department_match: bool
distance_km: float
Expand All @@ -52,12 +54,16 @@ class EmergencyResponse(BaseModel):
class HospitalStatusCard(BaseModel):
hospital_id: str
name: str
lat: float
lng: float
eta_minutes: int
status: HospitalStatus


class EmergencyStatusResponse(BaseModel):
request_id: str
lat: float
lng: float
hospitals: List[HospitalStatusCard]
donors_alerted: int
donors_responded: int
Expand Down
6 changes: 6 additions & 0 deletions backend/services/emergency_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ async def trigger_emergency(store, lat, lng, emergency_type, blood_group) -> Dic
{
"hospital_id": c["hospital_id"],
"name": c["name"],
"lat": c["lat"],
"lng": c["lng"],
"eta_minutes": c["eta_minutes"],
"department_match": c["department_match"],
"distance_km": c["distance_km"],
Expand Down Expand Up @@ -115,6 +117,8 @@ def get_status(store, request_id: str) -> Dict:
{
"hospital_id": card["hospital_id"],
"name": card["name"],
"lat": card["lat"],
"lng": card["lng"],
"eta_minutes": card["eta_minutes"],
"status": status,
}
Expand All @@ -129,6 +133,8 @@ def get_status(store, request_id: str) -> Dict:

return {
"request_id": request_id,
"lat": emergency["lat"],
"lng": emergency["lng"],
"hospitals": hospital_cards,
"donors_alerted": emergency["donors_alerted"],
"donors_responded": emergency["donors_responded"],
Expand Down
31 changes: 15 additions & 16 deletions backend/services/hospital_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,27 +346,26 @@ async def rank_hospitals(

candidates = candidates[:candidate_pool]

scored: List[Dict] = []
for h in candidates:
async def get_scored_candidate(h):
eta = await eta_minutes(lat, lng, h["lat"], h["lng"])
dept_match = needed_dept in h.get("departments", [])
prox = _proximity_score(eta)
dept = 1.0 if dept_match else 0.0
score = _score(store, h["id"], prox, dept)
return {
"hospital_id": h["id"],
"name": h["name"],
"lat": h["lat"],
"lng": h["lng"],
"eta_minutes": eta,
"department_match": dept_match,
"distance_km": h["distance_km"],
"status": "pending",
"phone": h["phone"],
"_score": score,
"_record": h,
}

scored.append(
{
"hospital_id": h["id"],
"name": h["name"],
"eta_minutes": eta,
"department_match": dept_match,
"distance_km": h["distance_km"],
"status": "pending",
"phone": h["phone"],
"_score": score,
"_record": h,
}
)

scored = await asyncio.gather(*(get_scored_candidate(h) for h in candidates))
scored.sort(key=lambda c: c["_score"], reverse=True)
return scored[:top_n]
8 changes: 7 additions & 1 deletion backend/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ def test_emergency_returns_contract_shape(client):
assert set(card) == {
"hospital_id",
"name",
"lat",
"lng",
"eta_minutes",
"department_match",
"distance_km",
Expand Down Expand Up @@ -92,6 +94,8 @@ def test_status_shape(client):
body = client.get(f"/emergency/{request_id}/status").json()
assert set(body) == {
"request_id",
"lat",
"lng",
"hospitals",
"donors_alerted",
"donors_responded",
Expand All @@ -101,7 +105,9 @@ def test_status_shape(client):
# Freshly created — well inside the no-confirmation window.
assert body["unconfirmed_fallback"] is False
card = body["hospitals"][0]
assert set(card) == {"hospital_id", "name", "eta_minutes", "status"}
assert set(card) == {
"hospital_id", "name", "lat", "lng", "eta_minutes", "status"
}


# --- POST /confirm/{token} — the live flow --------------------------------
Expand Down
4 changes: 1 addition & 3 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="manifest" href="/manifest.webmanifest" />
<link rel="apple-touch-icon" href="/icon-192.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />

<!-- Primary meta tags -->
<title>GoldenHour — Every Second Counts</title>
<title>GoldenHour — Emergency Hospital & Blood Response</title>
<meta
name="description"
content="GoldenHour turns one GPS-triggered emergency into two parallel actions: find and confirm a hospital with the right department and a free bed, and alert nearby compatible blood donors — built for families who self-transport to hospital."
Expand Down
Loading
Loading