Skip to content

Commit 608fdcd

Browse files
committed
chore(indexes): added indexes to all files
1 parent b59955f commit 608fdcd

8 files changed

Lines changed: 138 additions & 18 deletions

File tree

docs/admin.knowledge-base.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
# Admin Knowledge Base
22

3+
## Index
4+
5+
- [Overview](#overview)
6+
- [All things GitHub](#all-things-github)
7+
8+
---
9+
10+
## Overview
11+
312
Information on updates that require admin permissions
413

14+
---
15+
516
## All things GitHub
617

718
### GitHub pipeline
@@ -16,6 +27,8 @@ The `.github` folder contains the following:
1627
.github/workflows
1728
4. The GitHub PR templates
1829
.github/pull_request_template.md
30+
5. The backup json for the settings/rules
31+
.github/rules
1932

2033
### Local pipeline
2134

docs/commit.template.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## 📝 Enabling the Shared Commit Template
22

3+
## Overview
4+
35
This project includes a Git commit message template stored at:
46

57
```

docs/compodoc.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Angular Documentation with Compodoc
22

3+
## Index
4+
5+
- [Overview](#overview)
6+
- [How to Generate Documentation](#how-to-generate-documentation)
7+
- [Documentation Coverage Requirements](#documentation-coverage-requirements)
8+
- [Pre-commit Enforcement via Husky](#pre-commit-enforcement-via-husky)
9+
- [CI/CD Enforcement](#cicd-enforcement)
10+
- [Tips for Passing Coverage](#tips-for-passing-coverage)
11+
- [Output Directory](#output-directory)
12+
- [Need Help?](#need-help)
13+
14+
---
15+
16+
## Overview
17+
318
This project uses [Compodoc](https://compodoc.app/) to generate and enforce documentation for all Angular code. Documentation is mandatory and must meet a **100% coverage threshold** to ensure consistent API clarity across the codebase.
419

520
---

docs/docker.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Docker
22

3+
## Index
4+
5+
- [Overview](#overview)
6+
- [Docker Commands](#docker-commands)
7+
- [Troubleshooting](#troubleshooting)
8+
9+
---
10+
11+
## Overview
12+
313
The OSF angular project uses a docker image to simplify the developer process.
414

515
### Volumes
@@ -33,6 +43,8 @@ If you don’t see the site, ensure the start script includes:
3343
"start": "ng serve --host 0.0.0.0 --port 4200 --poll 2000"
3444
```
3545

46+
---
47+
3648
## Docker Commands
3749

3850
### build + run in background (build is only required for the initial install or npm updates)
@@ -105,6 +117,8 @@ docker rmi <image_name>:<tag>
105117
docker rmi -f <IMAGE_ID>
106118
```
107119

120+
---
121+
108122
## Troubleshooting
109123

110124
If the application does not open in your browser at [http://localhost:4200](http://localhost:4200), follow these steps in order:

docs/eslint.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Linting Strategy – OSF Angular
22

3+
## Index
4+
5+
- [Overview](#overview)
6+
- [Linting Commands](#linting-commands)
7+
- [ESLint Config Structure](#eslint-config-structure)
8+
- [Pre-Commit Hook](#pre-commit-hook)
9+
- [Summary](#summary)
10+
311
---
412

513
## Overview

docs/git-convention.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
# CommitLint and Git Branch Naming Convention (Aligned with Angular Guideline)
22

3+
## Index
4+
5+
- [Overview](#overview)
6+
- [Local pipeline](#local-pipeline)
7+
- [Contributing Workflow](#contributing-workflow)
8+
- [Commitlint](#commitlint)
9+
- [Branch Naming Format](#branch-naming-format)
10+
11+
---
12+
13+
## Overview
14+
315
To maintain a clean, structured commit history and optimize team collaboration, we adhere to the Angular Conventional Commits standard for both commit messages and Git branch naming. This ensures every change type is immediately recognizable and supports automation for changelog generation, semantic versioning, and streamlined release processes.
416

517
In addition, we enforce these standards using CommitLint, ensuring that all commit messages conform to the defined rules before they are accepted into the repository.
618

719
This project employs both GitHub Actions and a local pre-commit pipeline to validate commit messages, enforce branch naming conventions, and maintain repository integrity throughout the development workflow.
820

21+
---
22+
923
## Local pipeline
1024

1125
The local pipeline is managed via husky
@@ -16,6 +30,8 @@ The local pipeline is managed via husky
1630
- All tests pass
1731
- Test coverage is met
1832

33+
---
34+
1935
## Contributing Workflow
2036

2137
To contribute to this repository, follow these steps:
@@ -69,6 +85,8 @@ This workflow ensures that:
6985

7086
For a step-by-step guide on forking and creating pull requests, see [GitHub’s documentation on forks](https://docs.github.com/en/get-started/quickstart/fork-a-repo) and [about pull requests](https://docs.github.com/en/pull-requests).
7187

88+
---
89+
7290
## Commitlint
7391

7492
OSF uses [Commitlint](https://www.npmjs.com/package/commitlint) to **enforce a consistent commit message format**.
@@ -156,10 +174,10 @@ update stuff
156174
Refs #456
157175
```
158176

159-
---
160-
161177
Commitlint will run automatically and reject non-compliant messages.
162178

179+
---
180+
163181
## Branch Naming Format
164182

165183
### The branch name should follow the format:
@@ -175,10 +193,14 @@ short-description – a brief description of the change.
175193

176194
```
177195

196+
---
197+
178198
## Available Types (type)
179199

180200
See the [Allowed Commit Types](#allowed-commit-types) section for details.
181201

202+
---
203+
182204
## Branch Naming Examples
183205

184206
### Here are some examples of branch names:

docs/ngxs.md

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
# NGXS State Management Overview
1+
# NGXS State Management
2+
3+
## Index
4+
5+
- [Purpose](#purpose)
6+
- [Core Concepts](#core-concepts)
7+
- [Directory Structure](#directory-structure)
8+
- [State Models](#state-models)
9+
- [Tooling and Extensions](#tooling-and-extensions)
10+
- [Testing](#testing)
11+
- [Documentation](#documentation)
12+
13+
---
14+
15+
## Overview
216

317
The OSF Angular project uses [NGXS](https://www.ngxs.io/) as the state management library for Angular applications. NGXS provides a simple, powerful, and TypeScript-friendly framework for managing state across components and services.
418

@@ -45,6 +59,33 @@ src/app/shared/services/
4559

4660
---
4761

62+
## State Models
63+
64+
The OSF Angular project follows a consistent NGXS state model structure to ensure clarity, predictability, and alignment across all features. The recommended shape for each domain-specific state is as follows:
65+
66+
1. Domain state pattern:
67+
68+
```ts
69+
domain: {
70+
data: [], // Array of typed model data (e.g., Project[], User[])
71+
isLoading: false, // Indicates if data retrieval (GET) is in progress
72+
isSubmitting: false, // Indicates if data submission (POST/PUT/DELETE) is in progress
73+
error: null, // Captures error messages from failed HTTP requests
74+
}
75+
```
76+
77+
2. `data` holds the strongly typed collection of entities defined by the feature's interface or model class.
78+
79+
3. `isLoading` is a signal used to inform the component and template layer that a read or fetch operation is currently pending.
80+
81+
4. `isSubmitting` signals that a write operation (form submission, update, delete, etc.) is currently in progress.
82+
83+
5. `error` stores error state information (commonly strings or structured error objects) that result from failed service interactions. This can be displayed in UI or logged for debugging.
84+
85+
Each domain state should be minimal, normalized, and scoped to its specific feature, mirroring the structure and shape of the corresponding OSF backend API response.
86+
87+
---
88+
4889
## Tooling and Extensions
4990

5091
- [Redux DevTools](https://github.com/zalmoxisus/redux-devtools-extension) is supported. Enable it in development via `NgxsReduxDevtoolsPluginModule`.
@@ -55,7 +96,8 @@ src/app/shared/services/
5596

5697
## Testing
5798

58-
- Mock `Store` using `jest.fn()` or test-specific modules for unit testing components and services.
99+
- [Testing Strategy](docs/testing.md)
100+
- [NGXS State Testing Strategy](docs/testing.md#ngxs-state-testing-strategy)
59101

60102
---
61103

docs/testing.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# OSF Angular Testing Strategy
22

3+
## Index
4+
5+
- [Overview](#overview)
6+
- [Pro-tips](#pro-tips)
7+
- [Best Practices](#best-practices)
8+
- [Summary Table](#summary-table)
9+
- [Test Coverage Enforcement (100%)](#test-coverage-enforcement-100)
10+
- [Key Structure](#key-structure)
11+
- [Testing Angular Services (with HTTP)](#testing-angular-services-with-http)
12+
- [Testing Angular Components](#testing-angular-components)
13+
- [Testing Angular Pipes](#testing-angular-pipes)
14+
- [Testing Angular Directives](#testing-angular-directives)
15+
- [Testing Angular NGXS](#testing-ngxs)
16+
17+
---
18+
319
## Overview
420

521
The OSF Angular project uses a modular and mock-driven testing strategy. A shared `testing/` folder provides reusable mocks, mock data, and testing module configuration to support consistent and maintainable unit tests across the codebase.
@@ -29,20 +45,6 @@ The OSF Angular project defines a `@testing` scope that can be used for importin
2945

3046
---
3147

32-
## Index
33-
34-
- [Best Practices](#best-practices)
35-
- [Summary Table](#summary-table)
36-
- [Test Coverage Enforcement (100%)](#test-coverage-enforcement-100)
37-
- [Key Structure](#key-structure)
38-
- [Testing Angular Services (with HTTP)](#testing-angular-services-with-http)
39-
- [Testing Angular Components](#testing-angular-components)
40-
- [Testing Angular Pipes](#testing-angular-pipes)
41-
- [Testing Angular Directives](#testing-angular-directives)
42-
- [Testing Angular NGXS](#testing-ngxs)
43-
44-
--
45-
4648
## Best Practices
4749

4850
- Always import `OsfTestingModule` or `OsfTestingStoreModule` to minimize boilerplate and get consistent mock behavior.
@@ -114,6 +116,8 @@ This guarantees **test integrity in CI** and **prevents regressions**.
114116
- **Push blocked** without passing 100% tests.
115117
- GitHub CI double-checks every PR.
116118

119+
---
120+
117121
## Key Structure
118122

119123
### `src/testing/osf.testing.module.ts`

0 commit comments

Comments
 (0)