Features โข Installation โข Screenshots โข Documentation โข Contributing
QdSchemaBundle transforms your Symfony application's database schema into an interactive, collaborative documentation platform. Built specifically for Symfony and Doctrine ORM, it automatically extracts your database structure and provides a beautiful Vue 3 interface for teams to explore, document, and track schema evolution over time.
Perfect for:
- ๐ Development Teams - Keep everyone synchronized on database changes
- ๐ Schema Evolution - Track and version your database structure across releases
- ๐ Documentation - Auto-generated, always up-to-date schema docs
- ๐ค Collaboration - Comment and discuss entity changes with your team
- ๐ Discovery - Visualize entity relationships with interactive ER diagrams
- ๐ Automatic Schema Extraction - Automatically reads your Doctrine entities metadata
- ๐ Interactive ER Diagrams - Visualize entity relationships with Vue Flow
- ๐ท๏ธ Release Management - Version and track schema changes with semantic versioning
- ๐ Collaborative Comments - Comment on entities and fields with @mentions
- ๐ Smart Search - Quickly find entities by name or namespace
- ๐ Change Tracking - Detailed diffs between schema versions
- ๐ค Markdown Export - Export releases as beautiful markdown documentation
- ๐จ Multiple Views - Graph, cards, and list views for different workflows
- โก Zero Configuration - Works out of the box with Doctrine ORM
- ๐ Role-Based Access - Built-in security with Symfony roles
- Built with Vue 3 (Composition API) + Pinia for the frontend
- Automatic layout with ELK.js for beautiful graph visualizations
- Full Symfony 6.4+ & 7.0+ compatibility
- PHP 8.1+ with modern features
- Comprehensive PHPUnit test coverage
- DTOs with validation for API requests
- Transaction-safe schema snapshots
- PHP 8.1 or higher
- Symfony 6.4 or 7.0+
- Doctrine ORM 3.5+
composer require qd/schema-bundleAdd to your config/bundles.php:
<?php
return [
    // ...
    Qd\SchemaBundle\QdSchemaBundle::class => ['all' => true],
];Add to your config/routes.yaml:
qd_schema:
    resource: '@QdSchemaBundle/Resources/config/routes.yaml'php bin/console qd:schema:install --forcephp bin/console assets:install --symlink --relativeOpen your browser at: http://your-app.local/schema-doc
Coming soon - Interactive ER diagrams, Release timeline, Comment system
- Onboarding: New developers instantly understand your database structure
- Code Reviews: Visualize the impact of schema changes in PRs
- Planning: Discuss schema modifications with interactive diagrams
- Auto-Generated Docs: No more outdated schema documentation
- Export to Markdown: Generate beautiful docs for your wiki/readme
- Historical Reference: See how your schema evolved over time
- Schema Versioning: Track database changes alongside application versions
- Migration Planning: Compare releases to plan data migrations
- Rollback Support: Know exactly what changed in each release
QdSchemaBundle requires users to have the ROLE_QD_EDIT role to access certain features:
- Comment management: Users with ROLE_QD_EDITwill appear in the user list for @mentions in comments
- Comment deletion: Only the comment author or users with ROLE_ADMINcan delete comments
To grant access to a user, add the role to your User entity:
class User implements UserInterface
{
    private array $roles = ['ROLE_USER', 'ROLE_QD_EDIT'];
}Or via your user management system (e.g., EasyAdmin, custom admin panel).
All frontend assets are already compiled and shipped within the bundle under:
src/Resources/public/schema/
To make these assets available in your applicationโs public directory, run:
php bin/console assets:install --symlink --relativeThis command will copy or symlink the bundleโs assets to your projectโs public/ directory.
You should then be able to access the QdSchema frontend (for example) via:
http://your-app.local/schema-doc/schema
Once installed:
- Open the /schema-doc/schemaroute in your browser to view the schema management interface.
- Use the command-line tools to update or refresh schema data when needed.
Creating a release captures the current state of your database schema:
curl -X POST http://your-app.local/schema-doc/api/releases \
  -H "Content-Type: application/json" \
  -d '{"version_type": "minor", "description": "Added user profile fields"}'Or use the web interface at /schema-doc to create releases with one click.
GET /schema-doc/api/releases/compare/{id1}/{id2}Returns detailed diffs showing:
- Added entities
- Removed entities
- Modified fields and relations
- Change percentages
GET /schema-doc/api/releases/{id}/export/markdownGenerates a beautiful markdown document with:
- Release summary
- Entity changes with emojis
- Field and relation details
- Full schema snapshots
| Endpoint | Method | Description | 
|---|---|---|
| /schema-doc/api/schema | GET | Get current live schema | 
| /schema-doc/api/releases | GET | List all releases | 
| /schema-doc/api/releases | POST | Create new release | 
| /schema-doc/api/releases/{id} | GET | Get release details | 
| /schema-doc/api/releases/compare/{id1}/{id2} | GET | Compare two releases | 
| /schema-doc/api/releases/{id}/export/markdown | GET | Export as markdown | 
| /schema-doc/api/comments | GET/POST/DELETE | Manage comments | 
| /schema-doc/api/users | GET | Get users with ROLE_QD_EDIT | 
| Command | Description | 
|---|---|
| php bin/console qd:schema:install [--force] | Install bundle database tables | 
- Controllers: RESTful API with DTOs and validation
- Services: SchemaExtractor, SchemaDiff, VersioningService, SnapshotService
- Entities: Release, Snapshot, Comment (Doctrine ORM)
- Security: Role-based access control with Symfony Security
- Framework: Vue 3 with Composition API
- State: Pinia stores for schema, releases, comments
- Visualization: Vue Flow for ER diagrams, ELK.js for auto-layout
- Routing: Vue Router for SPA navigation
- Build: Vite for fast development and optimized production builds
- ROLE_QD_EDIT: Required to appear in mention lists
- ROLE_ADMIN: Can delete any comment
- Comment deletion: Only author or admin
- Entity validation: Checks against Doctrine metadata
- SQL injection protection: Parameterized queries throughout
Run the test suite:
vendor/bin/phpunitCurrent coverage:
- โ SchemaDiff service (7 tests)
- โ VersioningService (9 tests)
- ๐ฏ More tests coming soon
- Field-level comments
- Custom metadata fields
- Webhooks for external integrations
- Export to SQL/Doctrine migrations
- Dark mode
- Advanced filtering and search
- API authentication tokens
- Slack/Discord notifications
Contributions are welcome! Here's how:
- Fork the repository
- Create a feature branch (git checkout -b feature/amazing-feature)
- Commit your changes (git commit -m 'Add amazing feature')
- Push to the branch (git push origin feature/amazing-feature)
- Open a Pull Request
Please ensure:
- All tests pass (vendor/bin/phpunit)
- Code follows PSR-12 standards
- New features include tests
- Update documentation as needed
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: quentin.dav33@gmail.com
This bundle is open-source software licensed under the MIT License.
Built with:
- Symfony - The PHP framework for web applications
- Doctrine ORM - The database abstraction layer
- Vue 3 - The Progressive JavaScript Framework
- Vue Flow - Interactive node-based diagrams
- ELK.js - Automatic graph layout
- Pinia - Vue state management
Made with โค๏ธ by Quentin David
โญ Star this repository if you find it useful!