Comfy-Org / Comfy-Org/ComfyUI_frontend
[RFC] Consolidate auth domain into `platform/auth/`
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
## Problem
Authentication is scattered across 4 directories:
| File | Directory | Lines |
|------|-----------|-------|
| `authStore.ts` | `src/stores/` | 544 |
| `apiKeyAuthStore.ts` | `src/stores/` | 115 |
| `workspaceAuthStore.ts` | `src/platform/workspace/stores/` | — |
| `authTypes.ts` | `src/types/` | — |
| `signInSchema.ts` | `src/schemas/` | — |
| `useAuthActions.ts` | `src/composables/auth/` | — |
| `useCurrentUser.ts` | `src/composables/auth/` | — |
An existing `src/platform/auth/` directory exists but its relationship to the stores in `src/stores/` is unclear.
## Proposed Deepening
Consolidate all auth-related modules into `src/platform/auth/`:
```
platform/auth/
stores/authStore.ts
stores/apiKeyAuthStore.ts
composables/useAuthActions.ts
composables/useCurrentUser.ts
schemas/signInSchema.ts
types/authTypes.ts
```
The workspace-specific `workspaceAuthStore.ts` can remain in `platform/workspace/` as it's workspace-specific auth.
## Migration Plan
1. Single PR to move all files and update imports
2. No behavioral changes
## Testing Strategy
- `pnpm typecheck` and all tests pass (only import paths change)
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11065-RFC-Consolidate-auth-domain-into-platform-auth-33e6d73d3650810fa4b0d2535f2cd2a9) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.