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.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.
Two-app monorepo
| Layer | Technology | Port / URL |
|---|---|---|
| Frontend UI | Next.js 16, Tailwind CSS v4, Zustand | http://localhost:3000 |
| Backend API | Next.js 16 (API routes only), Prisma ORM | http://localhost:8000 |
| Database | SQLite (development) | File on disk via DATABASE_URL |
| Auth | JWT (access + refresh tokens), bcryptjs | Issued by Backend |
| Maps | MapLibre GL, OpenFreeMap | Browser-side |
| QR codes | qrcode.react, html5-qrcode | Browser-side |
| PDF generation | jsPDF, PDFKit | Backend-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.
API route structure
All endpoints are grouped under/api/v1/ in the Backend:
| Prefix | Responsibility |
|---|---|
/api/v1/auth | Registration, login, token refresh, logout |
/api/v1/users | User management and role assignment |
/api/v1/appointments | Booking, status updates, cancellation |
/api/v1/prescriptions | Digital QR prescriptions, fulfilment |
/api/v1/clinics | Clinic directory and doctor listings |
/api/v1/pharmacies | Pharmacy directory and inventory |
/api/v1/medicines | Medicine catalogue |
/api/v1/sales | Point-of-sale and purchase records |
/api/v1/delivery-orders | Delivery dispatch and driver tracking |
/api/v1/chats | In-app messaging sessions |
/api/v1/reviews | Ratings for doctors, medicines, pharmacies |
/api/v1/admin | Global audit, user control, platform stats |
/api/v1/routes | Delivery route waypoints |
/api/v1/public | Unauthenticated read-only endpoints |
Prisma schema key models
The database schema is defined inBackend/prisma/schema.prisma. The core models are:
| Model | Purpose |
|---|---|
User | Single users table with a role field that drives access control |
PatientProfile | Extended health data: blood type, allergies, medical notes |
DoctorProfile | Specialty, license number, and clinic association |
PharmacyManagerProfile | Ties a user to a specific pharmacy |
DeliveryDriverProfile | Vehicle info and real-time GPS coordinates |
ReceptionistProfile | Clinic association for front-desk users |
Clinic | Hospital or clinic with geolocation |
Pharmacy | Pharmacy location, delivery fee, and inventory |
Medicine | Drug catalogue with prescription requirement flag |
Inventory | Per-pharmacy stock levels, unit price, and expiry |
InventoryMovement | Kardex-style ledger of stock changes |
Appointment | Scheduled consultations linking patient, doctor, and clinic |
Prescription | Digital prescriptions with unique QR code |
PrescriptionLine | Individual medicine lines within a prescription |
Sale | Purchase records for both in-pharmacy and delivery orders |
SaleItem | Individual medicine lines within a sale |
DeliveryOrder | Fulfillment record with pickup/drop coordinates and driver |
DeliveryRoute | GPS waypoints recorded during delivery |
ChatSession | Messaging thread between two or more users |
ChatParticipant | Users joined to a chat session |
ChatMessage | Individual messages within a session |
Review | Star ratings for doctors, medicines, and pharmacies |
AuditLog | Immutable log of every critical platform action |
RefreshToken | Stored 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.