Skip to content

Commit 50b9120

Browse files
authored
feat: add certificate automation with QR code verification (#622)
feat: add certificate automation system with QR verification Implement complete certificate generation and verification system for WCC community. Core Features: - Automated certificate generation from PowerPoint templates (PPTX/PDF output) - QR code generation with unique SHA256-based certificate IDs - Public verification page with certificate registry lookup - Support for 4 certificate types: mentee, mentor, volunteer, leader - Template formatting preservation (fonts, colors, styles) - Configurable QR code positioning in centimeters - Duplicate certificate detection Technical Implementation: - Python-based certificate generator with comprehensive configuration - JSON-based certificate registry with publishing workflow - Registry published to assets/js/certificates_registry.json for website integration - WCAG-compliant verification UI - Modern JavaScript with proper event handling (no deprecated jQuery methods) Testing & Quality: - 50+ test cases for certificate generation - 11 passing tests for verification system - 9 passing tests for registry publishing - 12 passing tests for frontend verification - GitHub Actions workflow with proper PYTHONPATH and dependency management Documentation: - Comprehensive README with usage guides - Configuration examples and formatting instructions - Publishing workflow documentation
1 parent d1794a4 commit 50b9120

34 files changed

Lines changed: 2898 additions & 44 deletions

.github/workflows/pull_request.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,14 @@ jobs:
4141

4242
- name: Install dependencies
4343
run: |
44-
cd tools
44+
cd tools
4545
ls -lah
4646
python -m pip install --upgrade pip
4747
pip install -r requirements.txt
48+
pip install -r certificate_automation/requirements.txt
4849
4950
- name: Run pytest
50-
run: pytest tools
51+
run: |
52+
cd tools
53+
export PYTHONPATH="${PYTHONPATH}:$(pwd)"
54+
pytest --ignore=_site --ignore=.venv --ignore=myenv

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,9 @@ tools/blog_automation/venv
1414

1515
# Claude Code local settings (may contain personal preferences)
1616
.claude/settings.local.json
17+
18+
# Certificate automation - proprietary templates and generated files
19+
tools/certificate_automation/data/input/templates/
20+
tools/certificate_automation/data/input/*.csv
21+
tools/certificate_automation/data/output/
22+
tools/samples/

_includes/footer.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ <h2>Follow Us</h2>
7575
<script src="/assets/js/events.js" type="module"></script>
7676
<script src="/assets/js/search.js" type="module"></script>
7777
<script src="/assets/js/registration.js" type="module"></script>
78+
<script src="/assets/js/verify.js" type="module"></script>
7879

7980
<!-- Google tag (gtag.js) -->
8081
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.gtagId }}"></script>

_sass/custom/_verify.scss

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
.page-verify {
2+
.verification-container {
3+
max-width: 800px;
4+
margin: 50px auto;
5+
padding: 30px;
6+
text-align: center;
7+
}
8+
9+
.verification-box {
10+
background: #f8f9fa;
11+
border-radius: 10px;
12+
padding: 40px;
13+
margin: 30px 0;
14+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
15+
}
16+
17+
.certificate-info {
18+
background: white;
19+
border-left: 4px solid $success;
20+
padding: 20px;
21+
margin: 20px 0;
22+
text-align: left;
23+
24+
&.invalid {
25+
border-left: 4px solid $danger;
26+
}
27+
28+
h3 {
29+
margin-top: 0;
30+
color: $success;
31+
}
32+
33+
&.invalid h3 {
34+
color: $danger;
35+
}
36+
}
37+
38+
.info-row {
39+
margin: 10px 0;
40+
display: flex;
41+
justify-content: space-between;
42+
}
43+
44+
.info-label {
45+
font-weight: bold;
46+
color: #555;
47+
}
48+
49+
.info-value {
50+
color: #333;
51+
}
52+
53+
.search-box {
54+
display: flex;
55+
gap: 10px;
56+
margin: 20px 0;
57+
justify-content: center;
58+
59+
input {
60+
padding: 12px 20px;
61+
font-size: 16px;
62+
border: 2px solid #ddd;
63+
border-radius: 5px;
64+
width: 300px;
65+
}
66+
67+
button {
68+
padding: 12px 30px;
69+
font-size: 16px;
70+
background: $primary;
71+
color: white;
72+
border: none;
73+
border-radius: 5px;
74+
cursor: pointer;
75+
transition: background 0.3s;
76+
77+
&:hover {
78+
background: darken($primary, 10%);
79+
}
80+
}
81+
}
82+
83+
.loading {
84+
display: none;
85+
color: $primary;
86+
margin: 20px 0;
87+
}
88+
89+
.error-message {
90+
color: $danger;
91+
margin: 20px 0;
92+
}
93+
94+
.success-icon {
95+
font-size: 60px;
96+
color: $success;
97+
margin-bottom: 20px;
98+
}
99+
100+
.error-icon {
101+
font-size: 60px;
102+
color: $danger;
103+
margin-bottom: 20px;
104+
}
105+
106+
.verification-instructions {
107+
h3 {
108+
margin-bottom: 20px;
109+
}
110+
111+
ol {
112+
text-align: left;
113+
max-width: 500px;
114+
margin: 0 auto;
115+
}
116+
}
117+
}

_sass/custom/custom.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
@import "breadcrumbs";
2020
@import "partners";
2121
@import "timeline";
22+
@import "verify";
2223

2324
.network svg:hover {
2425
fill: $primary-50 !important;

0 commit comments

Comments
 (0)