diff --git a/README.md b/README.md index f94e616..52bf79a 100644 --- a/README.md +++ b/README.md @@ -2009,7 +2009,7 @@ Members create fundraisers tied to a specific trip destination. Each fundraiser - **Profit Calculator** — Enter item cost, set a selling price via slider or manual input (minimum = cost, maximum = 10x cost), and instantly see profit per unit, margin %, and how many units are needed to reach the goal. - **"What If" Simulator** — A units-sold slider lets members preview partial progress: "If I sell 15 units, I'll earn $X and be Y% toward my goal." - **Solicitation Map** — A Leaflet + leaflet-draw map where members draw polygon zones for where they plan to sell, with recommendation pins for high-traffic areas powered by the Overpass API. -- **Area Recommendations** — The backend queries OpenStreetMap for nearby POIs (shops, schools, parks, transit stops) and scores them by density and accessibility. +- **Area Recommendations** — The backend queries the Overpass API for nearby amenities (schools, community centres, markets, parks, libraries, sports centres, cafes, and restaurants) and ranks each pin by a fixed weight for that amenity. If Overpass is unavailable, it returns fallback pins. ### Fundraiser Types @@ -2026,13 +2026,13 @@ A 4-step dialog guides members through fundraiser creation: 1. **Type** — Select fundraiser type; displays the trip cost as the fundraising goal. 2. **Items** — Enter item name and cost (in dollars), use the profit calculator to set a selling price, and save items. The calculator shows units-to-goal and a simulation slider. -3. **Zones** — Draw solicitation areas on the map; view AI-suggested high-traffic locations. +3. **Zones** — Draw solicitation areas on the map and view the ranked amenity pins. 4. **Review** — Summary of items, profit projections, goal coverage, and zone count before submission. ### Access Points - **Destination Cards** — A storefront icon button on each destination card header opens the create-fundraiser dialog pre-filled with that destination's country and trip cost. -- **Profile Menu** — "Fundraisers" menu item under Info Vault navigates to `/fundraisers`. +- **Account Menu** — "Fundraisers" sits next to Info Vault and navigates to `/fundraisers`. - **Fundraiser Dashboard** (`/fundraisers`) — Lists all fundraisers with quick stats (total raised, active count, average margin), status filter chips, and progress bars. Click a card to view full detail. ### Fundraiser Lifecycle @@ -2051,7 +2051,7 @@ The fundraiser feature follows the existing MediatR CQRS pattern: **Commands:** `CreateFundraiser`, `UpdateFundraiser`, `RecordSale`, `DeleteFundraiser` **Queries:** `GetFundraisers`, `GetFundraiserById`, `GetAreaSuggestions` -**Validators:** FluentValidation for all commands (country must be alpha-3, selling price >= cost, etc.) +**Validators:** FluentValidation for all commands (destination is an ISO country or region code such as `USA`, `COL`, or `US-UT`; selling price >= cost, etc.) The `IFundraiserAreaService` interface abstracts the Overpass API integration for area recommendations, with fallback suggestions when the external API is unavailable. @@ -2066,8 +2066,9 @@ The `IFundraiserAreaService` interface abstracts the Overpass API integration fo | `PUT` | `/api/fundraiser/{id}/record-sale` | Record item sales | | `DELETE` | `/api/fundraiser/{id}` | Cancel/soft-delete fundraiser | | `GET` | `/api/fundraiser/area-suggestions` | Get area recommendations (`lat`, `lng`, `radiusKm`) | +| `GET` | `/api/fundraiser/receipt/{token}` | Public sale receipt (`AllowAnonymous`) | -All endpoints require authentication. +Every endpoint except the receipt requires authentication. The receipt page is `/fundraisers/receipt/:token`. ### Data Model @@ -2083,12 +2084,12 @@ The `Fundraiser` entity stores in the `fundraisers` MongoDB collection with nest | **Validators** | `SpikerSoft.Business/Domain/Fundraiser/Validators/` | | **Controller** | `SpikerSoft.Api/Domain/Fundraiser/FundraiserController.cs` | | **Area Service** | `SpikerSoft.Api/Domain/Fundraiser/FundraiserAreaService.cs` | -| **Frontend Models** | `_models/fundraiser.model.ts` | -| **Frontend Service** | `_services/fundraiser/fundraiser.service.ts` | -| **Profit Calculator** | `_components/fundraiser/profit-calculator/` | -| **Solicitation Map** | `_components/fundraiser/solicitation-map/` | -| **Create Dialog** | `_components/fundraiser/create-fundraiser-dialog/` | -| **Dashboard** | `_components/fundraiser/fundraiser-dashboard/` | +| **Frontend Models** | `libraries/domain/fundraiser/src/lib/fundraiser.model.ts` | +| **Frontend Service** | `libraries/domain/fundraiser/src/lib/fundraiser.service.ts` | +| **Profit Calculator** | `libraries/features/fundraiser/src/lib/components/profit-calculator/` | +| **Solicitation Map** | `libraries/features/fundraiser/src/lib/components/solicitation-map/` | +| **Create Dialog** | `libraries/features/fundraiser/src/lib/components/create-fundraiser-dialog/` | +| **Dashboard** | `libraries/features/fundraiser/src/lib/components/fundraiser-dashboard/` | ---