Work orders (necesidades) are the spine of the product. A work order is a single job at a single place — “escombros bloqueando la entrada de dos casas” — that stays on the map until enough people have helped and nobody says it still needs attention. Unlike a site, which is a persistent fixture, a work order is something to be done: it is true until it is not, and the thread of entries is the evidence of what happened between those two states.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/astrxnomo/manizalesdepie/llms.txt
Use this file to discover all available pages before exploring further.
Categories
| Category | Spanish Label |
|---|---|
debris_removal | Escombros |
animal_rescue | Rescate de animales |
structural_risk | Riesgo estructural |
supplies | Insumos |
other | Otro |
supplies covers food, drinking water, and hygiene items — anything a family is asking for rather than a job site asking to be fixed. A former water category existed briefly and was retired: every real case tagged with it described food, water, and shelter together, which is supplies, not a category of its own. The Postgres enum still carries the value, but nothing in the application offers or accepts it.
Status lifecycle
Status is derived from thework_order_update activity thread by the sync_work_order_state Postgres function. The application never writes a status directly. Closing used to be a single anonymous tap, which meant one bad actor could take any case off the map; that path no longer exists.
| DB Status | Meaning |
|---|---|
unclaimed | No one has said anything about this case |
claimed | At least one person said “yo puedo atender” |
attended | At least one person said “ya ayudé” — case is still open |
closed_completed | A curator closed the case as resolved |
closed_by_others | No longer used in the app flow (kept because the Postgres enum keeps it) |
closed_rejected | A curator marked the case as not real |
helped entries. No single person can reach that threshold alone, which is the whole point. The curator actions (closed_completed, closed_rejected) are the exception for cases that only one person ever helped with, or that are genuinely fake.
WorkOrderRollup
The public UI does not show raw DB statuses. Instead, it computes a rollup fromstatus, reopened, and helpedCount together (see workOrderRollup in lib/labels.ts):
| Rollup | Description | Marker color |
|---|---|---|
untouched | Nobody has said anything — the loudest thing on the map | Red (bg-unclaimed) |
onTheWay | Somebody said “voy”, nobody has been yet | Softened red (bg-unclaimed/75) |
partial | One person helped — case is NOT better than half-done | Amber (bg-claimed) |
advanced | Two or more people helped, still open | Softened green (bg-resolved/75) |
reopened | ”Sigue haciendo falta” after the last help — outranks all prior helps | Red (bg-unclaimed) |
done | Closed by curator — full green, the only final green | Green (bg-resolved) |
dismissed | Closed without resolution — rejected or already done by others | Gray (bg-stale) |
helped entry caused cases that still needed five more people to stop receiving any. Help moves the pin through amber as it accumulates; green is reserved for an actual curator close.
reopened outranks everything: a case where somebody stood there after the last help and said it still is not enough was, under the old model, wearing the color that means handled. The reopened boolean (derived in the database alongside status) is persisted separately so the rollup can catch this.
Activity thread
Anyone can post an update entry, with no account required. Four kinds:| Kind | Spanish Label | Effect |
|---|---|---|
on_the_way | Yo puedo atender | Sets status toward claimed; adds to attendeeCount |
helped | Ya ayudé | Increments helpedCount; two distinct phones closes the case |
still_needed | Sigue haciendo falta | Sets reopened = true; outranks all prior helps |
not_real | Esto no es un caso real | Curator review signal; does not close the case on its own |
A case never auto-closes on a timer. Two distinct phone numbers posting
helped is what allows the sync_work_order_state function to close it. An anonymous helped entry (no phone provided) still shows in the thread and counts toward helpedCount, but it cannot be one of the two distinct phone numbers the closing threshold requires. Anonymity is free everywhere except the one action that takes a case off the map.note (3–500 characters) — not because the system needs it, but because a pile of anonymous taps coordinates nothing. The note is addressed to the next person who shows up, not to an administrator. Name and phone are both optional; leaving them blank publishes the entry as “Anónimo”.
Contact fields
exactAddress, contactName, phone, and notes are all public — no reveal gate — since August 15, when the attend-to-reveal gate was removed. They are all optional because the person filling out the form is often a neighbor reporting on behalf of an affected household, not the household itself. The form states out loud that these fields are visible to anyone.
A case with no contact fields is still a valid case — the pin and the barrio are what make it findable on the map.
WorkOrderDTO fields
Unique identifier for the work order.
One of
debris_removal, animal_rescue, structural_risk, supplies, other.Free-text description of the case, e.g. “Escombros bloqueando la entrada de dos casas, se necesita volqueta.”
WGS-84 longitude of the case location.
WGS-84 latitude of the case location.
Barrio name, derived from the coordinate by PostGIS. Never written by the application.
One of
unclaimed, claimed, attended, closed_completed, closed_by_others, closed_rejected. Derived by sync_work_order_state; never written by the application.Distinct people who said “yo puedo atender”. Several can be attending the same case simultaneously.
Distinct people who said “ya ayudé”. Two from two different phone numbers is what closes a case via the database threshold.
true when someone said “sigue haciendo falta” after the last “ya ayudé”. Derived in the database alongside status. Read through workOrderRollup, which combines it with status and helpedCount to determine what the marker shows.Street address or landmark, public since August 15.
Name of the person to contact about the case, public since August 15.
Contact phone number, public since August 15.
Additional notes for whoever attends, public since August 15.
When the case was last touched. Used for freshness labeling (“Publicado hace 2 h”).
When the case was first reported.
Whether the work order is visible to the public. Only curators may toggle this.
Creating a work order
Anyone can report a work order — no account required. The contact fields are published on the card, so the form states that where they are typed.One of
debris_removal, animal_rescue, structural_risk, supplies, other.Description of the case. Between 5 and 500 characters.
WGS-84 longitude. Must be between
-76.2 and -74.8. Out-of-area values are rejected with “Este mapa solo cubre Manizales y Villamaría.”WGS-84 latitude. Must be between
4.6 and 5.6. Same out-of-area message applies.Street address or landmark reference. Maximum 200 characters. Optional.
Name of the person to contact. Maximum 120 characters. Optional.
Contact phone number. Digits only, 7–15 characters. Validation message: “Debe ser solo dígitos”. Optional — but a
helped entry from a phone-less reporter cannot contribute to the closing threshold.Additional notes for whoever attends. Maximum 500 characters. Optional.
