Skip to content

Commit 24d2051

Browse files
authored
Merge pull request #62 from webstackdev/feature/marketing-website
Feature/marketing website
2 parents 4f9a875 + 5c532e8 commit 24d2051

341 files changed

Lines changed: 24918 additions & 29796 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
__pycache__/
44
*.py[cod]
55
.pytest_cache/
6-
.mypy_cache/
76
.ruff_cache/
87
.venv/
98
venv/

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,6 @@ NEWSLETTER_API_PASSWORD=adminpass
8383

8484
DEBUG=True
8585

86-
ALLOWED_HOSTS=localhost,127.0.0.1,nginx,newslettermaker.tech
86+
ALLOWED_HOSTS=localhost,127.0.0.1,nginx,digest-engine.tech
8787

8888
FRONTEND_URL=http://localhost:3000

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ updates:
55
schedule:
66
interval: "weekly"
77
open-pull-requests-limit: 5
8+
ignore:
9+
- dependency-name: "cryptography"
10+
versions:
11+
- ">=47"
12+
- dependency-name: "websockets"
13+
versions:
14+
- ">=16"
815
groups:
916
python-dependencies:
1017
patterns:
@@ -16,6 +23,7 @@ updates:
1623
interval: "weekly"
1724
open-pull-requests-limit: 5
1825
ignore:
26+
# eslint 10 is blocked until eslint-config-next adds support for it.
1927
- dependency-name: "eslint"
2028
update-types:
2129
- "version-update:semver-major"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: "Local Dev Server Workflow"
3+
description: "Use for all tasks. Covers local development server handling: do not start dev servers yourself by default, because the user usually has one running already. Ask the user to start the relevant server or confirm that none is running unless they explicitly request that you start it."
4+
applyTo:
5+
- "**/*"
6+
---
7+
8+
# Local Dev Server Workflow
9+
10+
- Do not start local development servers by default.
11+
- Assume the user usually already has the relevant dev server running.
12+
- Before running commands such as `pnpm dev`, `next dev`, `vite`, `npm run dev`, `just <app>-dev`, or similar long-lived local servers, ask the user to start the server or confirm that no server is already running.
13+
- Only start a dev server yourself when the user explicitly asks you to do that.
14+
- When you need runtime verification and no server is available, prefer asking the user to start the correct app server instead of launching one on their behalf.

