Backend Standards

Enforce Mongoose model usage and licencee filtering in backend data access.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/A-Hazzard/Casino-Manangement-System --skill backend-standards-a-hazzard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Backend Standards
Source: https://github.com/A-Hazzard/Casino-Manangement-System/tree/main/.claude/skills/backend-standards
Command: npx skills add https://github.com/A-Hazzard/Casino-Manangement-System --skill backend-standards-a-hazzard

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Backend data access in modern Node.js apps often relies on direct database access, leading to inconsistent queries, weak validation, and security risks. This Skill standardizes on Mongoose models, enforces licencee filtering, and establishes reliable aggregation and update patterns for the app/api layer.

Core Features & Use Cases

  • Enforces use of Mongoose models for all app/api data access to ensure typing, validation, and indexing benefits.
  • Promotes findOne-based queries for string IDs, safe updates with findOneAndUpdate, and consistent error handling with clear responses.
  • Applies licencee and location filtering, provides robust aggregation patterns, and promotes soft-delete handling with proper data lifecycle management.
  • Includes guidance on DTO mapping and type-safety to align backend responses with frontend contracts.

Quick Start

Replace direct collection access in app/api with Mongoose models and apply the documented patterns to all data access points.

Frequently Asked Questions about Backend Standards

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce consistent MongoDB data access patterns in a Node.js backend?

Standardize MongoDB data access by mandating Mongoose models for all API operations, applying licencee filtering, and using findOne queries for string IDs to ensure validation and safety across the backend.

What is the best way to handle Mongoose soft-delete and licencee filtering in API queries?

Handle Mongoose soft-delete and licencee filtering by applying documented aggregation patterns and location constraints to data queries, ensuring proper data lifecycle management and secure multi-tenant access.

Why should I use Mongoose models instead of direct MongoDB collection access in my API?

Use Mongoose models instead of direct MongoDB collection access to guarantee schema typing, built-in validation, and indexing benefits, preventing inconsistent queries and security risks in backend data operations.

How do I structure safe Mongoose updates and error handling for backend APIs?

Structure safe Mongoose updates using findOneAndUpdate operations and consistent error handling with clear responses, replacing direct collection access to align backend responses with frontend contracts.

Can I apply Mongoose aggregation workflows with licencee filtering for multi-tenant applications?

Yes, you can apply Mongoose aggregation workflows with licencee and location filtering to enforce secure data access patterns, ensuring queries remain isolated and consistent across multi-tenant backend APIs.