Skip to content

Commit 427654c

Browse files
author
Diogo Ferraz
committed
refactor(core): remove legacy dummy services, reorganize navigation IA, and align project documentation with implemented architecture
1 parent c9908ad commit 427654c

14 files changed

Lines changed: 183 additions & 375 deletions

File tree

README.md

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,44 @@
11
# TaskManagementClient
22

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.2.11.
3+
Angular SPA for a Jira-style task management system, integrated with an existing .NET 8 backend.
44

5-
## Development server
5+
## Highlights
66

7-
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
7+
- OIDC authentication (Authorization Code + PKCE) against OpenIddict
8+
- Role-aware UX for `Administrator`, `ProjectManager`, and `User`
9+
- Real-time activity updates via SignalR
10+
- Project Kanban board with drag/drop and inline task editing
11+
- Dashboard, calendar, search/filters, admin tools, activity views, and settings
12+
- Preview mode support for frontend-only workflows
813

9-
## Code scaffolding
14+
## Tech Stack
1015

11-
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
16+
- Angular 18 (standalone components)
17+
- PrimeNG UI
18+
- RxJS
19+
- SignalR JavaScript client
1220

13-
## Build
21+
## Architecture
1422

15-
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
23+
- `src/app/core`: auth, api clients, config, layout, realtime, preferences
24+
- `src/app/features`: page-level feature components by domain
25+
- `src/app/shared`: shared module and reusable UI pieces
1626

17-
## Running unit tests
27+
The SPA is API-contract-first: typed DTOs and clients are aligned with backend endpoints.
1828

19-
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
29+
## Sidebar Information Architecture
2030

21-
## Running end-to-end tests
31+
- Overview: Dashboard
32+
- Workspaces: Projects, Project Details, Project Members, Kanban
33+
- Delivery: All Tasks, My Tasks, Create Task
34+
- Activity: My Activity, Activity Log, Calendar, Search & Filters
35+
- Account: Profile & Security, Settings
36+
- Administration: Admin Dashboard
37+
- About: Project Docs
2238

23-
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
39+
## Run
2440

25-
## Further help
26-
27-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
41+
- Install dependencies: `npm install`
42+
- Development server: `npm start`
43+
- Build: `npm run build`
44+
- Tests: `npm test`

docs/SPA_ARCHITECTURE_PLAN.md

Lines changed: 76 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,78 @@
11
# SPA Architecture Plan (Angular + .NET 8 API)
22

