Skip to content
Agentmart
Submit a tool

backend-saas

SaaS backend development patterns including API design, multi-tenancy, authentication, and scalability.

Skill by queen-of-code

IndexedMIT★ 9
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/queen-of-code-backend-saas

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

SaaS backend development patterns including API design, multi-tenancy, authentication, and scalability. Use when building backend services, APIs, SaaS infrastructure, or designing system architecture.

Use cases: design, backend, devops

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/backend-saas

What's inside

Skill name
backend-saas
Description
SaaS backend development patterns including API design, multi-tenancy, authentication, and scalability. Use when building backend services, APIs, SaaS infrastructure, or designing system architecture.
License
MIT
Instructions
405 lines in SKILL.md · view on GitHub

Files (4)

  • SKILL.md
  • api-structure.md · examples/
  • csharp.md · examples/
  • python.md · examples/

SKILL.md (first lines)

# SaaS Backend Development

## When to Use

- Building backend APIs
- Designing multi-tenant systems
- Implementing authentication/authorization
- Setting up observability
- Planning for scale
- Handling background jobs

## API Design

### RESTful Conventions

| Method | Path | Action | Status Codes |
|--------|------|--------|--------------|
| GET | /resources | List all | 200, 204 |
| GET | /resources/:id | Get one | 200, 404 |
| POST | /resources | Create | 201, 400, 422 |
| PUT | /resources/:id | Replace | 200, 404 |
| PATCH | /resources/:id | Update | 200, 404 |
| DELETE | /resources/:id | Remove | 204, 404 |

### Response Format

```json
{
  "data": { ... },
  "meta": {
    "page": 1,
    "per_page": 20,
    "total": 100
  }
}
```

### Error Format

```json
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Email is invalid",
    "details": [
      { "field": "email", "message": "must be a valid email" }
    ]
  }
}
```

### Pagination

```
GET /api/users?page=2&per_page=20
GET /api/users?cursor=abc123&limit=20  (cursor-based)
```

### Filtering and Sorting

```
GET /api/users?status=active&role=admin
GET /api/users?sort=-created_at,name  (- for descending)
```

## Multi-Tenancy

### Strategies

| Strategy | Isolation | Complexity | Cost |
|----------|-----------|------------|------|
| **Shared DB, Shared Schema** | Low | Low | Low |
| **Shared DB, Separate Schema** | Medium | Medium | Medium |
| **Separate Database** | High | High | High |

### Row-Level Security (Shared Schema)

```sql
-- Every table has tenant_id
CREATE TABLE users (
    id UUID PRIMARY KEY,
    tenant_id UUID NOT NULL REFERENCES tenants(id),
    email VARCHAR(255) NOT NULL,
    -- ...
);

-- RLS policy
ALTER TABLE users ENABLE ROW LEVEL SECURITY;
CREATE POLICY tenant_isolation ON users
    USING (tenant_id = current_setting('app.tenant_id')::UUID);

-- Set tenant context per request
SET app.tenant_id = 'tenant-uuid-here';
```

### Application-Level Filtering

```python
class TenantMiddleware:
    def __init__(self, get_response):
        self.get_response = get_response

    def __call__(self, request):
        # Extract tenant from subdomain, header, or JWT
        tenant_id = self.extract_tenant(request)
        request.tenant_id = tenant_id
        return self.get_response(request)

class TenantQuerySet:
    def get_queryset(self):
        return super().get_queryset().filter(
            tenant_id=self.request.tenant_id
        )
```

## Authentication & Authorization

### JWT Structure

From queen-of-code/AI-DLC, MIT.

More from queen-of-code/AI-DLC

Signals

Stars
9
Forks
13
Open issues
0
Last commit (this folder)
Apr 13, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

Same skill elsewhere

Copies of this SKILL.md published by others; search shows only one of them.

More from queen-of-code

Cite this page

backend-saas skill. Agent Mart. https://agentmart.dev/skills/queen-of-code-backend-saas (last updated 2026-10-24)