Skip to content

Commit 583f2ba

Browse files
asithadeclaude
andauthored
feat: added committee management and mock services (#6)
* docs: update header checks Signed-off-by: Asitha de Silva <asithade@gmail.com> * feat: add committee and committee member CRUD operations Implements complete CRUD operations for committees and committee members including: - Committee dashboard with search, filtering, and pagination - Committee view page with member management table - Add/edit forms for both committees and members - Member role and voting status management - API integration with member count calculations Note: Supabase and Google Cloud services are temporary mock implementations and will be replaced with production APIs in the future. Generated with [Claude Code](https://claude.ai/code) Signed-off-by: Asitha de Silva <asithade@gmail.com> * refactor: extract date formatting logic to shared utilities - Created formatDateToISOString and parseISODateString utilities in shared package - Replaced duplicated toISOString().split('T')[0] logic in MemberFormComponent - Improved code maintainability and reduced duplication - Added proper TypeScript types for date utilities Generated with [Claude Code](https://claude.ai/code) Signed-off-by: Asitha de Silva <asithade@gmail.com> * docs: added license docs Signed-off-by: Asitha de Silva <asithade@gmail.com> * docs: add environment setup documentation and template - Add .env.example file with all required environment variables - Update README with comprehensive environment setup instructions - Document Auth0, Supabase, and microservice configuration - Add prerequisites and step-by-step setup guide Generated with [Claude Code](https://claude.ai/code) Signed-off-by: Asitha de Silva <asithade@gmail.com> * docs: consolidate deployment documentation - Remove duplicate docs/architecture/backend/deployment.md - Update references to point to main docs/deployment.md - Consolidate PM2 configuration and deployment info in single location - Fix deployment commands to match actual package.json scripts Generated with [Claude Code](https://claude.ai/code) Signed-off-by: Asitha de Silva <asithade@gmail.com> * feat: add committee names pipe and refactor home component structure - Create CommitteeNamesPipe for displaying committee names in tooltips - Refactor home component to follow standardized class variable initialization pattern - Add ProjectCard interface and update project card component to use proper typing - Update user permissions table to use the new pipe instead of component method - Enhance project layout and committee view components with improved UI structure - Add permissions service and related interfaces for user permissions management - Update Tailwind configuration and deployment scripts 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Asitha de Silva <asithade@gmail.com> --------- Signed-off-by: Asitha de Silva <asithade@gmail.com> Co-authored-by: Claude <noreply@anthropic.com>
1 parent 09c38af commit 583f2ba

File tree

98 files changed

+5081
-670
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+5081
-670
lines changed

.dockerignore

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Node.js
2+
node_modules
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
7+
# Build outputs
8+
**/dist
9+
**/build
10+
**/.next
11+
**/.turbo
12+
**/node_modules
13+
**/.angular
14+
15+
# Development files - IMPORTANT: Exclude all .env files
16+
.env*
17+
.env
18+
.env.*
19+
.env.local
20+
.env.*.local
21+
.env.development
22+
.env.production
23+
.env.test
24+
**/.env
25+
**/.env.*
26+
27+
# IDE
28+
.vscode
29+
.idea
30+
*.swp
31+
*.swo
32+
33+
# OS
34+
.DS_Store
35+
.DS_Store?
36+
._*
37+
.Spotlight-V100
38+
.Trashes
39+
ehthumbs.db
40+
Thumbs.db
41+
42+
# Git
43+
.git
44+
.gitignore
45+
46+
# Testing
47+
coverage
48+
.nyc_output
49+
50+
# Logs
51+
logs
52+
*.log
53+
54+
# Documentation
55+
*.md
56+
docs
57+
58+
# Firebase
59+
firebase-debug.log
60+
firebase-debug.*.log
61+
.firebaserc
62+
firebase.json
63+
apphosting.yaml
64+
65+
# Temporary files
66+
tmp
67+
temp

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"PostgreSQL",
77
"PostgREST",
88
"primeng",
9+
"supabase",
910
"Turborepo"
1011
],
1112
"editor.formatOnSave": true,

CLAUDE.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
1414
### 🚀 Development Patterns
1515

1616
- [Angular 19 Development Patterns](#angular-19-development-patterns) - Zoneless change detection, signals, components
17+
- [Component Organization Pattern](#component-organization-pattern) - Standardized component structure
1718
- [Shared Package (@lfx-pcc/shared)](#shared-package-lfx-pccshared) - Types, interfaces, constants
1819
- [PrimeNG Component Wrappers](#primeng-component-wrappers) - UI library abstraction
1920
- [Path Mappings](#path-mappings) - Import aliases and conventions
@@ -82,6 +83,84 @@ lfx-pcc-v3/
8283

8384
[... rest of the existing content remains unchanged ...]
8485

86+
## Component Organization Pattern
87+
88+
All Angular components should follow this standardized organization pattern for consistency and maintainability:
89+
90+
### Structure Overview
91+
92+
```typescript
93+
export class ComponentName {
94+
// 1. Injected services (readonly)
95+
private readonly serviceOne = inject(ServiceOne);
96+
private readonly serviceTwo = inject(ServiceTwo);
97+
98+
// 2. Class variables with explicit types
99+
private dialogRef: DialogRef | undefined;
100+
public someSignal: WritableSignal<Type>;
101+
public someComputed: Signal<Type>;
102+
public someForm: FormGroup;
103+
public someArray: Type[];
104+
105+
constructor() {
106+
// 3. Initialize all class variables by calling private methods
107+
this.someSignal = signal<Type>(initialValue);
108+
this.someComputed = this.initializeSomeComputed();
109+
this.someForm = this.initializeSomeForm();
110+
this.someArray = this.initializeSomeArray();
111+
}
112+
113+
// 4. Public methods (lifecycle, event handlers, etc.)
114+
public onSomeEvent(): void {}
115+
public somePublicMethod(): void {}
116+
117+
// 5. Private methods (business logic)
118+
private somePrivateMethod(): void {}
119+
private handleSomeAction(): void {}
120+
121+
// 6. Private initialization methods (at the end of class)
122+
private initializeSomeComputed(): Signal<Type> {
123+
return computed(() => {
124+
/* logic */
125+
});
126+
}
127+
128+
private initializeSomeForm(): FormGroup {
129+
return new FormGroup({
130+
/* controls */
131+
});
132+
}
133+
134+
private initializeSomeArray(): Type[] {
135+
return [
136+
/* initial values */
137+
];
138+
}
139+
}
140+
```
141+
142+
### Key Benefits
143+
144+
- **Clear variable declarations** with types at the top
145+
- **Organized constructor** that only handles initialization calls
146+
- **Separation of concerns** between declaration and initialization
147+
- **Improved readability** and maintainability
148+
- **Better testability** with isolated initialization methods
149+
- **Consistent code structure** across the entire application
150+
151+
### Implementation Rules
152+
153+
1. **Always declare variables with explicit types** before constructor
154+
2. **Use constructor only for initialization** - no complex logic
155+
3. **Create private initialization methods** for complex setup
156+
4. **Group related variables together** (signals, forms, arrays, etc.)
157+
5. **Place initialization methods at the end** of the class
158+
6. **Use descriptive method names** like `initializeSearchForm()`
159+
160+
### Example: Committee Dashboard
161+
162+
See `apps/lfx-pcc/src/app/modules/project/components/committee-dashboard/committee-dashboard.component.ts` for a complete implementation following this pattern.
163+
85164
## Development Memories
86165

87166
- Always reference PrimeNG's component interface when trying to define types
@@ -96,3 +175,7 @@ lfx-pcc-v3/
96175
- Use TypeScript interfaces instead of union types for better maintainability
97176
- Shared package uses direct source imports during development for hot reloading
98177
- **Interfaces go into the shared packages**
178+
- **License headers are required on all source files** - run `./check-headers.sh` to verify
179+
- **Pre-commit hooks enforce license headers** - commits will fail without proper headers
180+
- Always run yarn format from the root of the project to ensure formatting is done after you have made all your changes
181+
- Always preprend "Generated with [Claude Code](https://claude.ai/code)" if you assisted with the code

CONTRIBUTING.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
# Copyright The Linux Foundation and each contributor to LFX.
2-
3-
# SPDX-License-Identifier: MIT
1+
# Contributing to LFX Project Control Center
42

5-
# Contributing to LFX PCC
3+
Contributions are what make the open-source community such an amazing place to learn, inspire, and create.
64

75
Thank you for your interest in contributing to LFX PCC! This document provides guidelines and instructions for contributing to the project.
86

@@ -42,7 +40,7 @@ Please refer to the [README.md](README.md) for detailed setup instructions.
4240

4341
The license header must appear in the first 4 lines of every source file and must contain the exact text:
4442

45-
```
43+
```text
4644
Copyright The Linux Foundation and each contributor to LFX.
4745
SPDX-License-Identifier: MIT
4846
```
@@ -147,7 +145,7 @@ yarn format
147145

148146
Follow the conventional commit format:
149147

150-
```
148+
```text
151149
type(scope): subject
152150
153151
body
@@ -167,7 +165,7 @@ footer
167165

168166
### Examples
169167

170-
```
168+
```text
171169
feat(auth): add Auth0 integration
172170
173171
Implemented Auth0 authentication using express-openid-connect
@@ -199,7 +197,7 @@ This adds a `Signed-off-by` line to your commit message.
199197

200198
Use the same conventional commit format for PR titles:
201199

202-
```
200+
```text
203201
feat(component): add new table component
204202
```
205203

Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright The Linux Foundation and each contributor to LFX.
2+
# SPDX-License-Identifier: MIT
3+
4+
# Build stage
5+
FROM node:22-alpine AS builder
6+
7+
# Set build environment
8+
ARG BUILD_ENV=production
9+
10+
# Enable Corepack for Yarn
11+
RUN corepack enable
12+
13+
WORKDIR /app
14+
15+
# Copy source code
16+
COPY . .
17+
18+
# Install dependencies
19+
RUN yarn install --immutable
20+
21+
# Build the application
22+
RUN yarn build
23+
24+
# Expose port 4200
25+
EXPOSE 4200
26+
27+
# Start the SSR server
28+
CMD ["yarn", "start:server"]

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Linux Foundation
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)