Node.js API Guide .cursorrules prompt file
About .cursorrules prompt file
What you can build
- Express API Builder - Create a web application that allows developers to quickly design and generate Express.js RESTful APIs with user-friendly UI, following best practices for structure, naming conventions, and security.
- Node.js Payment Gateway Integrator - Develop a platform for seamless integration of MercadoPago into Node.js apps, enabling easy setup of payment preferences, split payments, and secure webhooks.
- TypeScript Express Starter Kit - Provide a starter template for building TypeScript-based Express applications, complete with authentication, error handling, and database integration using popular ORMs.
- API Performance Monitor - Implement a service that provides real-time performance monitoring and alerts for Node.js APIs, with integration capabilities for New Relic or Datadog.
- Secure API Proxy Service - Develop a middleware-focused service that secures API traffic with HTTPS, rate-limiting, and request validation, serving as a protective layer for backend services.
- Database Optimization Toolkit - Offer a set of tools for analyzing and optimizing database queries in MongoDB, PostgreSQL, and MySQL, focusing on indexing, normalization, and load balancing.
- JWT & Role-Based Access Dashboard - Create an admin dashboard for managing JWT authentication and role-based access control in Node.js applications, with integration to popular auth libraries.
- Swagger & Postman Sync Tool - Build a tool that automatically syncs Swagger documentation to Postman collections, ensuring up-to-date API documentation and testing resources for developers.
- Real-time Error Logging Platform - Develop a centralized logging and error monitoring platform using Winston or Bunyan, featuring detailed analytics and error tracking for Node.js applications.
- CI/CD Pipeline Generator for Node.js - Provide a generator that configures automated CI/CD pipelines for Node.js projects using GitHub Actions, GitLab CI, or Jenkins, tailored for deployment to cloud platforms.
Benefits
- Seamlessly integrates MercadoPago with secure webhooks, currency conversion, and split payment management using the official SDK.
- Implements robust error handling with centralized formatting, custom error classes, and logging using Winston or Bunyan.
- Emphasizes security through HTTPS, data sanitization, and encrypted storage, while regularly updating dependencies.
Synopsis
Developers aiming to create robust, scalable e-commerce backends with comprehensive MercadoPago integrations would benefit, enabling secure payment workflows and efficient RESTful API structures.
Overview of .cursorrules prompt
The .cursorrules file outlines best practices and guidelines for developers building backend solutions using Node.js, Express, and MercadoPago integration. It emphasizes a modular code style, API development with Express, and usage of TypeScript for type safety. Security and performance optimization are prioritized with recommendations for using HTTPS, data sanitization, and caching strategies. It provides details on authentication, database integration with PostgreSQL, MongoDB, or MySQL, and error handling. It also covers testing methods, deployment strategies with Docker and CI/CD pipelines, and API documentation using Swagger. Additionally, it highlights the importance of adhering to Node.js and Express best practices and offers resources for further documentation.