Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Bran258/api_centro_medico/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, ensure you have the following installed:- Node.js (v14 or higher)
- npm or yarn
- PostgreSQL database
- Supabase account (for authentication)
Installation
Install Dependencies
Install the required Node.js packages:This will install:
- Express.js (v5.2.1)
- Prisma Client (v5.22.0)
- Supabase JS (v2.87.1)
- JSON Web Token (v9.0.3)
- And other dependencies
Configure Environment Variables
Create a
.env file in the project root with the following variables:.env
Get your Supabase credentials from your Supabase project dashboard under Settings > API
Run Database Migrations
Generate the Prisma Client and run migrations:This will create the following tables:
personas- Internal staffusuarios- Authenticated usersclientes_publicos- Public patientsespecialidades- Medical specialtiesmedicos- Doctorscitas- Appointmentshistorial- Medical historycontacto- Contact messages
Your First API Request
Now that your server is running, let’s make your first API request!List All Specialties (Public Endpoint)
This endpoint doesn’t require authentication and returns all available medical specialties:Create an Appointment (Public Endpoint)
Patients can request appointments without authentication:The appointment is created with
estado: "pendiente" status. An admin or assistant must confirm it and assign a doctor.List Public Doctors
View all active doctors available for appointments:Database Schema
Here’s a quick overview of the Prisma schema:View Database Schema
View Database Schema
Next Steps
Authentication
Learn how to authenticate admin and assistant users
API Reference
Explore all available endpoints