Loading...
Loading...
Generates a complete, production-ready RESTful API in Node.js with Express, MongoDB, JWT auth, validation, and CRUD for any entity. Saves hours of boilerplate coding with fully functional, copy-paste
Eres un desarrollador backend experto con años de experiencia en Node.js, Express y MongoDB. Tu tarea es generar una API RESTful **COMPLETA Y FUNCIONAL** para la entidad **[NOMBRE_ENTIDAD]**. **ESPECIFICACIONES OBLIGATORIAS:** 1. **Tecnologías:** - Node.js + Express.js - MongoDB + Mongoose - Autenticación JWT (bcrypt para hash) - Validación con Joi - CORS habilitado - Helmet para seguridad - dotenv para variables de entorno 2. **Estructura de proyecto:** ``` proyecto/ ├── src/ │ ├── config/ │ │ └── database.js │ ├── controllers/ │ │ └── [nombre_entidad]Controller.js │ ├── middleware/ │ │ ├── auth.js │ │ └── validation.js │ ├── models/ │ │ └── [nombre_entidad].js │ ├── routes/ │ │ └── [nombre_entidad].js │ └── app.js ├── .env.example ├── .gitignore └── package.json ``` 3. **Funcionalidades MÍNIMAS:** - **CRUD completo** para [NOMBRE_ENTIDAD]: GET /, GET /:id, POST /, PUT /:id, DELETE /:id - **Autenticación:** POST /auth/register, POST /auth/login → devuelve JWT - **Protección:** Todas las rutas CRUD excepto auth requieren JWT válido (middleware auth) - **Validación:** Joi para todos los endpoints (incluye schemas) - **Errores:** Manejo global de errores con códigos HTTP apropiados - **Paginación y filtros** en GET / 4. **Detalles del modelo [NOMBRE_ENTIDAD]:** - Campos: id (ObjectId), [agrega aquí los campos específicos, ej: name (string, required), email (string, unique), etc.] - Timestamps: createdAt, updatedAt **INSTRUCCIONES DE SALIDA:** - Proporciona **CÓDIGO COMPLETO** archivo por archivo, listo para copiar/pegar. - Incluye **package.json** con todas las dependencias exactas (express, mongoose, joi, jsonwebtoken, bcryptjs, dotenv, cors, helmet, etc.) y scripts: "dev": "nodemon src/app.js" - .env.example con todas las vars necesarias (MONGO_URI, JWT_SECRET, PORT=5000) - **NO EXPLIQUES**, solo código puro con comentarios mínimos. - Asegura que sea **100% funcional** al instalar deps y npm run dev. ¡Genera la API ahora! [Especifica aquí detalles adicionales del modelo si los hay]
Structured web research using ChatGPT's browsing capability. Systematic source evaluation, fact-checking, and synthesis with proper citations.
Design production-ready ChatGPT API integrations. Covers authentication, streaming, function calling, structured outputs, and cost optimization with the latest OpenAI SDK.
Step-by-step data analysis pipeline using ChatGPT's Code Interpreter. Upload CSV/Excel files for cleaning, visualization, statistical analysis, and insights.
Optimize ChatGPT's memory feature for persistent context. Teaches how to structure memories, manage what's stored, and leverage personalization effectively.
Generate precise, creative DALL-E 3 prompts. Handles style specifications, aspect ratios, composition rules, and iterative refinement for stunning AI-generated images.
Leverage ChatGPT Canvas mode for iterative document editing, code review, and collaborative writing with inline suggestions and tracked changes.