Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/despacho-backend/llms.txt

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

Despacho Backend is the server-side foundation for a law firm management system. It exposes a JSON REST API that handles lawyer account management, JWT-based authentication, and a full reservation workflow — from client booking requests to lawyer acceptance and scheduling.

Introduction

Learn what Despacho Backend does and how it is structured

Quickstart

Run the server locally and make your first API call in minutes

API Reference

Full endpoint documentation with request/response schemas

Configuration

Environment variables and server configuration options

What you can build

Despacho Backend provides the backend infrastructure for a legal services scheduling system. Integrate it with any frontend or mobile client to:

Manage Lawyer Accounts

Register and authenticate lawyer users with role-based access

Accept Client Bookings

Receive reservation requests and confirm appointments

List and Filter Reservations

Query accepted, pending, or all reservations with pagination

Understand the Data Models

Explore the Mongoose schemas powering the API

Quick overview

1

Clone and install

Clone the repository and install Node.js dependencies with npm install.
2

Configure environment

Set PORT, SECRET, and MONGODB_URL in a .env file at the project root.
3

Start the server

Run npm run dev to start the development server with hot-reload via nodemon.
4

Make your first request

Register a lawyer user via POST /api/lawyer/user/create, log in to receive a JWT, then manage reservations using authenticated endpoints.
All protected endpoints require a valid JWT passed as Authorization: Bearer <token> in the request headers. Obtain a token via the login endpoint.

Build docs developers (and LLMs) love