generated from westfarn/web_django_template
Ship Print Forge shop site (colors, photos, 3D viewer) (#2)
## Summary - Rebrand the Django client template as Print Forge (`client_site` → `print_forge`) with shop + shipping enabled. - Product listings support multiple photos, color variants (shared price/description/STL, per-color stock and photos), and a photo-first / 3D-second gallery. - Public pages use 3D printer / printed-toy photography instead of leftover t-shirt mockups; beta CI deploys on `master`. Closes #1 Infra: [server-infra#27](ai_ml_operations/server-infra#27) (easy deploy beta). ## Test plan - [ ] Product page shows photo first, 3D model second; color swatches swap photos and stock - [ ] Portal can upload multiple photos and per-color qty/images; STL stays shared - [ ] Public home/about/gallery have no t-shirt mockups - [ ] `manage.py test` passes - [ ] After server-infra#27: beta deploy to `print-forge-preview.aimloperations.com` Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
@@ -1,49 +1,31 @@
|
||||
# web_django_template
|
||||
# Print Forge
|
||||
|
||||
Gitea template for AI ML Operations client websites
|
||||
3D printed toy shop for Print Forge
|
||||
([Web Design & Hosting](https://aimloperations.com/web_design)).
|
||||
|
||||
Clone this repo (or **Use this template**), run `scripts/bootstrap-client.sh`,
|
||||
set branding + `FEATURE_*` flags in the secret env file, deploy.
|
||||
Public site + client portal, plus purchased catalog add-ons: email & SMS,
|
||||
payments, e-commerce, and shipping automation.
|
||||
|
||||
Always included: public site (landing, about, contact) and client portal
|
||||
(login, dashboard, leads, UTM analytics). Optional catalog add-ons are
|
||||
separate Django apps. A flag that is off keeps the app out of
|
||||
`INSTALLED_APPS` — no models, admin, URLs, or portal nav.
|
||||
|
||||
## Catalog → flags
|
||||
## Catalog
|
||||
|
||||
| Catalog item | Flag | App |
|
||||
|---|---|---|
|
||||
| Public site | (always on) | `public` |
|
||||
| Client portal + UTM | (always on) | `accounts`, `dashboard`, `leads`, `analytics`, `contacts`, `core` |
|
||||
| Email & SMS | `FEATURE_EMAIL_SMS` | `email_sms` |
|
||||
| Direct mail (PCM) | `FEATURE_DIRECT_MAIL` | `directmail` |
|
||||
| Blog | `FEATURE_BLOG` | `blog` |
|
||||
| Payments (Stripe) | `FEATURE_PAYMENTS` | `payments` (requires email/SMS) |
|
||||
| Social consolidation | `FEATURE_SOCIAL` | `social` |
|
||||
| AI social generator | `FEATURE_SOCIAL_AI` | `social_ai` (requires social) |
|
||||
| Payments (Stripe) | `FEATURE_PAYMENTS` | `payments` |
|
||||
| E-commerce storefront | `FEATURE_SHOP` | `shop` |
|
||||
| Shipping automation | `FEATURE_SHIPPING` | `shipping` |
|
||||
|
||||
## New client
|
||||
Off for this client: direct mail, blog, social, social AI, POS sync, event ticketing.
|
||||
|
||||
```bash
|
||||
# 1. Create repo from this Gitea template, clone it.
|
||||
# 2. Rename package + branding placeholders:
|
||||
./scripts/bootstrap-client.sh acme_site "Acme HVAC" acmehvac.com
|
||||
## Contact
|
||||
|
||||
# 3. Brand public templates and static/brand/ (logo, colors, copy).
|
||||
- Phone: 630-632-0202
|
||||
- Email: Printforgeprints@gmail.com
|
||||
- Public URL (placeholder until DNS): https://printforgeprints.com
|
||||
|
||||
# 4. Secrets on the control node:
|
||||
mkdir -p ~/Documents/secrets/acme_site
|
||||
cp .env.prod.example ~/Documents/secrets/acme_site/acme_site_prod.env
|
||||
# Flip only purchased FEATURE_* flags. Fill provider secrets.
|
||||
./scripts/validate-env.sh ~/Documents/secrets/acme_site/acme_site_prod.env
|
||||
|
||||
# 5. Infra: Postgres on 10.0.0.230, server-infra app_catalog, NPM, CI.
|
||||
# 6. Deploy. Create a portal user (createsuperuser).
|
||||
```
|
||||
|
||||
Local:
|
||||
## Local
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
@@ -54,30 +36,21 @@ uv run python manage.py runserver
|
||||
# or: docker compose up
|
||||
```
|
||||
|
||||
## Deploy
|
||||
|
||||
```bash
|
||||
mkdir -p ~/Documents/secrets/print_forge
|
||||
cp .env.prod.example ~/Documents/secrets/print_forge/print_forge_prod.env
|
||||
# Fill Stripe, SMTP2GO, shortener, and DB secrets.
|
||||
./scripts/validate-env.sh ~/Documents/secrets/print_forge/print_forge_prod.env
|
||||
```
|
||||
|
||||
Infra: Postgres on 10.0.0.230, server-infra `app_catalog.print_forge`, NPM, CI.
|
||||
Gitea deploy calls `deploy.sh --app print_forge` (must match that catalog key).
|
||||
Secrets: `~/Documents/secrets/print_forge/print_forge_{prod,beta}.env`.
|
||||
Create a portal user with `createsuperuser` after first deploy.
|
||||
|
||||
## Stack
|
||||
|
||||
Django 6 + uv · Postgres (prod/beta); SQLite locally · dj-queue · Docker ·
|
||||
server-infra Ansible deploy.
|
||||
|
||||
Ollama for social drafts lives on the LAN at `http://10.0.0.128:11434`.
|
||||
Do not call a public Ollama host.
|
||||
|
||||
## Campaign tracked links (piha.li)
|
||||
|
||||
When `FEATURE_EMAIL_SMS` or `FEATURE_DIRECT_MAIL` is on, composers auto-insert a
|
||||
homepage URL with `utm_source` (slug of `SITE_NAME`, or `UTM_SOURCE`),
|
||||
`utm_medium` = channel, and `utm_campaign` = campaign name. Configured
|
||||
`SHORTENER_BASE_URL` + `SHORTENER_API_TOKEN` mint that URL via
|
||||
[url_shortening_service](https://git.aimloperations.com/ai_ml_operations/url_shortening_service)
|
||||
and put `piha.li` / `beta.piha.li` short links in SMS, email hrefs, and postcard QR codes.
|
||||
|
||||
Caller secrets (this repo's env file):
|
||||
|
||||
```text
|
||||
SHORTENER_BASE_URL=https://shortener.aimloperations.com
|
||||
SHORTENER_API_TOKEN=<slug>:<secret>
|
||||
```
|
||||
|
||||
Operator secrets (`url_shortening_service_*`): `SHORTENER_API_TOKENS=<slug>:<same-secret>`
|
||||
and `SHORT_ALLOWED_HOSTS` must include the client domain. Mint against the **API host**,
|
||||
never `piha.li`.
|
||||
|
||||
Reference in New Issue
Block a user