Skip to content

Commit 5f35262

Browse files
committed
refactor(reports): reorganize health report generation and update paths for automated reports
1 parent 7653cbd commit 5f35262

18 files changed

+479
-99
lines changed

.github/workflows/realtime-status-dashboard.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ on:
1111
branches: [main, develop]
1212
schedule:
1313
# Update status twice daily during business hours (9 AM and 5 PM UTC)
14-
- cron: '0 9,17 * * 1-5'
14+
- cron: "0 9,17 * * 1-5"
1515
workflow_dispatch:
1616

1717
env:
18-
NODE_VERSION: '20'
18+
NODE_VERSION: "20"
1919

2020
jobs:
2121
# Real-time status collection
@@ -211,7 +211,7 @@ jobs:
211211
- [📚 Documentation](./frontend/docs/)
212212
- [🔒 Security Architecture](./frontend/docs/security-architecture.md)
213213
- [🚀 CI/CD Pipeline](https://github.com/${{ github.repository }}/actions)
214-
- [📝 Health Report](./reports/health-report.md)
214+
- [📝 Health Report](./reports/automated/health-report.md)
215215
216216
## 📋 Service Level Objectives (SLOs)
217217

.github/workflows/repository-health-monitor.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ name: 📊 Repository Health Monitor
33
on:
44
schedule:
55
# Run daily at 6 AM UTC
6-
- cron: '0 6 * * *'
6+
- cron: "0 6 * * *"
77
workflow_dispatch:
88
push:
99
branches: [main]
1010
paths:
11-
- 'package.json'
12-
- 'package-lock.json'
13-
- '.github/workflows/**'
11+
- "package.json"
12+
- "package-lock.json"
13+
- ".github/workflows/**"
1414

1515
env:
16-
NODE_VERSION: '20'
16+
NODE_VERSION: "20"
1717

1818
jobs:
1919
# Health check and metrics collection
@@ -33,7 +33,7 @@ jobs:
3333
uses: actions/setup-node@v4
3434
with:
3535
node-version: ${{ env.NODE_VERSION }}
36-
cache: 'npm'
36+
cache: "npm"
3737

3838
- name: Install dependencies
3939
run: |
@@ -189,7 +189,7 @@ jobs:
189189
uses: actions/setup-node@v4
190190
with:
191191
node-version: ${{ env.NODE_VERSION }}
192-
cache: 'npm'
192+
cache: "npm"
193193

194194
- name: Install dependencies
195195
run: |
@@ -313,7 +313,7 @@ jobs:
313313
uses: actions/setup-node@v4
314314
with:
315315
node-version: ${{ env.NODE_VERSION }}
316-
cache: 'npm'
316+
cache: "npm"
317317

318318
- name: Check dependency health
319319
id: deps
@@ -498,7 +498,7 @@ jobs:
498498
mkdir -p reports
499499
500500
# Create health report
501-
cat > reports/health-report.md << EOF
501+
cat > reports/automated/health-report.md << EOF
502502
# 📊 Repository Health Report
503503
504504
**Generated:** $(date -u)
@@ -533,22 +533,22 @@ jobs:
533533
534534
# Add action items based on status
535535
if [[ "${{ needs.dependency-health.outputs.health-status }}" != "healthy" ]]; then
536-
echo "- 📦 Address dependency issues (outdated: ${{ needs.dependency-health.outputs.outdated-count }})" >> reports/health-report.md
536+
echo "- 📦 Address dependency issues (outdated: ${{ needs.dependency-health.outputs.outdated-count }})" >> reports/automated/health-report.md
537537
fi
538538
539539
if [[ "${{ needs.documentation-health.outputs.coverage-score }}" -lt 90 ]]; then
540-
echo "- 📚 Improve documentation coverage (missing: ${{ needs.documentation-health.outputs.missing-docs }})" >> reports/health-report.md
540+
echo "- 📚 Improve documentation coverage (missing: ${{ needs.documentation-health.outputs.missing-docs }})" >> reports/automated/health-report.md
541541
fi
542542
543543
if [[ "${{ needs.performance-monitor.outputs.performance-score }}" -lt 80 ]]; then
544-
echo "- ⚡ Optimize performance (bundle size, code splitting)" >> reports/health-report.md
544+
echo "- ⚡ Optimize performance (bundle size, code splitting)" >> reports/automated/health-report.md
545545
fi
546546
547-
echo "" >> reports/health-report.md
548-
echo "### 🔗 Quick Links" >> reports/health-report.md
549-
echo "- [Security Architecture](./docs/security-architecture.md)" >> reports/health-report.md
550-
echo "- [Website Overview](./docs/website-overview.md)" >> reports/health-report.md
551-
echo "- [GitHub Actions](https://github.com/${{ github.repository }}/actions)" >> reports/health-report.md
547+
echo "" >> reports/automated/health-report.md
548+
echo "### 🔗 Quick Links" >> reports/automated/health-report.md
549+
echo "- [Security Architecture](./docs/security-architecture.md)" >> reports/automated/health-report.md
550+
echo "- [Website Overview](./docs/website-overview.md)" >> reports/automated/health-report.md
551+
echo "- [GitHub Actions](https://github.com/${{ github.repository }}/actions)" >> reports/automated/health-report.md
552552
553553
- name: Commit status updates
554554
run: |
@@ -564,7 +564,7 @@ jobs:
564564
if [ -z "$last_health_commit" ]; then
565565
echo "Creating daily health report update"
566566
git add reports/
567-
git add -f reports/health-report.md
567+
git add -f reports/automated/health-report.md
568568
git commit -m "📊 Update repository health status and metrics [skip ci]"
569569
git push
570570
else
@@ -585,6 +585,6 @@ jobs:
585585
echo "| Documentation | ${{ needs.documentation-health.outputs.coverage-score }}/100 | $([ ${{ needs.documentation-health.outputs.coverage-score }} -ge 90 ] && echo '✅ Complete' || echo '⚠️ Incomplete') |" >> $GITHUB_STEP_SUMMARY
586586
echo "" >> $GITHUB_STEP_SUMMARY
587587
echo "### 🔗 Resources" >> $GITHUB_STEP_SUMMARY
588-
echo "- [Health Report](./reports/health-report.md)" >> $GITHUB_STEP_SUMMARY
588+
echo "- [Health Report](./reports/automated/health-report.md)" >> $GITHUB_STEP_SUMMARY
589589
echo "- [Live Website](https://www.thinkred.tech)" >> $GITHUB_STEP_SUMMARY
590590
echo "- [Documentation](./docs/)" >> $GITHUB_STEP_SUMMARY

.gitignore

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@ node_modules/
55
**/node_modules/
66
/.pnp
77
.pnp.js
8-
package-lock.json
8+
# Package lock files should be committed for consistency
9+
# package-lock.json is now tracked for dependency consistency
910

1011
# testing
1112
/coverage
1213
**/coverage/
1314

14-
# production
15+
# production build outputs (generated by build process)
1516
build/
1617
**/build/
17-
hostinger-deploy/
18+
frontend/dist/
19+
**/frontend/dist/
20+
frontend/hostinger-deploy/
1821
**/hostinger-deploy/
1922
thinkred-website.zip
2023
**/thinkred-website.zip
21-
# Keep dist/ for potential future use or other build tools
22-
dist/
23-
**/dist/
2424

2525
# Build artifacts and source maps
2626
*.map
@@ -34,15 +34,15 @@ dist/
3434
*.bundle.css
3535
**/*.bundle.css
3636

37-
# Automated reports and status files (generated, not tracked)
38-
**/automated/health-report.md
39-
**/automated/status-dashboard.md
40-
scripts/reports/automated/
41-
reports/automated/*.md
37+
# Automated reports directory (generated content only)
4238
reports/automated/
4339
!reports/automated/.gitkeep
40+
!reports/automated/README.md
4441
!reports/automated/templates/
4542

43+
# Manual reports in incidents/, operational/, security/ should be tracked
44+
# Only ignore reports that are clearly in the wrong location (root reports/ dir)
45+
4646
# Vite build cache and temp files
4747
.vite/
4848
**/.vite/
@@ -136,8 +136,3 @@ coverage/
136136

137137
# Deployment configuration backups
138138
.deployment-config.json.backup*
139-
140-
# Auto-generated reports (keep directory structure, ignore generated files)
141-
# Note: Workflows may force-add specific reports using git add -f
142-
reports/*.md
143-
!reports/README.md

config/.markdownlint.json

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

config/.prettierignore

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,32 @@
1+
# Build outputs and generated files
12
build/
3+
frontend/dist/
24
node_modules/
3-
*.md
4-
*.json
5-
.env
6-
.env.local
7-
.env.development.local
8-
.env.test.local
9-
.env.production.local
105
coverage/
6+
7+
# Package and lock files
118
package-lock.json
9+
*.tgz
10+
11+
# Environment files
12+
.env*
13+
14+
# Generated reports (formatted manually)
15+
reports/automated/
16+
reports/automated/health-report.md
17+
reports/*-fix-*.md
18+
19+
# Asset files (non-text)
1220
*.svg
1321
*.png
1422
*.jpg
1523
*.jpeg
1624
*.gif
1725
*.ico
26+
*.woff
27+
*.woff2
28+
*.ttf
29+
*.eot
30+
31+
# Configuration that shouldn't be formatted
32+
.clasp.json

config/.prettierrc.json

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

docs/CONFIGURATION.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Configuration Files Documentation
2+
3+
This document explains the purpose and usage of configuration files in the ThinkRED monorepo.
4+
5+
## 📁 Root Configuration Files
6+
7+
### `.gitignore`
8+
**Purpose**: Specifies which files and directories Git should ignore
9+
**Updated**: June 30, 2025
10+
**Key Features**:
11+
- ✅ Tracks `package-lock.json` for dependency consistency
12+
- ✅ Completely ignores all build outputs (`build/`, `frontend/dist/`)
13+
- ✅ Properly organizes reports: tracks incidents/operational/security, ignores automated
14+
- ✅ Proper environment file exclusions
15+
- ✅ Security-sensitive files excluded
16+
- ✅ Clean report organization with appropriate directory structure
17+
18+
### `.prettierrc.json`
19+
**Purpose**: Code formatting configuration for Prettier
20+
**Settings**:
21+
- Print width: 120 characters (standard code), 100 (markdown)
22+
- Tab width: 2 spaces
23+
- Single quotes, trailing commas (ES5)
24+
- LF line endings for cross-platform compatibility
25+
26+
### `.prettierignore`
27+
**Purpose**: Files and directories Prettier should not format
28+
**Updated**: June 30, 2025
29+
**Excludes**:
30+
- Build outputs and generated files
31+
- Asset files (images, fonts)
32+
- Package lock files
33+
- Environment files
34+
- Generated reports
35+
36+
### `.markdownlint.json`
37+
**Purpose**: Markdown linting rules configuration
38+
**Settings**:
39+
- Line length: 150 characters (accommodates technical documentation)
40+
- Disabled strict heading rules for flexibility
41+
- Enabled whitespace and blank line rules
42+
43+
## 📁 Backend Configuration
44+
45+
### `backend/.gitignore`
46+
**Purpose**: Backend-specific ignore patterns
47+
**Key Exclusions**:
48+
- `.env` files (contain sensitive Google Apps Script credentials)
49+
- `.clasprc.json` (CLASP authentication)
50+
- Node modules and logs
51+
52+
### `backend/.clasp.json`
53+
**Purpose**: Google Apps Script deployment configuration
54+
**Contains**:
55+
- Script ID for Google Apps Script project
56+
- File extension mappings
57+
- **Status**: ✅ Active and properly configured
58+
59+
## 📁 Config Directory
60+
61+
### `config/.gitleaks.toml`
62+
**Purpose**: Security scanning configuration for GitLeaks
63+
**Features**:
64+
- Allows documented placeholder patterns
65+
- Prevents false positives from examples
66+
- Maintains security while allowing documentation
67+
68+
### `config/.deployment-config.json`
69+
**Purpose**: Deployment environment configuration
70+
**Environments**:
71+
- Production (GitHub Pages)
72+
- Hostinger (backup deployment)
73+
- Staging and Development
74+
**Status**: ✅ Active template
75+
76+
### `config/.env.example`
77+
**Purpose**: Environment variable template
78+
**Usage**: Copy to `.env.local` for local development
79+
80+
### `config/.prettierignore`
81+
**Purpose**: Additional Prettier ignore patterns for config files
82+
**Status**: ✅ Active
83+
84+
## 📁 Directory Structure Preservation
85+
86+
### `reports/automated/.gitkeep`
87+
**Purpose**: Preserve automated reports directory structure
88+
**Usage**: Ensures directory exists for CI/CD processes
89+
90+
### `reports/templates/.gitkeep`
91+
**Purpose**: Preserve report templates directory
92+
**Usage**: Maintains directory for report generation templates
93+
94+
## 🔧 Configuration Management Best Practices
95+
96+
### ✅ Active Configurations
97+
- All configuration files are actively used
98+
- No duplicate or conflicting configurations
99+
- Environment-specific settings properly isolated
100+
101+
### 🧹 Cleanup Completed
102+
- Removed duplicate `.prettierrc.json` and `.markdownlint.json` from config/
103+
- Updated `.gitignore` for better precision
104+
- Added necessary `.gitkeep` files
105+
- Improved `.prettierignore` accuracy
106+
107+
### 🔒 Security Considerations
108+
- Environment files properly excluded
109+
- Sensitive credentials not tracked
110+
- GitLeaks configuration prevents security issues
111+
- Documentation examples safely allowed
112+
113+
---
114+
115+
**Last Updated**: June 30, 2025
116+
**Next Review**: July 30, 2025

0 commit comments

Comments
 (0)