Skip to content

Commit e8ec681

Browse files
Merge pull request #98 from acaptutorials/dev
v1.3.6
2 parents 4db2fe1 + 5b817a3 commit e8ec681

File tree

7 files changed

+56
-11
lines changed

7 files changed

+56
-11
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,7 @@ https://hub.docker.com/r/acaptutorials/acaptutorials.github.io
163163
| DOCKERHUB_USERNAME | Docker Hub username |
164164

165165
@acaptutorials<br>
166-
20240806
166+
20240806<br>
167+
20250601
168+
169+

docs/pages/articles/_meta.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"deployment-vercel": "Deployment to Vercel",
44
"pdf-development": "PDF Development",
55
"provinces-municipalities": "Provinces and Municipalities",
6-
"opensource-libraries": "Open Source Libraries"
6+
"opensource-libraries": "Open Source Libraries",
7+
"security-bestpractices": "Security Best Practices"
78
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# 🔐 ACAP Developer Security Best Practices Checklist
2+
3+
> This checklist, reflecting the needs of the [Security](/security) section and the [ACAP Professional Mindset on Security](https://github.com/acaptutorials/acaptutorials/blob/main/README.md#-acap-professional-mindset-on-security), enumerates the desirable traits and mindsets of programmers, especially for **code maintainers** or **main/primary ACAP lead developers** handling ACAP development.
4+
>
5+
> ✅ Use this checklist as a guideline along with the [Security](#security) expectations during planning, code reviews, or when designing features that handle user input, authentication, or database operations.
6+
7+
### 1. Mindset and Responsibility
8+
- [ ] I prioritize **user safety and data protection** over rapid feature delivery.
9+
- [ ] I integrate **security considerations in every development phase**—from design to deployment.
10+
- [ ] I recognize that **security is a shared team responsibility**, not a post-incident task.
11+
12+
### 2. Firestore & Backend Practices
13+
- [ ] I **avoid writing to Firestore directly from the front-end** when the data is sensitive or requires validation.
14+
- [ ] I implement **strong Firestore security rules** that match the expected schema and use strict access controls.
15+
- [ ] I **validate all input server-side**, even if it’s also validated on the front-end.
16+
17+
### 3. Input Handling and Content Security
18+
- [ ] I sanitize **WYSIWYG or HTML-formatted input** to prevent XSS or unsafe content injection.
19+
- [ ] I use **established libraries and sanitization methods** instead of building ad-hoc solutions for HTML or user input.
20+
- [ ] I escape user-generated content correctly in all **PDFs, emails, and rendered UI components**.
21+
22+
### 4. Data Structure Integrity
23+
- [ ] I enforce **tight schema validation** to prevent Firestore document pollution (uncontrolled key-value growth).
24+
- [ ] I use **Firebase Cloud Functions or middle-layer APIs** to validate and shape incoming data before writing to the database.
25+
- [ ] I regularly monitor for **unexpected document structures or recursive collections**.
26+
27+
### 5. Security Reports and Technical Debt
28+
- [ ] I take **security concerns seriously**, especially those that are **clearly reproducible** or reported by team members.
29+
- [ ] I **do not delay security fixes** unless justified with clear documentation and risk mitigation steps.
30+
- [ ] I log and track known vulnerabilities as **actionable backlog items**, not as "someday" issues.
31+
32+
### 6. Team Collaboration and Growth
33+
- [ ] I am **open to feedback** and security advice from peers, even if it challenges my current approach.
34+
- [ ] I **communicate blockers** early if I need help on a security implementation.
35+
- [ ] I actively **share security learnings** with the rest of the team (e.g., via code reviews or internal notes).
36+

docs/pages/directories/client.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { FileTree, Callout } from 'nextra/components'
22

33
# Client
44

5-
The **client** directory contains codes and configurations/settings for the (React) NextJS front end and Firebase. The folder tree displays the relevant files and folders.
5+
The **client** directory contains codes and configurations/settings for the (React) NextJS v13 + Material UI v5 front end and Firebase. The folder tree displays the relevant files and folders.
66

77
The NextJS frontend uses the [**pages router**](https://nextjs.org/docs/pages) since this is suitable for generating static pages to host on GitHub Pages. It uses the `"container component"` as a dominant pattern, also known as `"component and presentational"` components, for distinguishing between logic (container) and UI (component).
88

docs/pages/references.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,17 @@ This section contains URL links to partners and various online references used b
2323

2424
<div className="text-semibold text-sm text-purple-500 no-underline hover:underline">
2525
- [NextJS](https://nextjs.org/)
26-
- [Material UI](https://mui.com/material-ui/)
26+
- [Material UI 5 (MUI5)](https://mui.com/material-ui/) - version 5 (v5)
2727
- [GitHub Pages](https://pages.github.com/)
28+
- [Firebase JavaScript SDK](https://firebase.google.com/docs/web/setup) - Firebase Authentication, Cloud Firestore and Cloud Storage
2829
- [Firebase Hosting](https://firebase.google.com/docs/hosting/)
2930
</div>
3031

3132
### Backend
3233

3334
<div className="text-semibold text-sm text-purple-500 no-underline hover:underline">
3435
- [NodeJS](https://nodejs.org/en)
35-
- [Firebase Admin SDK](https://firebase.google.com/docs/admin/setup)
36+
- [Firebase Admin SDK](https://firebase.google.com/docs/admin/setup) - Firebase Auth, Cloud Firestore and Cloud Storage
3637
- [Render](https://render.com/)
3738
- [Vercel](https://vercel.com/)
3839
- [GitHub Actions](https://docs.github.com/en/actions)

docs/pages/requirements.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This post describes the dependencies and requirements needed to run run ACAP 1.0
1414
#### Main Development
1515

1616
1. Visual Studio Code (VSCode) IDE
17-
- version: v1.79.2 (any version that can run NodeJS)
17+
- version: v1.79.2 (or versions capable of running NodeJS in its Integrated Terminal)
1818
2. nvm
1919
- <Callout>
2020
**nvm** is optional, if you can install NodeJS LTS version 16.14.2 on **item #3**
@@ -45,12 +45,12 @@ This post describes the dependencies and requirements needed to run run ACAP 1.0
4545
3. JavaScript
4646
4. GitHub
4747
5. Firebase
48-
- Firebase for Web
49-
- Firebase for NodeJS (Firebase Admin)
50-
- Firebase Services (Components)
48+
- [Firebase JavaScript SDK (for frontend web clients)](https://firebase.google.com/docs/web/setup)
49+
- [Firebase Admin SDK (for backend NodeJS)](https://firebase.google.com/docs/admin/setup)
50+
- Firebase Services (Components) - used within the contexts of the **Firestore JavaScript SDK** and the **Firebase Admin SDK**
5151
- Authentication <sup>[[1]](https://firebase.google.com/docs/auth/)</sup>
52-
- Firestore <sup>[[2]](https://firebase.google.com/docs/firestore/)</sup>
53-
- Storage <sup>[[3]](https://firebase.google.com/docs/storage/)</sup>
52+
- Firestore (Cloud Firestore) <sup>[[2]](https://firebase.google.com/docs/firestore/)</sup>
53+
- Storage (Cloud Storage) <sup>[[3]](https://firebase.google.com/docs/storage/)</sup>
5454
- Hosting <sup>[[4]](https://firebase.google.com/docs/hosting/)</sup> _(Only used with the **development** environment)_
5555

5656
### Cloud Service Accounts (standard pricing)

docs/pages/security.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ Since ACAP's initial development in 2022, many of these libraries may have becom
9999

100100
Developers maintaining ACAP are encouraged to <u>monitor and update these dependencies as needed</u> to benefit from performance improvements, security patches, and new features, possibly requiring using <u>newer Node versions</u>.
101101

102+
## ✅ Checklist
103+
104+
The [ACAP Developer Security Best Practices Checklist](/articles/security-bestpractices) article summarizes the main points and highlights of this section and mentions the desirable traits and mindset when it comes to security.
105+
102106
## Related
103107

104108
- [Server Notes](/directories/server)

0 commit comments

Comments
 (0)