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.

Oasis Liquido is structured as a monorepo containing two independent Next.js applications. The Backend app acts purely as an API server — it exposes a versioned REST API and manages all database access through Prisma. The Frontend app is a user-facing client that calls the Backend over HTTP. Keeping the two apps separate means they can be deployed, scaled, and updated independently.

Two-app monorepo

LayerTechnologyPort / URL
Frontend UINext.js 16, Tailwind CSS v4, Zustandhttp://localhost:3000
Backend APINext.js 16 (API routes only), Prisma ORMhttp://localhost:8000
DatabaseSQLite (development)File on disk via DATABASE_URL
AuthJWT (access + refresh tokens), bcryptjsIssued by Backend
MapsMapLibre GL, OpenFreeMapBrowser-side
QR codesqrcode.react, html5-qrcodeBrowser-side
PDF generationjsPDF, PDFKitBackend-side

Data flow

Every user action in the Frontend results in an HTTP request to the Backend’s REST API at /api/v1/.... The Backend validates the JWT token present in the Authorization header, runs business logic, queries SQLite through Prisma, and returns JSON. The Frontend never connects to the database directly.
Browser (port 3000)
  └─▶ GET /api/v1/appointments   ─▶  Backend (port 8000)
                                          └─▶  Prisma
                                                 └─▶  SQLite

API route structure

All endpoints are grouped under /api/v1/ in the Backend:
PrefixResponsibility
/api/v1/authRegistration, login, token refresh, logout
/api/v1/usersUser management and role assignment
/api/v1/appointmentsBooking, status updates, cancellation
/api/v1/prescriptionsDigital QR prescriptions, fulfilment
/api/v1/clinicsClinic directory and doctor listings
/api/v1/pharmaciesPharmacy directory and inventory
/api/v1/medicinesMedicine catalogue
/api/v1/salesPoint-of-sale and purchase records
/api/v1/delivery-ordersDelivery dispatch and driver tracking
/api/v1/chatsIn-app messaging sessions
/api/v1/reviewsRatings for doctors, medicines, pharmacies
/api/v1/adminGlobal audit, user control, platform stats
/api/v1/routesDelivery route waypoints
/api/v1/publicUnauthenticated read-only endpoints

Prisma schema key models

The database schema is defined in Backend/prisma/schema.prisma. The core models are:
ModelPurpose
UserSingle users table with a role field that drives access control
PatientProfileExtended health data: blood type, allergies, medical notes
DoctorProfileSpecialty, license number, and clinic association
PharmacyManagerProfileTies a user to a specific pharmacy
DeliveryDriverProfileVehicle info and real-time GPS coordinates
ReceptionistProfileClinic association for front-desk users
ClinicHospital or clinic with geolocation
PharmacyPharmacy location, delivery fee, and inventory
MedicineDrug catalogue with prescription requirement flag
InventoryPer-pharmacy stock levels, unit price, and expiry
InventoryMovementKardex-style ledger of stock changes
AppointmentScheduled consultations linking patient, doctor, and clinic
PrescriptionDigital prescriptions with unique QR code
PrescriptionLineIndividual medicine lines within a prescription
SalePurchase records for both in-pharmacy and delivery orders
SaleItemIndividual medicine lines within a sale
DeliveryOrderFulfillment record with pickup/drop coordinates and driver
DeliveryRouteGPS waypoints recorded during delivery
ChatSessionMessaging thread between two or more users
ChatParticipantUsers joined to a chat session
ChatMessageIndividual messages within a session
ReviewStar ratings for doctors, medicines, and pharmacies
AuditLogImmutable log of every critical platform action
RefreshTokenStored hashed refresh tokens for secure session renewal

Explore further

Authentication

How JWT tokens are issued, refreshed, and validated across both apps.

Database guide

Prisma migrations, seeding the Nicaragua dataset, and working with SQLite.

Build docs developers (and LLMs) love