Skip to main content

Construction Backend API

Build powerful construction management applications with our REST API for quotations, user authentication, and project management

Quick Start

Get up and running with the Construction Backend API in minutes

1

Set up your environment

Clone the repository and install dependencies:
git clone https://github.com/GabrielsantiagoRamirez/construction-backend.git
cd construction-backend
npm install
2

Configure MongoDB connection

Create a .env file in the root directory:
MONGO_URI=your_mongodb_connection_string
PORT=3000
The API uses MongoDB Atlas for data storage. Make sure you have a MongoDB Atlas cluster ready.
3

Start the server

Run the development server:
npm run dev
The API will be available at http://localhost:3000
4

Make your first API call

Register a new user:
cURL
curl -X POST http://localhost:3000/api/user/register \
  -H "Content-Type: application/json" \
  -d '{
    "document": "123456789",
    "email": "[email protected]",
    "password": "securePassword123",
    "name": "John",
    "last_name": "Doe",
    "cellphone": "+1234567890",
    "user_type": "admin"
  }'
{
  "message": "Usuario registrado correctamente",
  "user": {
    "_id": "507f1f77bcf86cd799439011",
    "document": "123456789",
    "email": "[email protected]",
    "name": "John",
    "last_name": "Doe",
    "cellphone": "+1234567890",
    "user_type": "admin"
  }
}

Core Features

Everything you need to build construction management applications

User Authentication

Secure user registration and login with bcrypt password hashing and MongoDB storage

Quotation Management

Create and manage detailed construction quotations with nested sections and line items

MongoDB Integration

Seamless MongoDB Atlas integration with Mongoose ODM and pagination support

RESTful API

Clean, well-structured REST API endpoints built with Express.js

Explore by Topic

Dive deeper into specific areas of the API

Authentication

Learn about user registration, login, and password security

Quotations

Manage construction quotations with detailed pricing and sections

Database Setup

Configure MongoDB Atlas and understand the data models

Deployment

Deploy your API to Vercel or other hosting platforms

Error Handling

Handle API errors gracefully with proper status codes

API Reference

Complete reference for all endpoints and data models

Ready to Build?

Start building your construction management application today with our comprehensive API documentation

Get Started Now

Build docs developers (and LLMs) love