Introduction
Doggy Framework is an AI-native enterprise low-code development framework built on Symfony 7.4 LTS (long-term support until 2029).
Why Doggy?
- AI Native: Deep integration with MCP, Agent, multi-model (Alibaba Bailian, OpenAI, LM Studio) with built-in coding assistant, natural language query, and vision recognition
- Low-Code Engine: Define business models with PHP 8 Attributes combined with
@Efannotations — auto-generates migrations and admin interfaces - Enterprise Security: WebAuthn passwordless authentication, three-officer model, password policies, full-chain audit logging
- Real-Time Communication: Mercure SSE push with FrankenPHP embedded Hub, no extra services needed
- High Performance: FrankenPHP Worker mode + zstd/br compression, PostgreSQL-first architecture
- Complete Ecosystem: Organization management, scheduler, file storage, email, SunUI component library — everything out of the box
Tech Stack
| Layer | Technology |
|---|---|
| Language | PHP 8.2+ |
| Framework | Symfony 7.4 LTS |
| Runtime | FrankenPHP (Worker mode) via runtime/frankenphp-symfony |
| Database | PostgreSQL 14+ |
| ORM | Doctrine ORM + StofDoctrineExtensionsBundle (Gedmo) |
| Message Queue | Symfony Messenger (Doctrine Transport) |
| Real-Time | Mercure SSE (dunglas/mercure) |
| AI | Symfony AI (MCP, Agent, Store, multi-platform) |
| Auth | WebAuthn (web-auth/webauthn-symfony-bundle) + JWT (firebase/jwt) |
| File Storage | League Flysystem (Local / OSS / S3) |
| Frontend | Twig + jQuery + SunUI Components |
| Utilities | PHPSpreadsheet, Imagine, Predis, Ramsey UUID |
Requirements
- PHP >= 8.2
- ext-ctype, ext-iconv
- PostgreSQL >= 14
- Composer >= 2.5
Quick Start
Install
bash
git clone git@github.com:doggy/skeleton.git my-app
cd my-appConfigure Environment
bash
cp .env.example .env
# Edit .env for database connection and Mercure JWT secretStart Database
PostgreSQL must be installed and running:
bash
# macOS
brew install postgresql@14
brew services start postgresql@14
createdb app
# Ubuntu/Debian
sudo apt install postgresql-14
sudo systemctl start postgresql
sudo -u postgres createdb appThe Mercure Hub is built into FrankenPHP — no additional service needed.
Access
- Application: http://localhost:8000
- Admin Panel: http://localhost:8000/admin
Directory Structure
config/
├── bundles.php # Enabled Symfony bundles
├── packages/ # Bundle configurations
└── services.yaml
src/
├── Annotation/ # Custom annotations: Ef.php, EfGroup.php
├── Command/ # 16 Console commands
├── Controller/ # Admin, Api, Security controllers
├── Entity/ # Doctrine entities + CommonTrait
│ ├── Organization/ # Department, Position, etc.
│ ├── Platform/ # Platform entities
│ ├── Security/ # User, Role, Permission
│ ├── Storage/ # File storage entities
│ └── System/ # System config entities
├── Form/ # Form types
├── Message/ # Async messages
├── MessageHandler/ # Message handlers
├── Repository/ # Doctrine repositories
├── Security/ # WebAuthn, JWT, Voter
├── Service/ # AI, Calendar, Security, Storage, Task, View, etc.
└── Twig/ # TwigExtension
Caddyfile # FrankenPHP config (Mercure Hub, compression, cache)Core Bundles
| Bundle | Purpose |
|---|---|
| FrameworkBundle | Symfony core |
| DoctrineBundle + MigrationsBundle | Database ORM & migrations |
| SecurityBundle | Authentication & authorization |
| TwigBundle + TwigExtraBundle | Template engine |
| MonologBundle | Logging |
| StofDoctrineExtensionsBundle | Gedmo extensions (tree, timestamps, soft-delete) |
| NelmioCorsBundle | CORS support |
| WebauthnBundle | WebAuthn passwordless auth |
| MercureBundle | Real-time push |
| AiBundle | Symfony AI integration |
| FlysystemBundle | File storage abstraction |
| HautelookAliceBundle | Test fixtures |
Core Concepts
Dynamic Model
Mark business fields with @Ef annotations combined with PHP 8 Attributes. Auto-generates database migrations, CRUD interfaces, validation rules, and permission checks.
php
use App\Annotation\Ef;
class Department
{
#[Ef(displayName: 'Department Name', required: true)]
private string $name;
#[Ef(displayName: 'Department Code', searchable: true)]
private string $code;
}See: Dynamic Model
CommonTrait
All entities combine capabilities via CommonTrait:
CommonTrait
├── BlameableTrait # Created by / Updated by auto-record
├── TimestampableTrait # Created at / Updated at auto-record
├── SoftDeleteTrait # Soft delete
└── IdTrait # Auto-increment IDOrganization
Multi-level department tree (Nested Set), employee management, position system.
See: Organization
Security
- WebAuthn passwordless login (Passkey, security keys, biometrics)
- Three-officer model (system admin, security officer, auditor)
- Password complexity & expiry policies
- Full-chain operation audit
See: WebAuthn