Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/nelrondon/backend-proyecto-estructuras/llms.txt

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

The Estructuras Backend API is a RESTful service that powers real estate property listing platforms. It provides endpoints for user authentication and full property management — allowing clients to list, filter, create, and manage properties by type and availability status.

Quickstart

Get the server running and make your first API call in minutes

Configuration

Set up environment variables, database, and CORS origins

Authentication

Learn how JWT cookies work and how to authenticate requests

API Reference

Explore every endpoint with request/response details

What’s in the API

The API exposes two main resource groups — users (auth) and properties — mounted under the /api base path.

User Auth

Register, login, logout, and verify JWT tokens via HTTP-only cookies

Property Listings

Create and query properties with type and status filters

Validation

All inputs are validated with Zod schemas before hitting the database

Getting Started

1

Clone and install dependencies

Clone the repository and install packages with pnpm.
git clone https://github.com/nelrondon/backend-proyecto-estructuras.git
cd backend-proyecto-estructuras
pnpm install
2

Configure environment variables

Create a .env file at the project root with your Turso database credentials and JWT secret.
.env
PORT=3000
SECRET_KEY=your_jwt_secret_here
DB_TOKEN=your_turso_auth_token_here
SALT_ROUNDS=10
3

Start the server

Run the development server with file-watching enabled.
pnpm start
The server starts at http://localhost:3000.
4

Make your first request

Register a user and start working with the API.
curl -X POST http://localhost:3000/api/register \
  -H "Content-Type: application/json" \
  -d '{"name":"Jane Doe","email":"jane@example.com","phone":"555-123-4567","username":"janedoe","password":"secret123"}'
The API uses HTTP-only cookies for token storage. Make sure your HTTP client is configured to send and receive cookies (e.g., curl -c cookies.txt -b cookies.txt or credentials: 'include' in fetch).

Build docs developers (and LLMs) love