docs: add project documentation and initial specs

This commit is contained in:
MOH
2026-03-14 13:29:32 +01:00
parent 35734bd2d9
commit 143b441d0c
11 changed files with 819 additions and 0 deletions
+59
View File
@@ -0,0 +1,59 @@
# Contact Feature Spec
## Current Implementation
### Public flow
- Public contact page exists at
`/contact`
- Form fields:
- name
- email
- phone
- company
- message
- Submission uses a server action
- Success redirects to
`/success`
### Protection
- Validation uses
`zod`
- Optional Cloudflare Turnstile verification
- Optional rate limiting by IP window
### Delivery
- Messages are sent by SMTP through
`nodemailer`
- Recipient configuration comes from admin settings
- Messages are not persisted in the database
### Admin controls
- SMTP settings page
- Test email action
- Contact protection settings page
## Risks
- Contact history is lost if email delivery succeeds but later needs auditing
- Rate-limit counters are stored in
`AppConfig`
which mixes operational and business configuration
## Recommended Improvements
- Store contact submissions if the business needs pipeline visibility
- Add spam and abuse observability
- Add structured delivery error reporting