---
name: conventions
description: SmartStack global conventions — DB schemas, prefixes, namespaces
group: E
allowed-tools: [Read, Glob, Grep]
---

# Skill: SmartStack Conventions

> Global conventions: DB schemas, prefixes, namespaces.

## DB Schemas

| Schema | Usage |
|--------|-------|
| `core` | SmartStack platform tables |
| `extensions` | Client/extensions tables |

## Domain Table Prefixes

| Prefix | Domain |
|--------|--------|
| `auth_` | Authorization (Users, Roles, Permissions) |
| `nav_` | Navigation (Applications, Modules, Sections) |
| `usr_` | User profiles |
| `ai_` | AI features |
| `cfg_` | Configuration |
| `wkf_` | Workflows |
| `support_` | Support tickets |
| `ref_` | References |
| `loc_` | Localization |
| `lic_` | Licensing |
| `tenant_` | Multi-tenancy |

Custom applications: 2-5 letter prefix (`crm_`, `rh_`, `fi_`).

## Namespaces

```
{App}.Domain.Entities.{Module}/
{App}.Application.DTOs.{Module}/
{App}.Application.Services.{Module}/
{App}.Infrastructure.Repositories.{Module}/
{App}.Api.Controllers.{Module}/
```

## Service Naming

| Type | Pattern |
|------|---------|
| Interface | `I{Resource}Service` |
| Implementation | `{Resource}Service` |
| Repo interface | `I{Resource}Repository` |
| Repo implementation | `{Resource}Repository` |

## Migrations

Format: `{context}_v{version}_{seq}_{Description}`

## Frontend

- Layout: no `max-w-*`, standard padding `lg:px-10`
- Tabs: `useTabNavigation` hook, URL sync `?tab=name`, lazy load
- Breadcrumb: `<Breadcrumb items={[...]}/>` as first element
