-
-
Ma'wa helps displaced families find available public shelters with transparent, time-aware capacity information.
-
The same schools serve different roles over time. The phase switch adapts recommendations to the crisis stage.
-
Every shelter shows when its information was last verified so families can judge whether it is still reliable.
-
Interactive shelter map showing public schools across Lebanon with trusted, up-to-date capacity information.
-
Shelter coordinators securely update official capacity using unique verification codes.
-
Anyone can report issues without changing official capacity, balancing openness with data integrity.
-
Families describe their situation naturally in Arabic instead of filling long emergency forms.
Inspiration
A few months ago the war reached our area in south Lebanon and my family evacuated at three in the morning. We didn't know where to go, so we drove.
The problem was never whether shelters existed. It was which one still had room that night. Answers came through WhatsApp groups and phone calls, and by the time one reached us it was already old — a school with space at six was full by ten.
We were not an exception. When an area comes under threat, rent rises within days in the safe areas, and families who might otherwise have found an apartment are priced out almost immediately. This is not only a problem for the poorest families; middle-income families are pushed into the same position, unable to secure housing in time. Most end up looking for a place in a public school — and no one can tell them where there is still room.
Lebanon does monitor shelters. Disaster Risk Management and the Red Cross track capacity carefully. But that machinery is built for humanitarian responders. There is no public, Arabic, mobile-first way for a family sitting in a car at eleven at night to find out where there is space.
That gap is why this project exists.
What it does
Ma'wa shows which Lebanese public schools can take displaced families — and, unusually, how old that information is.
Trust decays on a clock
Every capacity report is scored using:
confidence = role_weight × 0.5 ^ (hours_since_report / 12)
Trust halves every twelve hours. That score drives a colour badge and a shrinking bar on every card:
- 🟢 Green → verified recently
- 🟠 Amber → call before travelling
- ⚪ Grey → we don't know
Old information is worse than none. It sends a family across the country to a building that is already full. So the age of every report is shown, never hidden.
Direction of flow, not distance
Proximity is worth only 10% of the ranking. People fleeing the south need shelter away from the south — the nearest school is often the one they are running from.
Two phases, one map
This is the part I'm proudest of.
During active conflict, southern schools are where people flee from. Today, families whose homes were destroyed are living in those same southern schools.
Same buildings, opposite answer.
So the map has an Emergency / Recovery switch rather than a fixed list of "safe" areas.
Separating the right to inform from the right to assert
Setting real numbers requires the shelter's four-digit code, held by the shelter coordinator, who can share it with trusted volunteers.
Anyone can raise an alert—but an alert changes no number. It simply drops the trust badge to amber and encourages others to phone ahead.
Free-text intake
A family types their situation in ordinary Arabic and the system extracts:
- Family size
- Origin
- Wheelchair needs
- Elderly family members
- Infants
No forms at the worst moment of someone's week.
How I built it
- Next.js and Tailwind CSS for an RTL Arabic, mobile-first interface.
- Supabase (PostgreSQL) for the database, with capacity stored as append-only reports rather than an overwritten field. That single design choice makes it possible to show history, disagreement, and data staleness.
- Access codes live in a separate table with no read policy, so the website cannot read a code even in principle. Verification happens inside the database through a
SECURITY DEFINERfunction. - Leaflet and OpenStreetMap for mapping instead of a proprietary maps API.
- Claude parses Arabic free-text intake, with a rule-based Arabic parser as a fallback.
- Deployed on Vercel.
I used Claude Code as a pair programmer. The architecture decisions—the decay function, the phase switch, the code system, and what counts as a receiving area—were mine to make and defend.
Challenges
Defining the correct shelter locations
Initially, the application displayed shelters in the areas people were evacuating from rather than the areas receiving displaced families. I redesigned the system with a phase-switching mechanism that adapts the map based on whether people are evacuating or returning, turning an early mistake into a core feature.
Maintaining data integrity
Instead of populating the application with estimated shelter capacities for demonstration purposes, I chose to display only verified information. Shelters without confirmed data are clearly labeled as "Unverified", ensuring users are not misled.
Balancing accessibility with reliability
Allowing anyone to edit shelter capacities increases the risk of misinformation, while limiting edits to verified contributors can leave the system with little data. To address this, I separated verified capacity updates from community-submitted alerts that can later be reviewed.
Identifying official shelters
Public schools are commonly designated as collective shelters in Lebanon, but mapping sources such as OpenStreetMap often do not distinguish between public and private schools. Rather than making assumptions, the application marks uncertain locations as unverified until they are confirmed.
What I learned
One of the biggest lessons I learned is that building an information tool is rarely about collecting as much data as possible. The real challenge is understanding what you don't know and designing the system to communicate that uncertainty honestly. In a humanitarian context, showing unverified information as if it were confirmed can be more harmful than showing no information at all. That realization shaped many of the project's design decisions, from leaving shelter capacities blank until they are reported to clearly labeling unverified data instead of guessing.
I also learned that good software design starts with deeply understanding the problem before writing code. Early in development, I misunderstood what "receiving areas" meant and built the application around the wrong locations. Correcting that mistake led to a better architecture based on evacuation phases and ultimately improved the entire project.
Finally, I learned that every design decision involves trade-offs. Making a platform completely open increases participation but can reduce data reliability, while making it too restrictive can leave it without useful information. Building Maawa taught me to think beyond technical implementation and focus on trust, transparency, and the real-world impact that software can have during emergencies.
What's next
- Codes are currently issued centrally, which does not scale past a pilot. A coordinator should be able to claim their school directly—reporting at volunteer trust until a municipality confirms them.
- Rate limiting and rotation on access codes.
- SMS fallback, so the tool works with no internet at all.
- Offline caching of the last known state.
- Partnering with a municipality to pilot real capacity reporting.
Built With
- anthropic
- arabic
- claude
- javascript
- leaflet.js
- next.js
- node.js
- openstreetmap
- plpgsql
- postgresql
- react
- rest-api
- sql
- supabase
- tailwindcss
- vercel
- visual-studio
Log in or sign up for Devpost to join the conversation.