sujan-mishra-1/next icon
public
Published on 6/6/2025
Nw

Rules

Build & Development Commands

  • Use standard npm scripts: dev, build, start, lint, format
  • Keep environment variables in .env.local and never commit secrets

Testing Guidelines

  • Mock external dependencies and database using in-memory MongoDB
  • All code must have test coverage and tests must pass before merge

Code Style & Guidelines

  • Follow Airbnb JavaScript/React style guide
  • Use Prettier for formatting and ESLint for linting
  • Structure code modularly: separate concerns (components, API, models, utils)
  • Use plural names for MongoDB collections

Documentation Guidelines

  • Document all MongoDB models and API endpoints clearly

Developer Rule (Model Behavior)

  • Act as a full-stack Next.js developer
  • Write, debug, and fix code involving Next.js, Node.js, and MongoDB
  • Suggest clean, efficient, and production-ready solutions