.github/instructions/frontend-app.instructions.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: "Frontend App Router Guidelines"
3-
description: "Use when editing Next.js App Router pages, route handlers, shared frontend API helpers, or TypeScript UI code in frontend/src/. Covers file placement, backend contract preservation, typing, and frontend validation."
3+
description: "Use when editing Next.js App Router pages, route handlers, shared frontend API helpers, or TypeScript UI code in frontend/src/. Covers file placement, backend contract preservation, typing, Tailwind token usage, and frontend validation."
44
applyTo:
55
- "frontend/src/**/*.ts"
66
- "frontend/src/**/*.tsx"
@@ -12,8 +12,23 @@ applyTo:
1212
- Keep backend-facing types in `frontend/src/lib/types.ts` and shared server-side API access in `frontend/src/lib/api.ts` unless a route handler in `frontend/src/app/api/` is the correct boundary.
1313
- Reuse the existing backend contract. This repo currently consumes `snake_case` fields from Django; do not silently rename payload keys in the frontend.
1414
- Keep reusable components in `frontend/src/components/`, provider-style wrappers in `frontend/src/providers/`, and page composition in `frontend/src/app/`.
15+
- Use `lucide-react` for icons in `frontend` unless the task requires a non-Lucene brand logo, product illustration, or another explicit exception.
16+
- Use Tailwind's built-in size utilities for text size, radius, width and max-width, spacing, tracking, aspect ratio, and line-height. Do not introduce or keep custom size alias classes such as `text-2xs`, `text-button`, `rounded-panel`, `rounded-display`, `tracking-overline`, `max-w-marketing`, or `min-h-half-screen`.
17+
- Do not use text sizes smaller than `text-xs`; if an old alias maps below `0.75rem`, replace it with `text-xs`.
18+
- Prefer semantic Tailwind theme utility classes such as `bg-background`, `bg-page-base`, `bg-primary`, `text-content-active`, `text-content-offset`, `text-primary-foreground`, or `border-trim-offset` when the color should change with the active light or dark theme.
19+
- Use fixed palette utility classes such as `bg-blue-50`, `text-emerald-500`, or `border-amber-400` only when the value should stay fixed across theme changes, such as data visualization, status legends, or decorative washes.
20+
- Do not use direct CSS-variable utility syntax such as `text-[var(--color-primary)]`, `bg-(--theme-color-primary)`, `border-(--brand-border-bright)`, `text-(--font-primary)`, `rounded-[1.65rem]`, or `tracking-[0.24em]` when an existing utility class fits the need.
21+
- Do not use slash-opacity color utilities such as `bg-primary/50`, `border-trim-offset/10`, `text-content-active/80`, or `ring-ring/40`; choose the closest existing semantic or fixed palette class instead.
22+
- Do not add new aliases in `frontend/src/styles/theme.css` or new theme variables just to create a JSX-friendly Tailwind class. Ask the user before introducing new theme variables.
23+
- Apply Tailwind utility classes directly on the JSX or HTML element that owns the styling. Do not add semantic helper selectors in shared CSS for combinations Tailwind can already express. Keep CSS selectors only when utilities cannot represent the behavior cleanly, such as global element rules, third-party overrides, vendor pseudos, or keyframe definitions.
1524
- Keep Vitest files beside the route page, route-local component, or shared component they exercise instead of creating separate `__tests__/` folders.
1625
- Add or update a colocated `*.test.ts` or `*.test.tsx` file in the same change when introducing or modifying a route handler, page, or component. If the file is only a framework passthrough, document why dedicated coverage is omitted.
26+
- Prefer React Testing Library for frontend component tests. Test through accessible roles, labels, text alternatives, and user-visible behavior instead of implementation details or serialized markup.
27+
- Follow React Testing Library best practices: render components like a user would experience them, prefer `screen` queries, use `user-event` for interactions, and avoid manual DOM traversal unless there is no accessible query that fits.
28+
- Do not test product copy that is likely to change during iteration. Prefer assertions about structure, semantics, links, visibility, state, and behavior over exact headline, paragraph, button, or tagline text.
29+
- Do not assert Tailwind or other presentational style classes in tests just to verify visual styling. Prefer behavior, accessible output, text, attributes, and state.
30+
- Class assertions are acceptable only when the class itself carries semantic or functional meaning, such as `hidden`, stateful visibility, or another class-based contract consumed by behavior rather than presentation.
31+
- Do not assert spacing, sizing, positioning, color, typography, radius, or shadow classes in tests. Avoid checks for classes such as `px-4`, `gap-4`, `top-4`, `inset-x-4`, `rounded-full`, or `shadow-card-strong` unless the class is part of a functional contract.
1732
- Prefer strong explicit types over loose `Record<string, unknown>` shapes when the contract is known.
1833
- Add JSDoc for exported utilities, route handlers, hooks, and non-trivial components when behavior is not obvious from the signature.
1934
- For React components, providers, and App Router pages, keep the component JSDoc to a short summary paragraph and put prop descriptions on the props type or interface fields. Avoid `@param` and `@returns` tags on React components because Storybook Autodocs flattens them into a single block.

.github/workflows/build-release.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,20 @@ jobs:
5252
- name: Checkout repository
5353
uses: actions/checkout@v6
5454

55+
- name: Set up pnpm
56+
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
57+
with:
58+
version: 11.1.2
59+
5560
- name: Set up Node.js
5661
uses: actions/setup-node@v6
5762
with:
58-
node-version: "22"
59-
cache: npm
60-
cache-dependency-path: frontend/package-lock.json
63+
node-version: "24"
64+
cache: pnpm
65+
cache-dependency-path: pnpm-lock.yaml
6166

6267
- name: Install frontend dependencies
63-
working-directory: frontend
64-
run: npm ci
68+
run: pnpm install --filter=@digestengine/frontend --frozen-lockfile
6569

6670
- name: Prepare frontend env
6771
working-directory: frontend
@@ -70,12 +74,11 @@ jobs:
7074
echo "NEXTAUTH_SECRET=ci-build-secret" >> .env.local
7175
7276
- name: Build frontend
73-
working-directory: frontend
7477
env:
7578
NEXT_PUBLIC_API_URL: http://localhost:8000
7679
NEXTAUTH_URL: http://localhost:3000
7780
NEXTAUTH_SECRET: ci-build-secret
78-
run: npm run build
81+
run: pnpm --filter=@digestengine/frontend run build
7982

8083
build-backend:
8184
name: Build and scan backend image
@@ -96,6 +99,7 @@ jobs:
9699
with:
97100
image-ref: digest-engine-ci:${{ github.sha }}
98101
scan-type: image
102+
scanners: vuln
99103
severity: HIGH,CRITICAL
100104
ignore-unfixed: true
101105
exit-code: "1"

.github/workflows/lint.yml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Lint
1+
name: Lint And Typecheck
22

33
on:
44
pull_request:
@@ -14,26 +14,40 @@ concurrency:
1414