3-
## Architecture decisions
4-
- Use Angular standalone-first feature architecture (no new NgModules).
5-
- Keep clear boundaries: `core` (cross-cutting), `shared` (pure UI primitives), `features` (domain pages/use-cases).
6-
- Keep API contract strict by maintaining backend-aligned DTO/request models under `core/api/models`.
7-
- Use typed API clients per backend feature under `core/api/clients`.
8-
- Use route-level lazy loading for each feature page group.
9-
- Use Signals for local UI state and RxJS streams for async/server workflows.
10-
11-
## Proposed folder structure
12-
- `src/app/core/config`: environment/config injection tokens.
13-
- `src/app/core/auth`: OIDC PKCE flow, auth facade, role extraction.
14-
- `src/app/core/http`: interceptors (auth bearer, problem-details mapping, retry policy).
15-
- `src/app/core/api`: typed models + API clients (projects, taskitems, activity, dashboard, users).
16-
- `src/app/core/realtime`: SignalR clients and event mappers.
17-
- `src/app/features/dashboard`: dashboard shell + summary cards + activity feed.
18-
- `src/app/features/kanban`: project board, drag/drop interactions, task update workflows.
19-
- `src/app/features/search`: cross-entity filters/search views.
20-
- `src/app/shared/ui`: reusable presentational components (cards, chips, loaders, empty states).
21-
- `src/app/shared/utils`: pure helpers/formatters with tests.
22-
23-
## State strategy
24-
- Feature facades own page state and orchestration.
25-
- Keep state close to feature; avoid global store until needed.
26-
- Use explicit `load/error/empty` view models for each screen.
27-
- Use optimistic updates only where backend conflict risk is low; otherwise apply server-authoritative updates.
28-
29-
## Routing and authorization
30-
- Public routes: login + auth callback.
31-
- Protected routes: dashboard, board, search.
32-
- Route data declares required capabilities; guard checks token roles.
33-
- UI capability helpers control action visibility but API remains final authority.
34-
35-
## API contract alignment rules
36-
- No frontend-only enum/value inventions.
37-
- Patch payloads use omitted vs `null` semantics exactly as API contract defines.
38-
- Date query filters use ISO-8601 UTC.
39-
- ProblemDetails (`application/problem+json`) mapped to typed client errors.
40-
41-
## Planned commit slices
42-
1. Foundation: typed API models/clients + environment/config plumbing.
43-
2. Auth: OIDC code+PKCE login/callback/logout + auth guard/interceptor.
44-
3. Dashboard: server summary + activity history + SignalR live feed.
45-
4. Kanban read model: project selector + grouped task columns from API.
46-
5. Kanban mutations: patch task status/assignee/due date with optimistic UX safeguards.
47-
6. Search/filter page: users/projects/tasks filters + pagination.
48-
7. Quality pass: unit tests for core clients/facades + component tests for key flows.
49-
8. Cleanup pass: remove legacy dummy services/components and dead CSS.
50-
51-
## Backend gap found during alignment
52-
- `GET /api/projects/{id}` currently requires `CanManageProjects` policy, which excludes `User` role at authorization layer.
53-
- This appears to conflict with documented matrix intention where `User` should have scoped project read access.
3+
## Current architecture status
4+
- Angular standalone-first architecture is active (no feature NgModules used in runtime).
5+
- Clear boundaries are in place:
6+
- `core`: auth, api clients/models, config, layout, realtime, preferences.
7+
- `shared`: shared module + reusable cross-feature UI.
8+
- `features`: page-level domain slices.
9+
- API contracts are typed and aligned under `core/api/models` and consumed through `core/api/clients`.
10+
- RxJS is used for async/server orchestration; Signals/computed are used for local/session/preferences state.
11+
12+
## Implemented folder structure
13+
- `src/app/core/config`: app environment token + runtime config plumbing.
14+
- `src/app/core/auth`: OIDC PKCE auth service + guards (`auth`, `admin`, `managerOrAdmin`).
15+
- `src/app/core/http`: query param/url helpers and HTTP integration utilities.
16+
- `src/app/core/api`: typed DTOs + API clients (`projects`, `taskitems`, `activity`, `dashboard`, `users`).
17+
- `src/app/core/realtime`: SignalR hub integration for activity feed/log updates.
18+
- `src/app/core/preferences`: persisted app preferences service (density/date/notification/kanban defaults).
19+
- `src/app/features`: dashboard, projects, tasks, search, calendar, activity, profile, settings, docs, admin.
20+
21+
## Routing and authorization (implemented)
22+
- Public routes:
23+
- `/` (landing)
24+
- `/login`
25+
- `/callback`
26+
- Protected routes:
27+
- dashboard/workspaces/delivery/activity/account/about.
28+
- Role-restricted routes:
29+
- `/admin` -> `Administrator`.
30+
- `/activity/log` -> `Administrator` or `ProjectManager`.
31+
32+
## Sidebar information architecture (current)
33+
- Overview: Dashboard
34+
- Workspaces: All Projects, Project Details, Project Members, Create Project, Kanban
35+
- Delivery: All Tasks, My Tasks, Create Task
36+
- Activity: My Activity, Activity Log, Calendar, Search & Filters
37+
- Account: Profile & Security, Settings
38+
- Administration: Admin Dashboard
39+
- About: Project Docs
40+
41+
## Core feature status
42+
- Auth foundation:
43+
- OIDC Authorization Code + PKCE, callback handling, guarded routes.
44+
- Dashboard:
45+
- Summary KPIs + activity history + SignalR live updates + preview fallback.
46+
- Kanban:
47+
- Project picker, grouped status columns, drag/drop, create/edit dialogs, optimistic patch flows.
48+
- Search & filters:
49+
- Cross-entity filtering flows aligned with current API clients.
50+
- Project tools:
51+
- All Projects, Project Details, Project Members.
52+
- Task tools:
53+
- All Tasks, My Tasks, Create Task.
54+
- Activity tools:
55+
- My Activity (personal timeline) + Activity Log (admin/pm audit).
56+
- Account:
57+
- Profile & Security, Settings (persisted app preferences).
58+
59+
## Contract alignment rules (enforced)
60+
- Frontend uses backend enums/contracts from typed models (no ad-hoc enum invention).
61+
- Patch semantics preserve omitted vs `null` behavior.
62+
- Date values sent to API follow ISO conventions.
63+
- Problem Details responses are surfaced consistently at UI layer.
64+
65+
## Quality and cleanup status
66+
- Legacy scaffold artifacts removed:
67+
- unused dummy services (`ProjectService`, `TaskItemService`, `LoginService`) and associated specs.
68+
- empty unused feature modules (`projects.module.ts`, `task-item.module.ts`).
69+
- UI consistency pass completed across major pages:
70+
- header card + kpi cards + main content card patterns.
71+
- PrimeNG built-in table filter strategy on table-centric pages.
72+
73+
## Known backend/API gaps worth addressing
74+
- Activity endpoint filtering:
75+
- Current contract used by SPA does not expose server-side actor/type/date filters.
76+
- Activity Log currently applies these filters client-side after fetching feed data.
77+
- Authorization matrix check:
78+
- `GET /api/projects/{id}` policy should be verified against intended `User` read capabilities.

