django-dev-ninja

Organize Django Ninja APIs with one-endpoint-per-file and grouped routers.

15|Updated Dec 21, 2025
One-click install
npx skills add https://github.com/sergio-bershadsky/ai --skill django-dev-ninja
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: django-dev-ninja
Source: https://github.com/sergio-bershadsky/ai/tree/main/plugins/django-dev/skills/django-dev-ninja
Command: npx skills add https://github.com/sergio-bershadsky/ai --skill django-dev-ninja

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Django Ninja API development can become unwieldy without a clear, scalable organization. This skill provides a modular pattern set that encourages one-endpoint-per-file files, grouped routers, and separate schemas and services to keep code maintainable as projects grow.

Core Features & Use Cases

  • One-endpoint-per-file organization to keep endpoints small and focused.
  • Router per group and nested routing to model domain boundaries.
  • Schemas in a dedicated schemas package with Pydantic models, and services for business logic.
  • Clear API structure exemplifying typical Django Ninja projects with a scalable layout.

Quick Start

Set up a Django project layout that uses one-endpoint-per-file structure with grouped routers and a separate schemas package.

Frequently Asked Questions about django-dev-ninja

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

FAQPage Schema
How do I structure a scalable Django Ninja API project?

Structure a scalable Django Ninja API by adopting a modular layout with one-endpoint-per-file organization, grouped routers for domain boundaries, and separate schemas and services directories to keep business logic and data models maintainable.

What is the one-endpoint-per-file pattern for Django Ninja routers?

The one-endpoint-per-file pattern keeps Django Ninja endpoints small and focused by placing each endpoint in its own file, grouping them into routers by domain to model clear boundaries and prevent unwieldy code as projects grow.

How do I separate schemas and services in a Django Ninja project?

Separate schemas and services in a Django Ninja project by placing Pydantic models in a dedicated schemas package and business logic in a services directory, ensuring endpoints remain lightweight and data models are cleanly orchestrated.

Do I need a specific directory layout to organize Django Ninja endpoints?

You need a minimal Django layout with api/, schemas/, and services directories to orchestrate endpoints, routers, and data models effectively using this modular pattern.

When should I use grouped routers for my Django Ninja API?

Use grouped routers for your Django Ninja API when modeling domain boundaries in large projects, preventing unwieldy code by keeping endpoints organized through nested routing and a clear modular structure.