New SaaS Production Skill
Purpose
This skill generates a complete production-ready SaaS boilerplate with:
- Public Site: Landing pages, blog/news, legal pages (privacy, terms)
- Client Dashboard: User cabinet with billing, settings, core functionality
- Admin Panel: Content management, user management, analytics
- Payment Integration: T-Bank (Tinkoff) acquiring pre-configured
- Design System: Documatica v12.0 (via v12-style skill dependency)
Stack
| Layer | Technology |
|---|---|
| Backend | FastAPI 0.109+ |
| Templates | Jinja2 |
| Database | PostgreSQL + SQLAlchemy 2.0 |
| Frontend | Bootstrap 5 + v12-style Design System |
| Icons | Iconify |
| Payment | T-Bank Acquiring API |
| Auth | JWT + bcrypt |
| SMTP (Yandex/any) | |
| Deploy | Docker + Nginx + SSL |
Project Structure
{project_name}/
├── docker-compose.yml
├── .env.example
├── .github/
│ └── copilot-instructions.md
├── backend/
│ ├── Dockerfile
│ ├── requirements.txt
│ ├── app/
│ │ ├── __init__.py
│ │ ├── main.py # FastAPI app, middleware, routers
│ │ ├── database.py # SQLAlchemy setup
│ │ ├── models.py # User, Payment, etc.
│ │ ├── core/
│ │ │ ├── config.py # Settings from env
│ │ │ ├── templates.py # Jinja2 setup
│ │ │ └── content.py # YAML content loader
│ │ ├── api/
│ │ │ ├── auth.py # Login, register, JWT
│ │ │ ├── payment.py # T-Bank integration
│ │ │ └── billing.py # Subscriptions, packages
│ │ ├── pages/ # Public page routers
│ │ │ ├── __init__.py
│ │ │ ├── home.py
│ │ │ ├── landing.py
│ │ │ └── legal.py
│ │ ├── dashboard/ # Client cabinet routers
│ │ │ ├── __init__.py
│ │ │ ├── main.py
│ │ │ └── settings.py
│ │ ├── admin/ # Admin panel routers
│ │ │ ├── __init__.py
│ │ │ ├── dashboard.py
│ │ │ ├── users.py
│ │ │ └── content.py
│ │ ├── services/
│ │ │ ├── billing.py
│ │ │ └── email.py
│ │ ├── templates/
│ │ │ ├── base.html
│ │ │ ├── base_public.html
│ │ │ ├── base_dashboard.html
│ │ │ ├── base_admin.html
│ │ │ ├── components/
│ │ │ ├── public/
│ │ │ ├── dashboard/
│ │ │ ├── admin/
│ │ │ ├── auth/
│ │ │ └── errors/
│ │ └── static/
│ │ ├── css/
│ │ │ ├── documatica.css # v12.0 Design System
│ │ │ ├── dashboard.css
│ │ │ └── admin.css
│ │ ├── js/
│ │ └── images/
│ ├── content/
│ │ ├── home.yaml
│ │ └── navigation.yaml
│ └── data/ # JSON storage for MVP
│ └── users.json
├── nginx/
│ └── default.conf
└── scripts/
└── deploy.sh
Generation Steps
When user triggers this skill:
Step 1: Gather Project Info
Ask for:
- Project name (slug, e.g.
invoicepro) - Project title (display name, e.g. "InvoicePro")
- Domain (e.g.
invoicepro.ru) - Brief description (one sentence)
Step 2: Create Base Structure
Generate files from reference/ templates, replacing placeholders:
{{PROJECT_NAME}}→ project slug{{PROJECT_TITLE}}→ display name{{DOMAIN}}→ domain{{DESCRIPTION}}→ brief description{{YEAR}}→ current year
Step 3: Setup Files to Create
Root Level:
docker-compose.yml.env.example.gitignoreREADME.md
Backend Core:
backend/Dockerfilebackend/requirements.txtbackend/app/main.pybackend/app/database.pybackend/app/models.pybackend/app/core/config.pybackend/app/core/templates.pybackend/app/core/content.py
API Layer:
backend/app/api/__init__.pybackend/app/api/auth.pybackend/app/api/payment.pybackend/app/api/billing.py
Pages (Public):
backend/app/pages/__init__.pybackend/app/pages/home.pybackend/app/pages/landing.pybackend/app/pages/legal.py
Dashboard (Client Cabinet):
backend/app/dashboard/__init__.pybackend/app/dashboard/main.pybackend/app/dashboard/settings.py
Admin Panel:
backend/app/admin/__init__.pybackend/app/admin/dashboard.pybackend/app/admin/users.py
Services:
backend/app/services/billing.pybackend/app/services/email.py
Templates - Base:
backend/app/templates/base.htmlbackend/app/templates/base_public.htmlbackend/app/templates/base_dashboard.htmlbackend/app/templates/base_admin.html
Templates - Components:
backend/app/templates/components/header.htmlbackend/app/templates/components/footer.htmlbackend/app/templates/components/sidebar.html
Templates - Pages:
backend/app/templates/public/home.htmlbackend/app/templates/public/landing.htmlbackend/app/templates/auth/login.htmlbackend/app/templates/auth/register.htmlbackend/app/templates/dashboard/main.htmlbackend/app/templates/dashboard/settings.htmlbackend/app/templates/admin/dashboard.htmlbackend/app/templates/errors/404.html
Static Files:
backend/app/static/css/documatica.css(from v12-style)backend/app/static/css/dashboard.cssbackend/app/static/js/app.js
Content:
backend/content/home.yamlbackend/content/navigation.yaml
Deployment:
nginx/default.confscripts/deploy.sh
Step 4: Post-Generation Instructions
After generating, provide:
# 1. Copy environment file
cp .env.example .env
# 2. Edit .env with your settings:
# - SECRET_KEY (generate with: openssl rand -hex 32)
# - DATABASE_URL
# - TBANK_TERMINAL_KEY
# - TBANK_PASSWORD
# 3. Start with Docker
docker-compose up -d
# 4. Open http://localhost:8000
T-Bank Payment Integration
Pre-configured endpoints:
POST /api/v1/payment/create- Create paymentPOST /api/v1/payment/webhook- T-Bank webhook receiverGET /dashboard/payment/success- Success redirectGET /dashboard/payment/fail- Fail redirect
Supports:
- Subscription payments
- Pay-per-use packages
- Mock mode for testing
Design System (v12-style)
This skill depends on v12-style for UI components.
Key classes:
.docu-h1,.docu-h2- Typography.docu-tag,.docu-body- Text stylesrounded-[3rem]- Section containersrounded-2xl- Buttons, inputsbg-blue-600- Primary accent#FBBF24(docu-gold) - AI/system indicators
Files Reference
See reference/ directory for complete file templates:
main.py.template- FastAPI app entrymodels.py.template- SQLAlchemy modelspayment.py.template- T-Bank integrationbase.html.template- Root HTML templatebase_dashboard.html.template- Dashboard layout- And more...
Notes
- All templates use Russian for UI text
- No emojis anywhere in the project
- Environment variables for all secrets
- JSON files for MVP data storage (upgrade to PostgreSQL for production)
- Docker-ready from day one