src/app/core/layout/component/app-menu/app-menu.component.ts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class AppMenuComponent {
2222
items: [{ label: 'Dashboard', icon: 'pi pi-fw pi-home', routerLink: ['/dashboard'] }]
2323
},
2424
{
25-
label: 'Projects',
25+
label: 'Workspaces',
2626
items: [
2727
{ label: 'All Projects', icon: 'pi pi-fw pi-list', routerLink: ['/projects'] },
2828
{ label: 'Project Details', icon: 'pi pi-fw pi-folder-open', routerLink: ['/projects/details'] },
@@ -32,22 +32,32 @@ export class AppMenuComponent {
3232
]
3333
},
3434
{
35-
label: 'Tasks',
35+
label: 'Delivery',
3636
items: [
3737
{ label: 'All Tasks', icon: 'pi pi-fw pi-list', routerLink: ['/tasks'] },
3838
{ label: 'My Tasks', icon: 'pi pi-fw pi-user', routerLink: ['/tasks/my-tasks'] },
3939
{ label: 'Create Task', icon: 'pi pi-fw pi-plus', routerLink: ['/tasks/create'] }
4040
]
4141
},
4242
{
43-
label: 'Insights',
43+
label: 'Activity',
4444
items: [
4545
{ label: 'My Activity', icon: 'pi pi-fw pi-history', routerLink: ['/activity/my'] },
4646
{ label: 'Activity Log', icon: 'pi pi-fw pi-database', routerLink: ['/activity/log'], visible: this.authService.hasAnyRole(['Administrator', 'ProjectManager']) },
47-
{ label: 'Settings', icon: 'pi pi-fw pi-cog', routerLink: ['/settings'] },
48-
{ label: 'Profile & Security', icon: 'pi pi-fw pi-user-edit', routerLink: ['/profile'] },
49-
{ label: 'Search & Filters', icon: 'pi pi-fw pi-search', routerLink: ['/search'] },
5047
{ label: 'Calendar', icon: 'pi pi-fw pi-calendar', routerLink: ['/calendar'] },
48+
{ label: 'Search & Filters', icon: 'pi pi-fw pi-search', routerLink: ['/search'] }
49+
]
50+
},
51+
{
52+
label: 'Account',
53+
items: [
54+
{ label: 'Profile & Security', icon: 'pi pi-fw pi-user-edit', routerLink: ['/profile'] },
55+
{ label: 'Settings', icon: 'pi pi-fw pi-cog', routerLink: ['/settings'] }
56+
]
57+
},
58+
{
59+
label: 'About',
60+
items: [
5161
{ label: 'Project Docs', icon: 'pi pi-fw pi-book', routerLink: ['/docs'] }
5262
]
5363
},

src/app/features/docs/components/project-docs/project-docs.component.html

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ <h2>Task Management Platform</h2>
1818
</div>
1919
</p-card>
2020

21-
<div class="docs-grid docs-grid--equal">
21+
<div class="docs-grid docs-grid--equal docs-grid--two">
2222
<p-card header="Project Purpose" styleClass="docs-card">
2323
<p>
2424
Build a practical collaboration workspace where teams can plan, execute, and track work using boards,
@@ -44,7 +44,7 @@ <h2>Task Management Platform</h2>
4444
</p-card>
4545
</div>
4646

47-
<div class="docs-grid docs-grid--equal">
47+
<div class="docs-grid docs-grid--equal docs-grid--three">
4848
<p-card header="Tech Stack" styleClass="docs-card">
4949
<ul class="docs-list">
5050
<li *ngFor="let item of techStack">{{ item }}</li>
@@ -63,4 +63,24 @@ <h2>Task Management Platform</h2>
6363
</ul>
6464
</p-card>
6565
</div>
66+
67+
<div class="docs-grid docs-grid--equal docs-grid--three">
68+
<p-card header="Navigation Information Architecture" styleClass="docs-card">
69+
<ul class="docs-list">
70+
<li *ngFor="let item of navigationGroups">{{ item }}</li>
71+
</ul>
72+
</p-card>
73+
74+
<p-card header="Engineering Standards" styleClass="docs-card">
75+
<ul class="docs-list">
76+
<li *ngFor="let item of engineeringStandards">{{ item }}</li>
77+
</ul>
78+
</p-card>
79+
80+
<p-card header="Quality & Delivery" styleClass="docs-card">
81+
<ul class="docs-list">
82+
<li *ngFor="let item of qualityAndDelivery">{{ item }}</li>
83+
</ul>
84+
</p-card>
85+
</div>
6686
</section>

src/app/features/docs/components/project-docs/project-docs.component.scss

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,11 @@
5858
display: block;
5959
}
6060

