Add initial project files

This commit is contained in:
Igor Martyniuk
2026-09-01 13:03:41 +03:00
parent 22e111bb44
commit 74cb5b6176
1841 changed files with 242819 additions and 30 deletions
+39
View File
@@ -0,0 +1,39 @@
# Auth Module
The Auth module owns admin authentication, current-user state, token persistence, auth routes, and route guarding.
## Source Map
| Area | Path |
| --------------------- | ---------------------------------------------------- |
| Frontend module | `apps/admin/src/core/Auth/` |
| Frontend routes | `apps/admin/src/core/Auth/config/routing.tsx` |
| Frontend provider | `apps/admin/src/core/Auth/providers/AuthProvider/` |
| Frontend translations | `apps/admin/src/core/Auth/config/translation/` |
| Backend module | `apps/backend/app/base_modules/Auth/` |
| Backend admin model | `apps/backend/app/base_modules/Admin/model/admin.ts` |
| Auth config | `apps/backend/config/auth.ts` |
## Documentation
| Page | Purpose |
| ------------------------- | ------------------------------------------------------------------------------------- |
| [Frontend](./frontend.md) | AuthProvider, login page, route guard, token storage, and translations. |
| [Backend](./backend.md) | Login/logout/current-user routes, validators, token behavior, and response contracts. |
## Main Capabilities
- Sign in with admin email and password.
- Store bearer token client-side.
- Verify and load current authenticated admin.
- Expose current user, permissions, login, logout, verify, and profile update methods.
- Guard app routes until authentication is known.
- Clear React Query cache on logout.
## Ownership Rules
- Auth owns session state and current user state.
- Auth owns token persistence.
- Auth owns auth route UI and auth guard widget.
- AccountSettings may call AuthProvider `updateUser` but does not own auth state.
- Permission gates consume `AuthUser.permissions` but do not fetch auth state themselves.