1515
jobs:
1616
lint:
17-
name: Run lint suite
17+
name: Run lint and pyright suite
1818
runs-on: ubuntu-latest
1919

2020
steps:
2121
- name: Checkout repository
2222
uses: actions/checkout@v6
2323

24-
- name: Set up Python
25-
uses: actions/setup-python@v6
24+
- name: Set up uv
25+
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5
2626
with:
27-
python-version: "3.13"
28-
cache: pip
29-
cache-dependency-path: requirements.txt
27+
version: "0.8.17"
28+
enable-cache: true
29+
30+
- name: Install Python 3.13
31+
run: uv python install 3.13
32+
33+
- name: Initialize Pants
34+
uses: pantsbuild/actions/init-pants@ab362158088bb31685015e7f5728a4c1df3c0e6e # v10
35+
with:
36+
gha-cache-key: cache0-py313
37+
named-caches-hash: ${{ hashFiles('3rdparty/python/default.lock', 'pants.toml') }}
38+
pants-ci-config: ""
39+
40+
- name: Set up pnpm
41+
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
42+
with:
43+
version: 11.1.2
3044

3145
- name: Set up Node.js
3246
uses: actions/setup-node@v6
3347
with:
3448
node-version: "22"
35-
cache: npm
36-
cache-dependency-path: frontend/package-lock.json
49+
cache: pnpm
50+
cache-dependency-path: pnpm-lock.yaml
3751

3852
- name: Install just
3953
uses: extractions/setup-crate@7577c1bdf2d95e6d65d532788f35ed79d4b1dda2 # v2
@@ -44,8 +58,8 @@ jobs:
4458
- name: Set up Helm
4559
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
4660

47-
- name: Install dependencies
61+
- name: Bootstrap dependencies
4862
run: just install
4963

50-
- name: Run lint and type checks
64+
- name: Run lint and Pants checks
5165
run: just lint

.github/workflows/test.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,41 @@ jobs:
2121
- name: Checkout repository
2222
uses: actions/checkout@v6
2323

24-
- name: Set up Python
25-
uses: actions/setup-python@v6
24+
- name: Set up uv
25+
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5
2626
with:
27-
python-version: "3.13"
28-
cache: pip
29-
cache-dependency-path: requirements.txt
27+
version: "0.8.17"
28+
enable-cache: true
29+
30+
- name: Install Python 3.13
31+
run: uv python install 3.13
32+
33+
- name: Initialize Pants
34+
uses: pantsbuild/actions/init-pants@ab362158088bb31685015e7f5728a4c1df3c0e6e # v10
35+
with:
36+
gha-cache-key: cache0-py313
37+
named-caches-hash: ${{ hashFiles('3rdparty/python/default.lock', 'pants.toml') }}
38+
pants-ci-config: ""
39+
40+
- name: Set up pnpm
41+
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
42+
with:
43+
version: 11.1.2
3044

3145
- name: Set up Node.js
3246
uses: actions/setup-node@v6
3347
with:
3448
node-version: "22"
35-
cache: npm
36-
cache-dependency-path: frontend/package-lock.json
49+
cache: pnpm
50+
cache-dependency-path: pnpm-lock.yaml
3751

3852
- name: Install just
3953
uses: extractions/setup-crate@7577c1bdf2d95e6d65d532788f35ed79d4b1dda2 # v2
4054
with:
4155
repo: casey/just@1.50.0
4256
github-token: ${{ github.token }}
4357

44-
- name: Install dependencies
58+
- name: Bootstrap dependencies
4559
run: just install
4660

4761
- name: Run tests

.gitignore

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,32 @@
11
__pycache__/
2-
*.py[cod]
3-
.pytest_cache/
4-
.mypy_cache/
5-
.ruff_cache/
62
.cache/
7-
.venv/
8-
venv/
93
.coverage
104
.env
11-
frontend/.env.local
5+
.pytest_cache/
6+
.ruff_cache/
7+
.turbo/
8+
.venv/
9+
.pants.d/
10+
11+
*.py[cod]
12+
**/.turbo/
13+
*storybook.log
14+
1215
celerybeat-schedule*
16+
coverage/
1317
db.sqlite3
14-
htmlcov/
15-
staticfiles/
18+
docs/_internal_only/
19+
20+
frontend/.env.local
1621
frontend/.next/
1722
frontend/coverage/
1823
frontend/node_modules/
24+
frontend/out/
1925

20-
docs/_internal_only/
26+
htmlcov/
27+
dist/
2128

22-
*storybook.log
29+
node_modules/
30+
31+
staticfiles/
2332
storybook-static

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13

0 commit comments

Comments
 (0)