61-
.docs-grid.docs-grid--equal p-card:first-child,
62-
.docs-grid.docs-grid--equal p-card:nth-child(2) {
61+
.docs-grid.docs-grid--two p-card {
6362
grid-column: span 6;
6463
}
6564

66-
.docs-grid.docs-grid--equal:last-of-type p-card {
65+
.docs-grid.docs-grid--three p-card {
6766
grid-column: span 4;
6867
}
6968

@@ -99,7 +98,7 @@
9998
}
10099

101100
@media (max-width: 1200px) {
102-
.docs-grid.docs-grid--equal:last-of-type p-card {
101+
.docs-grid.docs-grid--three p-card {
103102
grid-column: span 6;
104103
}
105104
}
@@ -114,9 +113,8 @@
114113
gap: 1rem;
115114
}
116115

117-
.docs-grid.docs-grid--equal p-card:first-child,
118-
.docs-grid.docs-grid--equal p-card:nth-child(2),
119-
.docs-grid.docs-grid--equal:last-of-type p-card {
116+
.docs-grid.docs-grid--two p-card,
117+
.docs-grid.docs-grid--three p-card {
120118
grid-column: auto;
121119
}
122120
}

src/app/features/docs/components/project-docs/project-docs.component.ts

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ export class ProjectDocsComponent {
2121

2222
readonly highlights = [
2323
'Role-aware UI for Administrator / ProjectManager / User',
24-
'Dashboard with summary counters and live feed',
25-
'Kanban board with patch-based optimistic updates',
26-
'Search & filtering across projects, users, and tasks'
24+
'Dashboard with summary counters and real-time activity',
25+
'Jira-style Kanban board with drag/drop and inline task editing',
26+
'Project details, project members, and task calendar',
27+
'Activity views: My Activity and Admin/PM Activity Log',
28+
'Admin dashboard with user activation and CSV export',
29+
'Settings page with persisted app preferences'
2730
];
2831

2932
readonly principles = [
@@ -32,4 +35,31 @@ export class ProjectDocsComponent {
3235
'Resilient UX by default: loading, empty, and degraded states are always visible.',
3336
'Incremental delivery through focused commits and maintainable architecture.'
3437
];
38+
39+
readonly navigationGroups = [
40+
'Overview: Dashboard',
41+
'Workspaces: Projects, Project Details, Project Members, Kanban',
42+
'Delivery: All Tasks, My Tasks, Create Task',
43+
'Activity: My Activity, Activity Log, Calendar, Search & Filters',
44+
'Account: Profile & Security, Settings',
45+
'Administration: Admin Dashboard',
46+
'About: Project Docs'
47+
];
48+
49+
readonly engineeringStandards = [
50+
'Typed API client boundary under core/api with explicit DTO contracts.',
51+
'Role-aware routing and UI behavior for Administrator, ProjectManager, and User.',
52+
'OIDC Authorization Code + PKCE flow with guarded routes and secure callbacks.',
53+
'SignalR event ingestion for real-time activity without polling fallback.',
54+
'Problem Details-aligned error surfaces and resilient loading/empty/degraded states.',
55+
'Consistent PrimeNG-based component strategy for long-term maintainability.'
56+
];
57+
58+
readonly qualityAndDelivery = [
59+
'Incremental feature delivery with focused commit scopes and page-by-page hardening.',
60+
'Standalone Angular feature components organized by domain responsibility.',
61+
'Preview mode enables frontend validation while preserving production auth constraints.',
62+
'Responsive behavior is considered first-class across dashboard, kanban, tables, and forms.',
63+
'Build/test verification executed before closing implementation steps.'
64+
];
3565
}

src/app/features/login/services/login.service.spec.ts

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

src/app/features/login/services/login.service.ts

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

0 commit comments

Comments
 (0)