Files
cal-diy-oidc/agents/rules/architecture-vertical-slices.md
Benny Joo ab21c7f805 refactor: Cal.diy (#28903)
* feat: Cal.diy — community-driven MIT-licensed fork of Cal.com

This squashed commit contains all Cal.diy changes applied on top of calcom/cal.com main:

- Rebrand Cal.com to Cal.diy across the entire codebase
- Remove Enterprise Edition (EE) features, license checks, and AGPL restrictions
- Switch license from AGPL-3.0 to MIT
- Remove docs/ directory (migrated to Nextra at cal.diy)
- Remove dead code: org tests, EE tips, platform nav, premium username, SAML/SSO, etc.
- Clean up .env.example for self-hosted Cal.diy
- Update Docker image references to calcom/cal.diy
- Update README, CONTRIBUTING.md, and issue templates for Cal.diy community fork
- Add PR welcome bot for Cal.diy contributors
- Fix API v2 breaking changes oasdiff ignore entries
- Replace Blacksmith CI runners with default GitHub Actions

3893 files changed, 20789 insertions(+), 411020 deletions(-)

Co-Authored-By: benny@cal.com <sldisek783@gmail.com>

* refactor: remove org-specific /organizations/:orgId endpoints from API v2 atoms controllers (#1701)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix: revert Cal.diy Inc to Cal.com, Inc. in license files, copyright notices, and package metadata (#1702)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* rip out org related comments in api v2

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-04-15 09:52:36 -03:00

2.0 KiB

title, impact, impactDescription, tags
title impact impactDescription tags
Organize Code by Domain Using Vertical Slices CRITICAL Dramatically improves discoverability and reduces cross-team conflicts architecture, vertical-slices, ddd, organization

Organize Code by Domain Using Vertical Slices

Impact: CRITICAL

Our codebase is organized by domain, not by technical layer. The packages/features directory is the heart of this architectural approach. Each folder inside represents a complete vertical slice of the application, driven by the domain it touches.

Incorrect (traditional layered architecture):

src/
  controllers/
    bookingController.ts
    availabilityController.ts
  services/
    bookingService.ts
    availabilityService.ts
  repositories/
    bookingRepository.ts
    availabilityRepository.ts

This creates problems: changes to one feature require touching files scattered across multiple directories, it's hard to understand what a feature does because its code is fragmented, and teams step on each other's toes.

Correct (vertical slice architecture):

packages/features/
  bookings/
    services/
    repositories/
    components/
    tests/
  availability/
    services/
    repositories/
    components/
    tests/

Each feature folder is a self-contained vertical slice that includes:

  • Domain logic: Core business rules and entities specific to that feature
  • Application services: Use case orchestration for that domain
  • Repositories: Data access specific to that feature's needs
  • DTOs: Data transfer objects for crossing boundaries
  • UI components: Frontend components related to this feature
  • Tests: Unit, integration, and e2e tests for this feature

Benefits:

  • Everything related to a feature lives in one directory
  • You can understand the entire feature by exploring one directory
  • Teams can work on different features without conflicts
  • Features are loosely coupled and can evolve independently

Reference: Cal.diy Engineering Blog