Node.js MongoDB .cursorrules prompt file tutorial
Author: allxdamnxday
What you can build
Online Sports Pool Management Platform: Develop a comprehensive web application where users can join sports betting pools, submit requests, and get their entries approved by admin. Ensures fair play by strict adherence to rules and guidelines encapsulated in the backend logic.Gamified Betting Experience: Create a platform that allows users to engage more interactively with sports pools, featuring a gamified user interface for making picks, tracking scores, and managing entries, enhancing user engagement and experience.Admin Dashboard for Pool Management: Build an admin panel with React.js for pool administrators to easily manage user requests, approve or reject entries, track payment statuses, and automate entry creation upon approval, with intuitive navigation and real-time updates.Secure Sports Bet Payment Gateway: Implement an integrated payment system with secure and validated methods following best practices for payment tracking, ensuring users can confidentially and efficiently submit payments for their pool entries.Real-time Entry Tracking and Scoring System: Offer a real-time system where users can monitor the status of their entries, see live scoring updates after games, and view standings comprehensively, providing transparency and engagement in the betting process.Comprehensive User Insights and Analytics: Develop a tool that analyzes user data, including picks and performances, to offer insights and statistics that users can leverage to improve their future pool strategies and decision-making processes.Pseudocode-Based Development Toolkit: Provide a development toolkit that emphasizes pseudocode-driven creation, helping developers outline and strategize API endpoints and business logic accurately and efficiently before engaging in actual coding.RESTful API for Sports Pool Applications: Create a robust RESTful API that handles user authentication, request submission, entry management, and scoring systems, ensuring secure and efficient data transfer and management following industry best practices.Interactive User History and Archive: Develop a feature for users to view and analyze their historical data, including past picks and achievements, creating a personal sports betting archive that aids in personal tracking and historical performance assessment.Community Forum for Pool Participants: Launch a discussion board for users within the same pool, fostering a community environment where participants can share insights, discuss strategies, and enjoy a shared sports betting experience.
Benefits
Synopsis
Developers building a sports pool management platform would benefit from this prompt by creating a structured backend system with user authentication, detailed pick management, and admin control interfaces.
Overview of .cursorrules prompt
The .cursorrules file outlines a structured approach for developing a pool-based application using specified technologies such as Node.js, MongoDB, React.js, and Git. It emphasizes precision in adhering to user requirements, especially in the user flow and game rules. The file advises starting with pseudocode to strategize the implementation of features, ensuring secure and efficient code following RESTful API best practices, and implementing error handling and input validation. Key user flows and management processes such as entry and pick management, scoring, and results viewing are detailed. The file provides guidelines on limiting user requests, tracking entries, managing payments and state transitions, and developing an admin interface for requests. Optional Docker deployment is suggested for deployment purposes.
.cursorrules Content
Tech Stack:Backend: Node.js with Express.jsDatabase: MongoDB with Mongoose ODMFrontend: React.js (for admin panel, if required)Authentication: JSON Web Tokens (JWT)Version Control: GitDeployment: Docker (optional)Precision in User Requirements:Strictly adhere to specified user flow and game rules.Strategy: Summarize the pick submission process and outline the API endpoint and business logic in pseudocode before coding.Strategic Planning with Pseudocode:Begin each feature with detailed pseudocode.Example: Provide pseudocode for the weekly scoring process, detailing steps from game result input to entry status updates.Code Quality:Ensure secure, efficient code following RESTful API best practices.Implement proper error handling and input validation.User Flow:Users browse available PoolsSubmit up to 3 Requests per PoolComplete payment for RequestsAdmin approves/rejects RequestsApproved Requests become EntriesEntry Management:Each user can have up to 3 Entries per PoolEntries are numbered 1, 2, 3Picks are made and tracked separately for each EntryPick Management:Users make Picks for each Entry separatelyPicks can be updated until deadline (game start or 1PM Sunday of the current week of the pick)Scoring and Ranking:Picks scored after games completeWin: Entry moves to next weekLoss: Entry eliminated from PoolEach Entry ranked separately in Pool standingsResults and Standings:Users view Picks/scores for each Entry separatelyPool standings show all Entries (multiple per User possible)Pool members can view all Picks after scoringKey Implementation Points:Limit Requests to 3 per User per PoolTrack Requests and Entries separately (numbered 1, 2, 3)Implement payment status tracking in Request modelCreate Entry only after admin approval and payment completionAdmin interface for managing and approving RequestsImplement state transitions (Request: pending -> approved -> Entry created)