Documentation Index
Fetch the complete documentation index at: https://mintlify.com/4rt21/backend-proyecto/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before setting up the project, make sure you have the following installed:- Node.js (v18 or higher recommended)
- npm (comes with Node.js)
- MySQL (8.0 or higher recommended)
- A code editor like VS Code
- Git installed
Installation
Install dependencies
Install all required npm packages:
Key Dependencies
| Package | Purpose |
|---|---|
@nestjs/core | NestJS framework core |
class-validator | Validates data in requests |
mysql2 | Connects to the MySQL database |
@nestjs/jwt | JWT authentication |
@nestjs/swagger | API documentation |
@nestjs/websockets | WebSocket support |
@aws-sdk/client-s3 | AWS S3 file uploads |
Set up the database
Import the database schema using the provided backup file:This will create all necessary tables including users, reports, categories, notifications, and more.
Configure environment variables
Create a Add the following environment variables:
.env file in the root directory:Replace
<your_user> and <your_password> with your actual MySQL credentials.Start the server
Run the development server:Or for production:The server will start on
http://localhost:3000 by default.Available Scripts
The project includes several npm scripts for development:Project Structure
Verification
To verify your setup is working correctly:- Check the server logs for any errors
- Visit
http://localhost:3000/docsto see the Swagger documentation - Test a simple endpoint like
GET /docsto ensure the API is responding