Gishen-Email-Template/README.md
Kirubel-Kibru-Yaltopia f9fa3bc83b feat: add Gishen React Email demo with en/am templates
Ship 23 transactional templates, shared brand tokens/logo, preview UI,
render API, CHANGELOG, and docs for Ecom/Admin/B2B consumers.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 22:12:21 +03:00

90 lines
2.2 KiB
Markdown

# Gishen Email Templates
React Email templates and a Next.js preview app for **Gishen Pharmacy** — shared across Ecom, Admin, and B2B.
Brand colors and logo are taken from `Gishen-B2B` / `Gishen-Admin` (`#A8C73A`, `#141414`, `#E28A1A`, cream `#F6F7F2`).
## Features
- 23 templates (auth, orders, B2B, prescriptions, admin ops, marketing, shop analytics)
- English + Amharic (`locale=en|am`)
- Preview UI with category navigation, locale toggle, HTML download
- Render API for demos / consumer apps
- `shop-summary` with `period=daily|weekly|monthly|quarterly|yearly`
## Getting started
```bash
npm install
npm run preview
```
Open [http://localhost:3000](http://localhost:3000).
### React Email CLI
```bash
npm run email
```
### Export HTML
```bash
npm run build
```
## Render API
```
GET /api/email/[template]?locale=en|am
GET /api/email/shop-summary?locale=en&period=weekly
```
Returns `text/html`.
## Templates
| ID | Category |
|----|----------|
| `welcome` | Auth |
| `password-reset` | Auth |
| `email-verify` | Auth |
| `user-invite` | Auth |
| `order-confirmation` | Orders |
| `order-packing` | Orders |
| `order-out-for-delivery` | Orders |
| `order-delivered` | Orders |
| `order-cancelled` | Orders |
| `org-invite` | B2B |
| `join-code` | B2B |
| `approval-needed` | B2B |
| `statement-ready` | B2B |
| `credit-alert` | B2B |
| `organisation-verified` | B2B |
| `prescription-submitted` | Prescriptions |
| `prescription-decision` | Prescriptions |
| `prescription-ready` | Prescriptions |
| `low-stock` | Admin ops |
| `dispatch-assigned` | Admin ops |
| `procurement-alert` | Admin ops |
| `promotional` | Marketing |
| `shop-summary` | Analytics |
## Consuming from Gishen apps
1. **Demo / staging:** call the render API and send the HTML through your ESP.
2. **Production (later):** import templates from this package or copy exported HTML into your notification worker.
Do not hardcode brand colours in Ecom/Admin/B2B mailers — keep them here.
## Related repos
- [Gishen-Ecom](https://gitea.yaltopia.com/Gishen/Gishen-Ecom)
- [Gishen-Admin](https://gitea.yaltopia.com/Gishen/Gishen-Admin)
- [Gishen-B2B](https://gitea.yaltopia.com/Gishen/Gishen-B2B)
- Structure inspired by Amba-Emails / Yaltopia Ticket Email
## License
Proprietary — Yaltopia / Gishen.