nodejs-mongodb-cursorrules-prompt-file-tutorial — Cursor rule setup
nodejs-mongodb-cursorrules-prompt-file-tutorial guides Cursor through building a Node.js and MongoDB backend with Express, Mongoose, and specific pool entry game logic.
CC0-1.0 ★ 41,178 updated 2026-05-30
.cursor/rules/nodejs-mongodb-cursorrules-prompt-file-tutorial.mdcWhat nodejs-mongodb-cursorrules-prompt-file-tutorial does
The rule specifies a stack consisting of Node.js with Express.js, MongoDB with Mongoose ODM, JWT authentication, and an optional React.js admin panel. Git is required for version control, while Docker remains optional for deployment. The prompt instructs the assistant to draft detailed pseudocode for endpoints and business logic before writing actual code.
Domain logic centers on tournament pools: users submit up to 3 requests per pool, settle payments, and wait for admin approval. Confirmed requests turn into entries numbered 1, 2, and 3. Picks are submitted separately for each entry and lock either at kickoff or at 1PM Sunday of the active week. Winning keeps an entry alive, while a loss eliminates it.
Because the rule hardcodes pool mechanics with a limit of 3 entries, using it for generic Express projects requires stripping out the pool domain logic.
What it helps with
- enforce a limit of 3 requests and entries per user in a pool
- outline backend business logic and endpoints in pseudocode first
- track request states from payment completion to entry creation
- isolate pick management across numbered entries within a pool
Example prompts for the agent
- Draft pseudocode for the weekly scoring workflow before writing the endpoint.
- Implement the Mongoose Request schema with payment status tracking and entry conversion.
- Create the Express route to submit picks with validation for the 1PM Sunday cutoff.
How to install nodejs-mongodb-cursorrules-prompt-file-tutorial
Manually: put the files in place
.cursor/rules/nodejs-mongodb-cursorrules-prompt-file-tutorial.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.claude/rules/nodejs-mongodb-cursorrules-prompt-file-tutorial.mdThe paths frontmatter field limits the files: move globs from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.github/instructions/nodejs-mongodb-cursorrules-prompt-file-tutorial.instructions.mdThe applyTo field sets which files it applies to: move globs from the source into applyTo
Manually: put the files in place
.devin/rules/nodejs-mongodb-cursorrules-prompt-file-tutorial.mdManually: put the files in place
.clinerules/nodejs-mongodb-cursorrules-prompt-file-tutorial.mdStep by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules
Questions about nodejs-mongodb-cursorrules-prompt-file-tutorial
How to install nodejs-mongodb-cursorrules-prompt-file-tutorial in Cursor?
Add the rule contents to .cursor/rules/nodejs-mongodb-cursorrules-prompt-file-tutorial.mdc in your repository root.
What technology stack does this rule define?
It configures Node.js, Express.js, MongoDB with Mongoose, JWT authentication, Git, and optionally Docker and React.js.
Why does the rule enforce pseudocode before coding?
Writing pseudocode first ensures that endpoint workflows and pool scoring steps match exact business requirements before generating implementation code.
Source text
nodejs-mongodb-cursorrules-prompt-file-tutorial.mdc · CC0-1.0
--- description: "Cursor rules for Node.js development with MongoDB integration." globs: **/* alwaysApply: false --- Tech Stack: Backend: Node.js with Express.js Database: MongoDB with Mongoose ODM Frontend: React.js (for admin panel, if required) Authentication: JSON Web Tokens (JWT) Version Control: Git Deployment: 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 Pools Submit up to 3 Requests per Pool Complete payment for Requests Admin approves/rejects Requests Approved Requests become Entries Entry Management: Each user can have up to 3 Entries per Pool Entries are numbered 1, 2, 3 Picks are made and tracked separately for each Entry Pick Management: Users make Picks for each Entry separately Picks can be updated until deadline (game start or 1PM Sunday of the current week of the pick) Scoring and Ranking: Picks scored after games complete Win: Entry moves to next week Loss: Entry eliminated from Pool Each Entry ranked separately in Pool standings Results and Standings: Users view Picks/scores for each Entry separately Pool standings show all Entries (multiple per User possible) Pool members can view all Picks after scoring Key Implementation Points: Limit Requests to 3 per User per Pool Track Requests and Entries separately (numbered 1, 2, 3) Implement payment status tracking in Request model Create Entry only after admin approval and payment completion Admin interface for managing and approving Requests Implement state transitions (Request: pending -> approved -> Entry created)
© PatrickJS · CC0-1.0 · PatrickJS/awesome-cursorrules