diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 7ed8688..c96da39 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -23,10 +23,11 @@ export default defineConfig({ items: [ { text: "Introduction", link: "/overview/" }, { text: "Product Definition", link: "/overview/product-definition" }, - { text: "Scope and Status", link: "/overview/scope-and-status" }, { text: "System Overview", link: "/overview/system-overview" }, { text: "Key Features", link: "/overview/key-features" }, + { text: "Scope and Status", link: "/overview/scope-and-status" }, { text: "Technology Stack", link: "/overview/technology-stack" }, + { text: "Glossary", link: "/overview/glossary" }, ], }, { diff --git a/docs/overview/architecture-principles.md b/docs/overview/architecture-principles.md index d17bfaa..0b86123 100644 --- a/docs/overview/architecture-principles.md +++ b/docs/overview/architecture-principles.md @@ -1,3 +1,25 @@ # Architecture Principles -Content will be added and verified here. +These principles explain why MvuviGo is shaped the way it is. Each states its limit, so the principle is not over-read. + +| Principle | What it means | Limit | +|---|---|---| +| **Peer-first response** | Nearby participating fishers are alerted directly, not only the shore | Only fishers who carry devices can be alerted | +| **No mobile coverage for the first alert** | The SOS travels by long-range radio | Directions and phone coordination still use mobile networks | +| **Feature-phone accessibility** | Guidance arrives as simple messages, not through an app | Delivery depends on coverage at the responder's position | +| **Dynamic guidance** | Directions refresh every 30 seconds from the latest positions | The refresh rate must fit radio transmission limits | +| **Decision support, not autonomy** | AI suggests, people decide. No dispatch, boat control or final decisions | Directions are not a guarantee of the safest route | +| **Human coordination** | A landing-site operator monitors and coordinates | Needs operator availability and a plan for off-hours | +| **Fail visibly** | Missing, late or old data is flagged and never shown as current | Requires clear display of how fresh each location is | +| **Human fallback** | If the dashboard, AI or messaging fails, the operator coordinates by phone | The operator must be reachable | +| **Privacy by design** | Location is shared on SOS, not continuously | Storage and access rules must still be defined and published | +| **Record keeping** | Every incident, response and outcome is recorded | Records need access control and audit | +| **Complementary, not a replacement** | MvuviGo fills the gap between trouble and local help | It does not warn before a trip or protect a person in the water | + +## Cross-cutting constraints + +- **Security:** authenticated and encrypted transmissions, role-based access and audit logs. +- **Compliance:** data-protection law and radio regulation in each country of use. +- **Resilience:** the device must survive immersion, and its battery and charging routine must be simple. +- **Affordability:** the device must be affordable to the people expected to pay for it. + diff --git a/docs/overview/glossary.md b/docs/overview/glossary.md new file mode 100644 index 0000000..548a019 --- /dev/null +++ b/docs/overview/glossary.md @@ -0,0 +1,39 @@ +# Glossary + +## Roles + +| Term | Definition | +|---|---| +| **Fisher in distress** | The fisher who presses SOS | +| **Responding fisher (responder)** | A nearby participating fisher who receives an alert and may go to help | +| **Participating fisher** | A fisher registered with MvuviGo and carrying a paired device | +| **Landing-site operator** | The person at the landing site who registers fishers and devices, monitors the dashboard, coordinates the response and records the incident. Always called "operator" in this documentation | +| **Small-scale fisher** | A person who fishes for a living from a small boat near a landing site | + +## Places and organisations + +| Term | Definition | +|---|---| +| **Landing site** | A shore location where boats launch and land their catch | +| **Landing station** | The radio receiving equipment and computer at a landing site | +| **Beach Management Unit (BMU)** | A community body at a landing site that takes part in managing fishing activity | +| **Maritime rescue coordination centre** | A government centre that coordinates search and rescue | + +## System terms + +| Term | Definition | +|---|---| +| **SOS** | An emergency alert raised by pressing the button on a MvuviGo device | +| **MVP** | Minimum viable product: the first version, meant to test the full alert-to-record workflow | +| **Latest available location** | The most recent GPS position the device has, which may not be current. The system must distinguish it from a current position | +| **Decision support** | Guidance offered to people, who make the final decisions | +| **Feature phone** | A basic mobile phone that makes calls and sends messages but does not run apps | + +## Technology + +| Term | Definition | +|---|---| +| **LoRa** | A long-range, low-power radio technology that works without mobile coverage | +| **GPS** | Global Positioning System, used to find a location | +| **RFID** | Radio-frequency identification, used here to identify the fisher linked to a device | +| **OLED** | A small display on the device | \ No newline at end of file diff --git a/docs/overview/index.md b/docs/overview/index.md index e7a7958..34c0a07 100644 --- a/docs/overview/index.md +++ b/docs/overview/index.md @@ -1,3 +1,29 @@ -# Overview +# MvuviGo -Content will be added and verified here. +**MvuviGo is an emergency-response system for small-scale fishers on Lake Victoria.** A fisher in danger presses one button on a small device. The device sends an SOS with the fisher's identity and latest GPS location over long-range radio, without needing mobile coverage, to the landing site and to nearby participating fishers. A landing-site operator coordinates the rescue, nearby responders receive directions to the distressed boat, and the incident is recorded. + +## Primary purpose + +To shorten the gap between **a boat getting into trouble** and **someone nearby knowing where it is and acting**. + +## What it is for, and for whom + +| If you are a... | MvuviGo lets you... | +|---|---| +| Fisher in distress | Press one button to send an SOS with your latest available location | +| Nearby fisher | Be alerted, share your position and receive directions toward the distressed boat | +| Landing-site operator | See the emergency, nearby boats and distances; coordinate by phone; record the incident | + +## What it does not do + +MvuviGo supports **human-led** rescue. It does not forecast weather, steer boats, protect a person in the water, replace formal search and rescue, or provide its own calling service. See [System Boundaries](./scope-and-status.md#system-boundaries). + +## Where to start + +| If you want to... | Read | +|---|---| +| Understand the project in five minutes | [Overview](./index.md) | +| Understand the problem, users and use cases | [Product Definition](./product-definition.md) | +| See how the parts fit together | [System Overview](./system-overview.md) | +| Know what is built, planned or excluded | [Scope and Status](./scope-and-status.md) | +| Look up a term | [Glossary](./glossary.md) | diff --git a/docs/overview/key-features.md b/docs/overview/key-features.md index b4b5830..e3e3aa6 100644 --- a/docs/overview/key-features.md +++ b/docs/overview/key-features.md @@ -1,3 +1,58 @@ -# Key Features +# Product Definition -Content will be added and verified here. +## The problem + +Lake Victoria supports the livelihoods of many small-scale fishers who spend long hours on the water in small boats. Storms, strong winds, high waves and accidents can place them in danger quickly, often far from the landing site, and at night. + +When that happens, three things go wrong: + +1. **The fisher has no dependable way to call for help.** Many fishers do not have a reliable way to raise an alarm, and mobile coverage on the water cannot be assumed. +2. **Nobody nearby knows where the boat is.** Other fishers and the landing site may not learn that help is needed, or where. +3. **Response is slow and informal.** Rescue depends on fellow fishers noticing and having a boat and fuel available. Searches can take a long time, and little is recorded afterward. + +Other measures address parts of the problem but not this gap: + +| Measure | What it does | What it leaves open | +|---|---|---| +| Weather forecasts and alerts | Warn areas of dangerous conditions | Do not tell anyone a specific boat is in trouble | +| Life jackets and safety training | Reduce the risk of drowning | Do not summon help | +| Satellite emergency beacons | Alert distant national authorities | Costly, and do not alert nearby fishers | +| Government rescue centres | Coordinate formal rescue | Not yet within quick reach of every landing site | +| Informal community rescue | Uses fishers already on the water | Slow, with no way to locate the boat | + +## Purpose + +MvuviGo shortens the delay between **a boat getting into trouble** and **someone nearby knowing where it is and acting**. + +It does this by combining four capabilities: + +- a one-button **alarm** that works without mobile coverage; +- an immediate **alert** to the landing site and to the nearby fishers best placed to help; +- **guidance** that helps responders find the distressed boat as it and they move; +- **coordination and a record** managed by a person at the landing site. + +The product boundary is **emergency detection, local notification, response coordination and incident recording**. + +## Target users + +| User | Who they are | What they need from MvuviGo | Constraints that shape the design | +|---|---|---|---| +| **Fisher in distress** | A small-scale fisher who may be far from shore | Raise an alarm quickly, with a usable location, without a smartphone | Cannot rely on mobile coverage. Location is shared on SOS, not continuously | +| **Responding fisher** | A participating fisher on a nearby boat | Know that someone needs help, where they are, and how to reach them as positions change | Often has only a basic feature phone, so guidance arrives as simple messages | +| **Landing-site operator** | The person at the landing site who runs the station | One view of the emergency, who is nearby and how far away, and a way to record the outcome | Coordinates by phone. Needs to be available when boats are out | + +Others are affected but are not direct users: boat owners and landing-site organisations (who are likely to provide and support devices), fishers' families, and rescue agencies that may use incident information. + +## Main use cases + +| # | Use case | What happens | Outcome | +|---|---|---|---| +| 1 | **Raise an alarm** | A fisher in danger presses the SOS button. The device captures the latest available GPS location and sends the alert over radio | The landing site and nearby participating fishers know that help is needed and where | +| 2 | **Respond to an alarm** | A nearby fisher is alerted, their position is shared, and they receive directions to the distressed boat. Directions refresh every 30 seconds as boats move | The responder can decide whether and how to help and adjust their route | +| 3 | **Coordinate from shore** | The operator sees the distressed boat, nearby boats and distances on a dashboard, then contacts responders by normal phone call | Response is organised by a person with the full picture | +| 4 | **Record the incident** | The operator records the incident, responses, status and outcome | A record exists for follow-up and for improving safety | +| 5 | **Set up participation** | The operator registers a fisher and pairs a device to them | Alerts are tied to the right person | + +## Core functionality in one paragraph + +A fisher carries a device. Pressing its button sends an SOS with the fisher's identity and latest location by long-range radio to the landing station and nearby participating devices. Nearby boats share their positions. The landing-site dashboard shows the distressed boat, nearby boats and distances, and AI-generated directions are sent to responders' feature phones, refreshed as positions change. The operator coordinates the response and records the outcome. See [System Overview](system-overview.md) for how this works step by step. diff --git a/docs/overview/product-definition.md b/docs/overview/product-definition.md index ae9f033..555c535 100644 --- a/docs/overview/product-definition.md +++ b/docs/overview/product-definition.md @@ -1,3 +1,58 @@ # Product Definition -Content will be added and verified here. +## The problem + +Lake Victoria supports the livelihoods of many small-scale fishers who spend long hours on the water in small boats. Storms, strong winds, high waves and accidents can place them in danger quickly, often far from the landing site, and at night. + +When that happens, three things go wrong: + +1. **The fisher has no dependable way to call for help.** Many fishers do not have a reliable way to raise an alarm, and mobile coverage on the water cannot be assumed. +2. **Nobody nearby knows where the boat is.** Other fishers and the landing site may not learn that help is needed, or where. +3. **Response is slow and informal.** Rescue depends on fellow fishers noticing and having a boat and fuel available. Searches can take a long time, and little is recorded afterward. + +Other measures address parts of the problem but not this gap: + +| Measure | What it does | What it leaves open | +|---|---|---| +| Weather forecasts and alerts | Warn areas of dangerous conditions | Do not tell anyone a specific boat is in trouble | +| Life jackets and safety training | Reduce the risk of drowning | Do not summon help | +| Satellite emergency beacons | Alert distant national authorities | Costly, and do not alert nearby fishers | +| Government rescue centres | Coordinate formal rescue | Not yet within quick reach of every landing site | +| Informal community rescue | Uses fishers already on the water | Slow, with no way to locate the boat | + +## Purpose + +MvuviGo shortens the delay between **a boat getting into trouble** and **someone nearby knowing where it is and acting**. + +It does this by combining four capabilities: + +- a one-button **alarm** that works without mobile coverage; +- an immediate **alert** to the landing site and to the nearby fishers best placed to help; +- **guidance** that helps responders find the distressed boat as it and they move; +- **coordination and a record** managed by a person at the landing site. + +The product boundary is **emergency detection, local notification, response coordination and incident recording**. + +## Target users + +| User | Who they are | What they need from MvuviGo | Constraints that shape the design | +|---|---|---|---| +| **Fisher in distress** | A small-scale fisher who may be far from shore | Raise an alarm quickly, with a usable location, without a smartphone | Cannot rely on mobile coverage. Location is shared on SOS, not continuously | +| **Responding fisher** | A participating fisher on a nearby boat | Know that someone needs help, where they are, and how to reach them as positions change | Often has only a basic feature phone, so guidance arrives as simple messages | +| **Landing-site operator** | The person at the landing site who runs the station | One view of the emergency, who is nearby and how far away, and a way to record the outcome | Coordinates by phone. Needs to be available when boats are out | + +Others are affected but are not direct users: boat owners and landing-site organisations (who are likely to provide and support devices), fishers' families, and rescue agencies that may use incident information. + +## Main use cases + +| # | Use case | What happens | Outcome | +|---|---|---|---| +| 1 | **Raise an alarm** | A fisher in danger presses the SOS button. The device captures the latest available GPS location and sends the alert over radio | The landing site and nearby participating fishers know that help is needed and where | +| 2 | **Respond to an alarm** | A nearby fisher is alerted, their position is shared, and they receive directions to the distressed boat. Directions refresh every 30 seconds as boats move | The responder can decide whether and how to help and adjust their route | +| 3 | **Coordinate from shore** | The operator sees the distressed boat, nearby boats and distances on a dashboard, then contacts responders by normal phone call | Response is organised by a person with the full picture | +| 4 | **Record the incident** | The operator records the incident, responses, status and outcome | A record exists for follow-up and for improving safety | +| 5 | **Set up participation** | The operator registers a fisher and pairs a device to them | Alerts are tied to the right person | + +## Core functionality in one paragraph + +A fisher carries a device. Pressing its button sends an SOS with the fisher's identity and latest location by long-range radio to the landing station and nearby participating devices. Nearby boats share their positions. The landing-site dashboard shows the distressed boat, nearby boats and distances, and AI-generated directions are sent to responders' feature phones, refreshed as positions change. The operator coordinates the response and records the outcome. See [System Overview](system-overview.md) for how this works step by step. \ No newline at end of file diff --git a/docs/overview/scope-and-status.md b/docs/overview/scope-and-status.md index 068d426..5e15561 100644 --- a/docs/overview/scope-and-status.md +++ b/docs/overview/scope-and-status.md @@ -1,3 +1,42 @@ # Scope and Status -Content will be added and verified here. +This page states what MvuviGo includes, what it deliberately excludes, what it relies on, and where it is limited. Read it before relying on any claim elsewhere in the documentation. + +## Status labels + +| Label | Meaning | +|---|---| +| **MVP** | Part of the current MVP design | +| **Planned** | Intended for a later version. **Not** part of the MVP | +| **Excluded** | Deliberately outside the product | +| **Unverified** | An assumption or benefit not yet demonstrated | + + +## What is in the MVP + +| Capability | Status | +|---|---| +| Fisher registration and device pairing, with RFID identification | MVP | +| SOS button with GPS location capture | MVP | +| Long-range radio transmission to the landing station | MVP | +| Alerts to nearby participating fishers, with their location sharing | MVP | +| Emergency dashboard with boat locations and distances | MVP | +| AI-generated responder directions | MVP | +| Direction delivery by feature-phone message, refreshed every 30 seconds | MVP | +| Operator coordination by phone and incident recording | MVP | + + +## System boundaries + +MvuviGo does **not**: + +| It does not... | Because... | +|---|---| +| Forecast weather or issue weather warnings | The MVP focuses on emergencies and response, not prediction | +| Steer or control boats | Rescue decisions stay with the people on the water | +| Dispatch rescue teams or make final decisions | The AI guides; people decide | +| Provide its own voice-calling service | Operators use the normal phone network | +| Keep a person afloat or prevent drowning | It signals and guides; it is not safety equipment | +| Track boats continuously | Location is shared on SOS, to protect fishers' privacy | +| Replace formal search and rescue | It is a local first-response layer that complements formal services | + diff --git a/docs/overview/system-overview.md b/docs/overview/system-overview.md index 8f2a186..a30a5d2 100644 --- a/docs/overview/system-overview.md +++ b/docs/overview/system-overview.md @@ -1,3 +1,94 @@ # System Overview -Content will be added and verified here. +This page explains how MvuviGo works at the level of components and flow. It does not describe code or deployment. + +## Components + +| Component | Where it is | What it does | +|---|---|---| +| **Fisher device** | On the boat | Captures GPS location, sends the SOS by radio, receives alerts, and identifies the fisher | +| **Landing station** | At the landing site | Receives radio transmissions from devices and passes them on | +| **Backend and database** | Hosted online | Stores fisher, device, emergency and incident information; calculates the distance of each boat from the distressed boat; generates the automated direction messages | +| **Dashboard** | On the operator's screen | Shows the emergency, boat locations and distances | +| **Feature-phone messaging** | Phone network | Delivers direction messages to responders without needing a smartphone | + +## Emergency flow + +Setup happens once, in advance. The other four phases run during an emergency. + + + +
+
+
SetupOperator · before fishing
+
Registers the fisher and pairs a unique device
+
RFID links the fisher to the device
+
+
+
AlarmFisher in distress · on the water
+
Presses the SOS button
+
Device captures the latest available GPS location
+
Alert is sent by long-range radio, with no mobile coverage needed
+
+
+
AlertLanding station and nearby boats
+
Landing station receives the alert
+
Nearby participating boats are alerted at the same time
+
Nearby boats share their current locations
+
+
+
GuideBackend · automated
+
Calculates each boat's distance from the distressed boat
+
Generates a direction message for each responder
+
Sends the messages to responders' feature phones
+
Repeats every 30 seconds with the latest locations, so directions follow the boats as they move.
+
+
+
CoordinateOperator · landing site
+
Dashboard shows the distressed boat, nearby boats and distances
+
Coordinates responders by normal phone call
+
Records the incident, responses and outcome
+
+
Guide and Coordinate run at the same time: the backend keeps sending directions while the operator coordinates and records the incident.
+
+ + +1. The operator registers the fisher and pairs a device in advance. +2. The fisher presses SOS. The device captures the latest available location. +3. The alert travels over long-range radio to the landing station and nearby participating boats. +4. Nearby boats share their current locations. +5. The backend calculates each responding boat's distance from the distressed boat. +6. The dashboard shows the distressed boat, nearby boats and distances. +7. The backend automatically sends direction messages to responders' feature phones, and refreshes them every 30 seconds as boats move. +8. The operator monitors the emergency and coordinates by normal phone call. +9. The operator records the incident, responses and outcome. + + +## When something fails + +The system is designed so that failures are visible and a person can always take over. + +| If this fails | What should happen | +|---|---| +| GPS cannot give a usable location | The system says so. An old or invalid location is never shown as current | +| A responder's location is missing or out of date | The system says so and does not treat it as current | +| Automated direction messages stop | The operator continues using the locations and distances on the dashboard | +| Message delivery fails | The operator coordinates responders by normal phone call | +| The dashboard is unavailable | Phone calls remain available for coordination | +| The landing site loses internet | The radio alert may still arrive, but dashboard updates and direction messages may be delayed or unavailable. The loss is flagged | + +## System boundary + +**Inside MvuviGo:** the fisher device, landing station, backend and database (including distance calculation and automated direction messages), dashboard, feature-phone messaging and the incident record. + +**Outside MvuviGo:** weather forecasting, life-saving equipment, formal search and rescue, boat control, and the voice calls themselves, which use the ordinary phone network. See [Scope and Status](scope-and-status.md#system-boundaries) for what the system deliberately does not do. \ No newline at end of file diff --git a/docs/overview/technology-stack.md b/docs/overview/technology-stack.md index 24cfaa3..25d3353 100644 --- a/docs/overview/technology-stack.md +++ b/docs/overview/technology-stack.md @@ -1,3 +1,17 @@ # Technology Stack -Content will be added and verified here. +| Component | Technology | Purpose | Verification | +|---|---|---|---| +| Frontend | Next.js, JavaScript/JSX, CSS | Web dashboard | Check `package.json` and lockfile | +| Backend | FastAPI, Python | HTTP API and server-side processing | Check Python project metadata | +| Validation | Pydantic | Request/response schemas | Check installed version and schemas | +| ORM | SQLAlchemy | Database mapping and queries | Check model and session setup | +| Database | PostgreSQL | Persistent records | Confirm environment topology | +| Testing | pytest | Backend tests | Inspect configured test commands | +| Linting | Ruff | Python linting/formatting | Inspect `pyproject.toml` | +| Environment | uv | Python dependencies/environment | Inspect lockfile and README | +| SMS | sms Leopard | Outbound SMS integration | Confirm SDK/API version | +| Station controller | ESP32 | Intended device control | Confirm exact board/firmware | +| Identification | RFID | Intended station identification | Confirm reader/tag type | +| Radio | LoRa | Intended field communication | Confirm frequency and protocol | +