Skip to content

Commit f5ca87c

Browse files
committed
fix merge conflict
2 parents 3dfc3e4 + f3422e6 commit f5ca87c

29 files changed

+1612
-730
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ package-lock.json
1414
# Architecture department for architecture content
1515
docs/architecture @bitwarden/dept-architecture
1616

17+
# Key management and Architecture for crypto concepts
18+
docs/architecture/cryptography @bitwarden/team-key-management-dev @bitwarden/dept-architecture
19+
1720
# Architecture and AppSec for security concepts
1821
docs/architecture/security @bitwarden/team-appsec @bitwarden/dept-architecture
1922

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616

1717
steps:
1818
- name: Check out repo
19-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
19+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2020
with:
2121
persist-credentials: false
2222

2323
- name: Set up Node
24-
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
24+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
2525
with:
2626
cache: "npm"
2727
cache-dependency-path: "**/package-lock.json"

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616

1717
steps:
1818
- name: Check out repo
19-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
19+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2020
with:
2121
persist-credentials: false
2222

2323
- name: Set up Node
24-
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
24+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
2525
with:
2626
cache: "npm"
2727
cache-dependency-path: "**/package-lock.json"

.github/workflows/review-pr-comment.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

custom-words.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
# Custom dictionary for spellchecking. Before adding a word here, consider whether you can put
22
# it in a single (`) or multiline (```) code snippet instead, as they are automatically ignored
33
# by the spellchecker. Please keep the list sorted alphabetically.
4-
54
AndroidX
65
AOSP
6+
backplane
77
Bitwarden
88
bitwardensecret
99
bytemark
1010
Casbin
1111
clickjacking
1212
codebases
1313
CODEOWNERS
14+
COSE
1415
CQRS
16+
CQS
1517
CTAP2
1618
deinitializer
1719
deinitializers
1820
dockerized
1921
dotfile
20-
frontmatter
2122
F-Droid
23+
frontmatter
2224
Gitter
2325
HKDF
26+
HMAC
2427
hotfix
2528
hotfixed
2629
hotfixes
@@ -45,7 +48,6 @@ minio
4548
MVVM
4649
NGRX
4750
OIDCS
48-
oktapreview
4951
Omnisharp
5052
onboarded
5153
opid
@@ -59,6 +61,7 @@ POSIX
5961
precompiler
6062
proxied
6163
recompositions
64+
Redis
6265
refactorings
6366
roadmap
6467
roadmaps
@@ -85,6 +88,7 @@ typealias
8588
typecheck
8689
typechecks
8790
typesafe
91+
unsynchronized
8892
WCAG
8993
Xcodes.app
9094
xcworkspace

docs/architecture/adr/0008-server-CQRS-pattern.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,19 @@ date: 2022-07-15
55
tags: [server]
66
---
77

8-
# 0008 - Server: Adopt CQRS
8+
# 0008 - Server: Adopt CQS
99

1010
<AdrTable frontMatter={frontMatter}></AdrTable>
1111

12+
:::note Terminology clarification
13+
14+
This ADR originally used "CQRS" (Command Query Responsibility Segregation) terminology. However, our
15+
implementation more accurately reflects CQS (Command Query Separation), which is a simpler pattern
16+
focused on breaking up large service classes rather than separating read/write data models. The
17+
content has been updated to use the more accurate CQS terminology.
18+
19+
:::
20+
1221
## Context and problem statement
1322

1423
In Bitwarden Server, we currently use an `<<Entity>>Service` pattern to act on our entities. These
@@ -30,27 +39,26 @@ method parameters, which goes against our typical DI pattern.
3039
- **`<<Entity>>Services`** -- Discussed above
3140
- **Queries and Commands** -- Fundamentally our problem is that the `<<Entity>>Service` name
3241
encapsulates absolutely anything you can do with that entity and excludes any code reuse across
33-
different entities. The CQRS pattern creates classes based on the action being taken on the
34-
entity. This naturally limits the classes scope and allows for reuse should two entities need to
35-
implement the same command behavior.
36-
https://docs.microsoft.com/en-us/azure/architecture/patterns/cqrs
42+
different entities. The CQS pattern creates classes based on the action being taken on the entity.
43+
This naturally limits the classes scope and allows for reuse should two entities need to implement
44+
the same command behavior.
3745
- **Small Feature-based services** -- This design would break `<<Entity>>Service` into
3846
`<<Feature>>Service`, but ultimately runs into the same problems. As a feature grows, this service
3947
would become bloated and tightly coupled to other services.
4048

4149
## Decision outcome
4250

43-
Chosen option: **Queries and Commands**
51+
Chosen option: **Queries and Commands (CQS pattern)**
4452

45-
Commands seem all-around the better decision to the incumbent. We gain code reuse and limit class
46-
scope. In addition, we have an iterative path to a full-blown CQRS pipeline, with queued work.
53+
Commands seem all-around the better decision to the incumbent, primarily because it limits class
54+
scope.
4755

4856
Queries are already basically done through repositories and/or services, but would require some
4957
restructuring to be obvious.
5058

5159
## Transition plan
5260

53-
We will gradually transition to a CQRS pattern over time. If a developer is making changes that use
61+
We will gradually transition to a CQS pattern over time. If a developer is making changes that use
5462
or affect a service method, they should consider whether it can be extracted to a query/command, and
5563
include it in their work as tech debt.
5664

@@ -59,3 +67,10 @@ up all at once. It's acceptable to refactor "one level deep" and then leave othe
5967
are. This may result in the new query/command still being somewhat coupled with other service
6068
methods. This is acceptable during the transition phase, but these interdependencies should be
6169
removed over time.
70+
71+
## Further reading
72+
73+
- [Server Architecture](../server/index.md) - Practical guide on implementing CQS in the server
74+
codebase
75+
- [Martin Fowler on CQS](https://martinfowler.com/bliki/CommandQuerySeparation.html) - High-level
76+
summary of the CQS principle

docs/architecture/adr/0010-angular-ngmodules.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
adr: "0010"
3-
status: Accepted
3+
status: Deprecated
44
date: 2022-07-25
55
tags: [clients, angular]
66
---
@@ -9,6 +9,13 @@ tags: [clients, angular]
99

1010
<AdrTable frontMatter={frontMatter}></AdrTable>
1111

12+
:::warning Deprecated
13+
14+
Deprecated as of 2025-11-25: Angular has stabilized Standalone Components and has deprecated
15+
NgModules. Standalone is the preferred way of organizing components going forward.
16+
17+
:::
18+
1219
## Context and problem statement
1320

1421
> NgModules are containers for a cohesive block of code dedicated to an application domain, a

docs/architecture/adr/0016-decryption-in-views.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
adr: "0016"
3-
status: Accepted
3+
status: Deprecated
44
date: 2022-11-28
55
tags: [clients, typescript]
66
---
@@ -9,6 +9,12 @@ tags: [clients, typescript]
99

1010
<AdrTable frontMatter={frontMatter}></AdrTable>
1111

12+
:::warning Deprecated
13+
14+
Deprecated as of 2025-11-25: Encryption and decryption logic has moved into the SDK.
15+
16+
:::
17+
1218
## Context and problem statement
1319

1420
Bitwarden has a couple of different models for representing data described in detail in

0 commit comments

Comments
 (0)