Skip to main content

Sistema de Productos Documentation

Build powerful product management systems with our RESTful API. Built with Express, PostgreSQL, and Vue.js for modern web applications.

// Quick API Example
POST
/api-productos/productos
”nombre”: “Product Name”,
“precio”: 99.99,
“stock”: 100

Quick Start

Get up and running in minutes

1

Clone the repository

Clone the project to your local machine and install dependencies.
git clone https://github.com/Luizzz1114/ejercicio-productos-nodejs.git
cd ejercicio-productos-nodejs
npm install
2

Configure the database

Set up PostgreSQL and create the database schema.
# Create database
createdb ejercicio_productos

# Run the schema
psql ejercicio_productos < server/config/bd.sql
Make sure PostgreSQL is installed and running on your system.
3

Set environment variables

Create a .env file with your configuration.
PORT=3000
PG_USER=postgres
PG_HOST=localhost
PG_DATABASE=ejercicio_productos
PG_PASSWORD=your_password
PG_PORT=5432
JWT_SECRET=your_jwt_secret
4

Start the application

Run both the backend and frontend in development mode.
npm run dev
The API will be available at http://localhost:3000 and the frontend at http://localhost:5173.

Core Features

Everything you need to build a product management system

JWT Authentication

Secure authentication with HTTP-only cookies and JWT tokens for session management.

Role-Based Access Control

Granular permissions with administrator and user roles to control access to resources.

RESTful API

Complete CRUD operations for products, categories, and users with standardized endpoints.

PostgreSQL Database

Robust data persistence with views, triggers, and optimized queries for performance.

Vue.js Frontend

Modern reactive UI built with Vue 3, Pinia state management, and Tailwind CSS.

Password Recovery

Email-based password recovery system for enhanced user account security.

Ready to get started?

Follow our quickstart guide to build your first product management endpoint in minutes.

Build docs developers (and LLMs) love