Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/FlasheyEstudi/Oasis-Liquido/llms.txt

Use this file to discover all available pages before exploring further.

The Aura Pharmacy Map is Oasis Liquido’s built-in geographic locator for pharmacies across Nicaragua. Powered by MapLibre GL and OpenFreeMap tile data, it renders an interactive map centred on the patient’s current position and overlays nearby pharmacy locations with live inventory counts. Instead of calling ahead or walking to a pharmacy that is out of stock, patients can see which outlets carry their medicines before they leave home.

How the map works

Aura Map requests the patient’s device location (latitude and longitude) and passes those coordinates to the pharmacy search endpoint. The API returns a ranked list of pharmacies sorted by distance_in_meters, each carrying its current inventory snapshot. The frontend renders each result as a pin on the MapLibre GL canvas using OpenFreeMap’s Nicaragua geography tiles.
1

Grant location access

The browser or mobile app prompts for permission to read the device’s GPS position. The map centres on your coordinates immediately.
2

Nearby pharmacies load

The app calls GET /api/v1/pharmacies with your latitude and longitude. The backend computes the distance to every active pharmacy and returns results closest-first.
3

Check live inventory

Tap any pharmacy pin to open its detail panel. The available_medicines array shows each stocked medicine with its current stock count and price.
4

Navigate or order

From the detail panel you can open the pharmacy address in your maps app, call the pharmacy directly, or start a delivery order from that location.

Pharmacy interface

The Pharmacy object returned by the API includes both location data and the live inventory snapshot.
export interface Pharmacy {
  id: string;
  name: string;               // e.g. "Farmacia Saba Altamira"
  address: string;            // Street address in Nicaragua
  latitude: number;           // WGS 84 decimal degrees
  longitude: number;          // WGS 84 decimal degrees
  phone?: string;             // Contact number for the pharmacy
  is_active: boolean;         // Only active pharmacies appear on the map
  created_at: string;
  updated_at: string;
  distance_in_meters?: number;          // Computed from your position; present when lat/lng is passed
  available_medicines?: AvailableMedicine[]; // Live inventory snapshot
}

Medicine availability

Each entry in available_medicines describes one medicine stocked at that pharmacy.
export interface AvailableMedicine {
  medicine_id: string; // UUID — cross-reference with the medicines catalogue
  stock: number;       // Current units in inventory
  price: number;       // Unit price in Nicaraguan córdobas (NIO)
}
available_medicines is populated only when the client passes a medicine_id query parameter or requests a single pharmacy’s detail view. A list query without a medicine filter omits the field to keep responses compact.

Supported pharmacy chains

The platform seed data includes locations from the three major pharmacy chains operating across Nicaragua:
ChainCoverage
SabaManagua metro and major northern cities
KielsaNational coverage including RAAN and RAAS regions
MedcoManagua and Occidente region
The seed script (npm run seed in the Backend directory) populates realistic inventory levels for all three chains. Use these demo locations when testing pharmacy search and delivery order flows locally.

Proximity search query parameters

Send a GET request to /api/v1/pharmacies. Pass coordinates to activate distance sorting and filtering.
Query parameterTypeDescription
latitudenumberYour current latitude (WGS 84)
longitudenumberYour current longitude (WGS 84)
radius_metersnumberSearch radius from your position (optional)
medicine_idstringReturn only pharmacies that stock this medicine
pagenumberPage number (default: 1)
limitnumberResults per page (default: 20)
Example: find pharmacies within 3 km stocking a specific medicine
GET /api/v1/pharmacies?latitude=12.1328&longitude=-86.2504&radius_meters=3000&medicine_id=clx2j4k0e0002abcdmnop

Map technology

ComponentTechnology
Rendering engineMapLibre GL JS
Map tilesOpenFreeMap (free, open-source Nicaragua tiles)
Coordinate systemWGS 84 (EPSG:4326) decimal degrees
Distance calculationHaversine formula on the backend

Pharmacies API

Full endpoint reference for pharmacy search, inventory, and management

Oasis Express delivery

Order medicines for home delivery directly from any pharmacy on the map

Build docs developers (and LLMs) love