Skip to content

Commit 7c523fb

Browse files
authored
Add documentation for Plugin Domains in UltimateAuth
Introduced documentation for Plugin Domains in UltimateAuth, detailing architecture, extensibility, and recommended approaches.
1 parent 0f4bf93 commit 7c523fb

File tree

1 file changed

+116
-0
lines changed

1 file changed

+116
-0
lines changed
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# 🧩 Plugin Domains
2+
3+
Authentication alone is not enough.
4+
5+
Real-world systems also require:
6+
7+
- User management
8+
- Credential handling
9+
- Authorization rules
10+
11+
👉 UltimateAuth provides these as **plugin domains**
12+
13+
## 🧠 What Is a Plugin Domain?
14+
15+
A plugin domain is a **modular business layer** built on top of UltimateAuth.
16+
17+
👉 Core handles authentication
18+
👉 Plugin domains handle identity and access logic
19+
20+
<br>
21+
22+
## 🏗 Architecture
23+
24+
Each plugin domain is composed of multiple layers:
25+
26+
### 🔹 Bridge Package
27+
28+
Defines the server needed bridge interfaces:
29+
30+
👉 This package provides required minimal info for server package.
31+
32+
<br>
33+
34+
### 🔹 Contracts Package
35+
36+
Shared models between:
37+
38+
- Server
39+
- Client
40+
41+
👉 Includes DTOs, requests, responses
42+
43+
### 🔹 Reference Implementation
44+
45+
Provides default behavior:
46+
47+
- Application services
48+
- Store interfaces
49+
- Default implementations
50+
51+
👉 Acts as a production-ready baseline
52+
53+
### 🔹 Persistence Layer
54+
55+
Provides storage implementations:
56+
57+
- InMemory
58+
- Entity Framework Core
59+
60+
👉 Additional providers (Redis, etc.) can be added
61+
62+
<br>
63+
64+
## 🔄 Extensibility Model
65+
66+
Plugin domains are designed to be:
67+
68+
- Replaceable
69+
- Extendable
70+
- Composable
71+
72+
👉 You can implement your own persistence
73+
👉 You can extend behavior
74+
75+
<br>
76+
77+
## ⚠️ Recommended Approach
78+
79+
In most cases:
80+
81+
👉 You should NOT replace a plugin domain entirely
82+
83+
Instead:
84+
85+
- Use provided implementations
86+
- Extend via interfaces
87+
- Customize behavior where needed
88+
89+
👉 This ensures compatibility with the framework
90+
91+
<br>
92+
93+
## 🧠 Mental Model
94+
95+
If you remember one thing:
96+
97+
👉 Core = authentication engine
98+
👉 Plugin domains = business logic
99+
100+
## 🎯 Why This Matters
101+
102+
This architecture allows UltimateAuth to:
103+
104+
- Stay modular
105+
- Support multiple domains
106+
- Enable enterprise customization
107+
- Avoid monolithic identity systems
108+
109+
👉 You don’t build everything from scratch
110+
👉 You assemble what you need
111+
112+
## ➡️ Next Step
113+
114+
- Manage users → Users
115+
- Handle credentials → Credentials
116+
- Control access → Authorization

0 commit comments

Comments
 (0)