Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
3eb5ba2
added button
iabouhashish Nov 18, 2025
514bd01
Comment out the bottomItems array in DashboardSidebar component to te…
iabouhashish Nov 18, 2025
99b3a39
fix sidebar
iabouhashish Nov 18, 2025
9efe566
settings
iabouhashish Nov 18, 2025
e1952e7
Enhance ResultsPage to support multiple result structures by checking…
iabouhashish Nov 19, 2025
dfd8fa3
Add job view buttons to approval pages and enhance article formatting
iabouhashish Nov 19, 2025
e8b4f59
Refactor OrchestratorControls to define social media pipeline steps a…
iabouhashish Nov 19, 2025
ae9344c
update approvals page
iabouhashish Nov 20, 2025
4115675
Enhance approval pages to support 'rerun' decision option, allowing u…
iabouhashish Nov 20, 2025
731eb14
Implement multi-platform support in OrchestratorControls, allowing us…
iabouhashish Dec 4, 2025
c1d553c
Implement memory management for stepData in ResultsPage to limit entr…
iabouhashish Dec 4, 2025
2362859
Refactor approval and job components to utilize new JsonDisplay and A…
iabouhashish Dec 5, 2025
56a2e77
Refactor PendingApprovalsBanner component for improved layout and acc…
iabouhashish Dec 11, 2025
baa3d00
fix
iabouhashish Dec 15, 2025
7e3dcfc
Update key prop in ContentSelector component to include index for uni…
iabouhashish Dec 16, 2025
cfcd850
Refactor version display in DashboardSidebar and Header components to…
iabouhashish Dec 16, 2025
bec4caf
Enhance error handling in ContentSelector component by adding fallbac…
iabouhashish Dec 16, 2025
4277799
Add GPT-5.2 model to available models and update performance metrics …
iabouhashish Dec 17, 2025
f734b49
Refactor content source handling across components to utilize getSour…
iabouhashish Dec 17, 2025
e221d51
Refactor OrchestratorControls component by removing unused imports an…
iabouhashish Dec 17, 2025
4f2eb60
Add date filtering functionality to job results page and job list pan…
iabouhashish Dec 17, 2025
3be9866
Refactor PendingApprovalsBanner component to handle toast notificatio…
iabouhashish Dec 18, 2025
291ad6d
Remove the "Start Processing" button from the DashboardPage component…
iabouhashish Dec 18, 2025
980aaed
Add bulk approval and rejection functionality to ApprovalsPage compon…
iabouhashish Dec 18, 2025
7bdcbbe
Enhance environment configuration and API client for authentication. …
iabouhashish Dec 12, 2025
8f239e6
Refactor authentication handling in API client to improve token manag…
iabouhashish Dec 12, 2025
9c2b439
Refactor authentication implementation to utilize Better Auth. Update…
iabouhashish Feb 23, 2026
5bd445d
Merge pull request #1 from arthur-ai/auth-routes
iabouhashish Feb 23, 2026
d4448c2
Refactor authentication routes to dynamically import auth module for …
iabouhashish Feb 23, 2026
6cf8c5a
Update package version to 2.0.0 and refresh dependencies in package.j…
iabouhashish Feb 23, 2026
f1ccc65
Enhance authentication setup by adding Better Auth and Keycloak param…
iabouhashish Feb 23, 2026
aace002
Update package.json to add PostgreSQL dependencies, including pg and …
iabouhashish Feb 23, 2026
355b490
Add PostgreSQL dependencies in package-lock.json, including pg and re…
iabouhashish Feb 23, 2026
b619f98
Update healthcheck endpoint in Docker Compose and add '/healthz' to p…
iabouhashish Feb 24, 2026
96091ac
Remove default baseURL from authClient configuration to streamline en…
iabouhashish Feb 24, 2026
3f748ba
Refactor authentication paths by removing '/api' prefix in proxy and …
iabouhashish Feb 24, 2026
9154848
Refactor authentication route handlers to directly export GET and POS…
iabouhashish Feb 24, 2026
8a1bdee
Refactor authentication route handlers to dynamically import the auth…
iabouhashish Feb 24, 2026
f4140da
Enhance database connection configuration by adding SSL support for p…
iabouhashish Feb 24, 2026
62ba257
Implement role extraction from Keycloak access token in useAuth hook,…
iabouhashish Feb 24, 2026
d7ac19f
Update JobStatus type to include 'waiting_for_approval' for enhanced …
iabouhashish Feb 24, 2026
da34e08
Refactor approvals and results pages to streamline approval handling …
iabouhashish Feb 24, 2026
22f4d65
Refactor dashboard layout to replace PendingApprovalsBanner with Glob…
iabouhashish Feb 24, 2026
e28cd4f
Implement local development bypass for session checks in proxy. Remov…
iabouhashish Feb 24, 2026
e380eef
Enhance local development experience by adding DEV_AUTH_BYPASS enviro…
iabouhashish Feb 24, 2026
d456e71
Refactor approval pages to utilize user information for 'reviewed_by'…
iabouhashish Feb 26, 2026
5a12c9d
Enhance job status updates in ResultsPage and improve sidebar visibil…
iabouhashish Feb 26, 2026
35b942d
dashboards
iabouhashish Feb 26, 2026
43d8531
Implement Approvals page with bulk approval and rejection functionali…
iabouhashish Feb 26, 2026
f348715
Enhance GenericJobPage to improve job status handling and approval di…
iabouhashish Feb 26, 2026
668c399
Integrate Competitor Research features, including new API endpoints a…
iabouhashish Mar 5, 2026
2b1ac01
Refactor ValidationStatusSection to improve metric handling by parsin…
iabouhashish Mar 6, 2026
e2dfe55
Refactor BlogPostPreprocessingEditor, BlogPostDetailsSection, Content…
iabouhashish Mar 6, 2026
289f8d3
Enhance Competitor Research and Design Kit features by adding new con…
iabouhashish Mar 6, 2026
562d690
Add warning alert in DefaultSettings component to inform users about …
iabouhashish Mar 6, 2026
e92daad
Remove Default Settings tab and component from SettingsPage to stream…
iabouhashish Mar 6, 2026
938cc48
Refactor SettingsPage by removing the Model Configuration tab and ass…
iabouhashish Mar 6, 2026
c191f7e
Refactor KeywordDifficultyScores and PrimaryKeywordsMetadata componen…
iabouhashish Mar 7, 2026
2e218c6
Refactor Design Kit to Brand Kit, updating all related components, ho…
iabouhashish Mar 7, 2026
de8a7d1
Add "Resumed" chip to JobHeader for clarity on job status when applic…
iabouhashish Mar 9, 2026
9cdc8a1
feat: add Profound AI settings tab to admin settings page
iabouhashish Mar 24, 2026
e58b856
Merge pull request #2 from arthur-ai/feat/profound-settings-ui
iabouhashish Mar 24, 2026
824b6d5
feat: implement live job progress tracking and onboarding modal
iabouhashish Mar 25, 2026
cb55877
feat: implement Profound AI design system — warm dark, amber accent
iabouhashish Mar 25, 2026
c6c8a6d
fix: restore keyword_match_pct multiplier in job quality display
iabouhashish Mar 25, 2026
660c0df
fix: migrate tests from next-auth to better-auth (authClient)
iabouhashish Mar 25, 2026
e273850
Merge pull request #3 from arthur-ai/feat/design-system
iabouhashish Mar 25, 2026
d7aa50c
fix: update token usage checks to handle null values
iabouhashish Mar 25, 2026
8a96aab
feat: enhance dashboard layout and navigation
iabouhashish Mar 26, 2026
03a406c
refactor: update DashboardAppBar navigation and enhance job error han…
iabouhashish Mar 31, 2026
2cab3ab
refactor: update branding in DashboardAppBar from "Profound AI" to "M…
iabouhashish Mar 31, 2026
6d5c2c9
feat: dashboard streamlining — nav cut + command center home
iabouhashish Apr 1, 2026
f2a2fc6
style(design): FINDING-001 — add minHeight 44px to all touch targets …
iabouhashish Apr 1, 2026
33b20a9
style(design): FINDING-002 — show header with Internal Docs button du…
iabouhashish Apr 1, 2026
f912382
style(design): FINDING-003 — left-align empty state, remove generic c…
iabouhashish Apr 1, 2026
6e9c7a8
style(design): FINDING-004 — chip border-radius 3px to 4px for consis…
iabouhashish Apr 1, 2026
c5afeca
feat: restore Competitor Research to nav as first-class link
iabouhashish Apr 1, 2026
560d5c7
feat: restyle competitor research list to match design system
iabouhashish Apr 1, 2026
ad3afae
feat: show triggered-by user on each approval item
iabouhashish Apr 1, 2026
c8d4624
feat: add delete jobs before date in settings job management tab
iabouhashish Apr 1, 2026
b7c4303
Merge pull request #4 from arthur-ai/feat/delete-jobs-before-date
iabouhashish Apr 1, 2026
54b0574
refactor: remove model selection UI — Arthur supplies model for all s…
iabouhashish Apr 1, 2026
316d25d
test: coverage for delete-jobs-before feature
iabouhashish Apr 1, 2026
a82545a
fix: pre-landing review fixes — validate date before closing dialog, …
iabouhashish Apr 1, 2026
58f776c
Merge remote-tracking branch 'origin/main' into feat/delete-jobs-befo…
iabouhashish Apr 1, 2026
191eb5d
fix: pre-existing test failure in useJobList — refetch now uses silen…
iabouhashish Apr 1, 2026
4d5eb9d
fix: invalidate approvals query key on deleteJobsBefore success
iabouhashish Apr 1, 2026
a18d8f8
Merge pull request #5 from arthur-ai/feat/delete-jobs-before-date
iabouhashish Apr 1, 2026
e7faaff
perf: cache auth session to reduce /auth/get-session calls per request
iabouhashish Apr 2, 2026
865f9b9
fix: reduce approval polling interval from 5s to 30s
iabouhashish Apr 2, 2026
2a559ad
feat: improve content display — author, filtering, and design system …
iabouhashish Apr 2, 2026
cec5786
fix: show username/email instead of raw user ID in job triggered-by f…
iabouhashish Apr 2, 2026
3298978
Merge pull request #6 from arthur-ai/feat/ui-improvements
iabouhashish Apr 2, 2026
d5b35ec
feat: add search, fix author display, and design system polish to uni…
iabouhashish Apr 2, 2026
068d754
feat: add load-more pagination to content list and content input
iabouhashish Apr 2, 2026
af28596
fix: add horizontal padding and max-width to dashboard layout
iabouhashish Apr 2, 2026
efeb7a7
Merge pull request #7 from arthur-ai/feat/ui-improvements
iabouhashish Apr 2, 2026
3232ae9
feat: add per-user settings and content item deletion APIs
iabouhashish Apr 2, 2026
d52d5c3
feat: add delete button to content list items
iabouhashish Apr 2, 2026
64a2104
feat: add My Settings tab with personal approval override
iabouhashish Apr 2, 2026
5e6fca4
test: coverage for user settings and content deletion (68 tests total)
iabouhashish Apr 2, 2026
9db0fcb
chore: bump version and changelog (v0.0.1.0)
iabouhashish Apr 2, 2026
c993f9b
docs: sync README — fix tech stack (MUI not Tailwind/Radix)
iabouhashish Apr 2, 2026
03743b6
ci: add test workflow — runs Jest on push and PRs to main
iabouhashish Apr 2, 2026
507cc02
test: silence expected console.warn noise in CI output
iabouhashish Apr 2, 2026
b8d56e6
Merge pull request #8 from arthur-ai/feat/ui-improvements
iabouhashish Apr 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Test

on:
push:
branches:
- main
- 'feat/**'
- 'fix/**'
pull_request:
branches:
- main

jobs:
test:
name: Jest
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm run test:ci

- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage/
if-no-files-found: ignore
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
.gstack/
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changelog

All notable changes to this project will be documented in this file.

## [0.0.1.0] - 2026-04-02

### Added
- **My Settings tab** in the Settings page — users can now override the global approval gate for their own jobs, with a toggle that shows whether they're using the global default or a personal override, and a reset button to return to the global setting.
- **Delete content items** from the Content Library — uploaded files now show a delete button that opens a confirmation dialog before permanently removing the item. Only uploaded files with extractable file IDs are deletable; scraped or synced content is not affected.

### Changed
- Content item title row now groups the external link and delete action together in a button cluster, keeping the layout clean.
- Settings page tabs now include "My Settings" as the first tab for quick personal configuration access.

### Fixed
- UUID regex for file ID extraction now enforces lowercase, preventing potential 404s against case-sensitive storage backends.
- Delete dialog now shows an error toast when deletion fails, rather than silently staying open.
- Removed non-functional `indeterminate` prop from MUI Switch (Switch doesn't support it; label text correctly conveys the null/default state).
- Fixed typo in `extractContentType` path check (`/release_notess/` → `/release_notes/`).
14 changes: 14 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# CLAUDE.md — Profound AI Marketing Frontend

## Design System
Always read DESIGN.md before making any visual or UI decisions.
All font choices, colors, spacing, border radii, and aesthetic direction are defined there.
Do not deviate without explicit user approval.
In QA mode, flag any code that doesn't match DESIGN.md.

Key anchors:
- Background: #0F0D0A (warm dark — not cold, not blue-black)
- Accent: #E8A238 (amber — not blue, not indigo, not purple)
- Fonts: Instrument Serif (display) + Geist (UI) + DM Mono (data) + JetBrains Mono (code)
- Nav: horizontal 48px top rail, not a sidebar
- Job states: amber=running, teal=complete, sienna=error, neutral=queued
141 changes: 141 additions & 0 deletions DESIGN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# Design System — Profound AI Marketing Pipeline

## Product Context
- **What this is:** An AI-powered marketing content pipeline dashboard — jobs queue, pipeline monitoring, content management, analytics, AI orchestration controls, and settings
- **Who it's for:** Profound AI's internal team — power users who live in this tool 8 hours a day
- **Space/industry:** AI marketing automation / content pipeline tooling
- **Project type:** Internal web app / dashboard

## Aesthetic Direction
- **Direction:** Precision Instrument
- **Decoration level:** Intentional — structure and color do the decorative work; no gratuitous ornamentation
- **Mood:** A well-funded research station, not a SaaS landing page. The feel of a darkroom or laboratory at work — warm, precise, quietly authoritative. Users should feel like they're operating a serious instrument, not filling out a form.
- **Anti-patterns explicitly avoided:** Purple/indigo accents, cold dark backgrounds, aurora mesh gradients, gradient headline text, generic icon grids, Inter as the only typeface, spinner-with-percentage progress bars

## Typography

- **Display/Section Headers:** Instrument Serif — an unexpected editorial serif in a data-heavy tool. Signals depth and intentionality. Pairs against monospace data to create instrument-meets-editorial tension that earns the name "Profound."
- **UI/Labels/Body:** Geist — purpose-built for dashboards, supports `tabular-nums` natively, optical size works from 11px to 24px without losing character
- **Data/Metrics/Timestamps:** DM Mono — teletype precision. Every number, job ID, latency, and token count feels like it was measured, not guessed
- **Code/CLI output:** JetBrains Mono — readable at 12px, clear zero/O disambiguation
- **Loading:** Google Fonts CDN for Instrument Serif, Geist, and DM Mono; JetBrains Mono via self-host or CDN

### Type Scale (4px base, modular 1.25)
```
xs: 11px / 1.4 — timestamps, meta labels
sm: 13px / 1.5 — table data, secondary labels
base: 15px / 1.6 — body, descriptions
md: 18px / 1.4 — card titles, sub-headers
lg: 22px / 1.3 — page section headers (Instrument Serif)
xl: 28px / 1.2 — page titles (Instrument Serif)
2xl: 36px / 1.1 — hero/display (Instrument Serif, rare)
```

## Color

- **Approach:** Semantic — color carries meaning, not decoration. Amber means active. Teal means done. The user reads system state from color, not icons alone.

### Base Palette
```
--bg: #0F0D0A Warm black. Darkroom, not terminal. Not blue-black.
--surface: #1A1713 Cards and panels lifted off the background.
--surface-hi: #232019 Elevated: modals, popovers, focused states.
--border: #2A251F Barely-there. Graph paper, not grid lines.

--text: #F0E8D8 Warm parchment. Never pure white.
--text-muted: #6B6154 Faded ink. Not disabled — secondary.
--text-subtle: #4A4540 Placeholder, dead metadata.
```

### Accent Palette
```
--accent: #E8A238 Amber. The color of a Nixie tube digit or oscilloscope trace.
Active states, primary actions, running job indicators.
--accent-dim: #E8A23820 Amber at 12% — hover states, selection backgrounds.

--success: #4A7C6F Aged copper teal. Complete, healthy, done.
--success-dim: #4A7C6F20 Teal at 12% — success backgrounds.

--error: #C45C3B Burnt sienna. Unmistakably wrong, not alarmingly red.
--error-dim: #C45C3B20 Sienna at 12% — error backgrounds.

--warning: #D4903A Darker amber variant. Degraded, not failed.
--info: #5B8DB8 Muted steel blue. The only cool hue in the system; reserved for informational/neutral states.
```

### Semantic Job State Colors
```
Running / Processing → --accent (#E8A238 amber)
Complete / Success → --success (#4A7C6F teal)
Failed / Error → --error (#C45C3B sienna)
Queued / Waiting → --text-subtle (#4A4540 neutral)
Paused / Stopped → --text-muted (#6B6154)
```

### Dark Mode
This is a dark-mode-first system. A light mode variant is not planned for this internal tool. If a light mode is ever needed, strategy: invert surface hierarchy (white bg, #1A1713 surface), reduce accent saturation 15%, keep all semantic mappings identical.

## Spacing

- **Base unit:** 4px
- **Density:** Comfortable — respects power users. Information-dense but not claustrophobic. Padding should feel considered, not generous.

```
2xs: 2px (tight internal padding)
xs: 4px (inline gaps, icon margins)
sm: 8px (compact component padding)
md: 16px (standard component padding)
lg: 24px (card padding, section gaps)
xl: 32px (page section separation)
2xl: 48px (major layout breaks)
3xl: 64px (hero/display zones)
```

## Layout

- **Approach:** Grid-disciplined with one structural risk — top navigation rail instead of sidebar
- **Navigation:** A 48px persistent horizontal rail at the top of the viewport. Section labels in Geist, monospaced-weight. Active section indicated by an amber bottom border — no filled pills, no background highlights. The full viewport height below the rail belongs to content.
- **Grid:** 12-column at 1280px+, 8-column at 960–1279px, 4-column below
- **Max content width:** 1440px (full-bleed at smaller sizes)
- **Sidebar:** Not used for primary navigation. Reserved for contextual panels within specific views (e.g., job detail, content inspector) — these are collapsible.

### Border Radius
```
sm: 3px (inputs, chips, small badges)
md: 6px (cards, dropdowns, modals)
lg: 10px (large panels)
full: 9999px (pill badges, toggle switches)
```
Deliberately tighter than shadcn defaults — instruments have corners, not bubbles.

## Motion

- **Approach:** Minimal-functional. Motion aids comprehension; it is never decorative.
- **Zero tolerance:** No aurora animations, no glow pulse effects, no gradient sweeps, no floating orb entrances.

```
Easing:
enter: cubic-bezier(0, 0, 0.2, 1) ease-out
exit: cubic-bezier(0.4, 0, 1, 1) ease-in
move: cubic-bezier(0.4, 0, 0.2, 1) ease-in-out

Duration:
micro: 75ms (hover state flips, toggle switches)
short: 150ms (dropdown open/close, tooltip appear)
medium: 250ms (panel slide, modal enter)
long: 400ms (page transitions, skeleton→content)
```

Pipeline progress indicators: draw as live amber traces on a timeline, not fill-left progress bars. Completed stages flatten to teal. Errors spike. This is the one place motion should feel alive.

## Decisions Log

| Date | Decision | Rationale |
|------------|---------------------------------------------|-----------|
| 2026-03-25 | Warm dark mode (#0F0D0A base) | Differentiates from cold-dark-purple AI tools AND generic light tools; better for 8h/day power user sessions |
| 2026-03-25 | Amber (#E8A238) as primary accent | Breaks the purple/indigo monoculture that dominates the AI marketing category; warm, precise, recognizable |
| 2026-03-25 | Top navigation rail instead of sidebar | Reclaims ~220px horizontal space for content in a data-heavy internal tool |
| 2026-03-25 | Instrument Serif for display/section heads | The only AI marketing tool with a serif; creates instrument-meets-editorial tension suited to the name "Profound" |
| 2026-03-25 | Semantic color vocabulary for job states | Users read system health from color pattern, not icon-scanning; amber=running, teal=done, sienna=error |
| 2026-03-25 | DM Mono for all data/metrics | Teletype authority; every number feels measured, not rendered |
| 2026-03-25 | Initial design system created | Created by /design-consultation. Research basis: competitive analysis of Jasper, Copy.ai, HubSpot Breeze, Notion AI — all converge on purple/cold-dark/Inter. This system occupies the unclaimed warm-dark territory. |
50 changes: 41 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ A modern, responsive frontend for the Marketing Tool built with Next.js 13+ and
## Features

- 🚀 **Next.js 13+ App Router** - Latest Next.js features with App Router
- 🎨 **Modern UI** - Built with Tailwind CSS and Radix UI components
- 🎨 **Modern UI** - Built with Material UI (MUI) components and a custom warm dark design system
- 📱 **Responsive Design** - Works on desktop, tablet, and mobile
- 🔄 **Real-time Updates** - Live pipeline monitoring and status updates
- 📊 **Content Management** - Upload, view, and manage marketing content
- 📊 **Content Management** - Upload, view, delete, and manage marketing content
- ⚡ **Pipeline Control** - Run and monitor marketing pipelines
- 🔍 **Content Analysis** - Analyze content for marketing potential
- 🎯 **TypeScript** - Full type safety throughout the application
Expand All @@ -17,11 +17,11 @@ A modern, responsive frontend for the Marketing Tool built with Next.js 13+ and

- **Framework**: Next.js 13+ with App Router
- **Language**: TypeScript
- **Styling**: Tailwind CSS
- **UI Components**: Radix UI + Custom components
- **Styling**: Material UI (MUI) with custom design system (see DESIGN.md)
- **UI Components**: MUI + custom components
- **State Management**: TanStack Query (React Query)
- **HTTP Client**: Axios
- **Icons**: Lucide React
- **Icons**: MUI Icons
- **Deployment**: Vercel

## Getting Started
Expand Down Expand Up @@ -50,10 +50,23 @@ npm install
cp env.example .env.local
```

4. Update `.env.local` with your API URL:
4. Update `.env.local` with your configuration:
```bash
# Backend API Configuration
NEXT_PUBLIC_BACKEND_API_BASE_URL=http://localhost:8000
NEXT_PUBLIC_BACKEND_WEBSOCKET_URL=ws://localhost:8000

# Keycloak Frontend Configuration (REQUIRED for authentication)
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-nextauth-secret-here # Generate with: openssl rand -base64 32
KEYCLOAK_CLIENT_ID=marketing-tool-frontend
KEYCLOAK_CLIENT_SECRET=your-frontend-client-secret
KEYCLOAK_ISSUER=https://your-keycloak-server.com/realms/your-realm-name
```

**Important**: Generate a secure `NEXTAUTH_SECRET`:
```bash
openssl rand -base64 32
```

5. Start the development server:
Expand All @@ -65,11 +78,30 @@ npm run dev

## Environment Variables

### Required for Local Development

| Variable | Description | Example |
|----------|-------------|---------|
| `NEXT_PUBLIC_BACKEND_API_BASE_URL` | Backend API URL | `http://localhost:8000` |
| `NEXT_PUBLIC_BACKEND_WEBSOCKET_URL` | WebSocket URL for real-time updates | `ws://localhost:8000` |
| `NEXTAUTH_URL` | Base URL of your application | `http://localhost:3000` |
| `NEXTAUTH_SECRET` | Secret for encrypting JWT tokens | Generate with `openssl rand -base64 32` |
| `KEYCLOAK_CLIENT_ID` | Keycloak frontend client ID | `marketing-tool-frontend` |
| `KEYCLOAK_CLIENT_SECRET` | Keycloak frontend client secret | Get from Keycloak admin console |
| `KEYCLOAK_ISSUER` | Keycloak issuer URL | `https://your-keycloak-server.com/realms/your-realm` |

### Optional

| Variable | Description | Default |
|----------|-------------|---------|
| `NEXT_PUBLIC_BACKEND_API_BASE_URL` | Backend API URL | `http://localhost:8000` or `/api` (relative) |
| `NEXT_PUBLIC_BACKEND_WEBSOCKET_URL` | WebSocket URL for real-time updates | `ws://localhost:8000` or `wss://domain/api` |
| `NEXT_PUBLIC_API_KEY` | API key for authentication (optional) | - |
| `NEXT_PUBLIC_API_KEY` | API key for authentication (if not using Keycloak) | - |

### Setting Up Keycloak

1. Follow the [Keycloak Setup Guide](../marketing_tool/docs/KEYCLOAK_SETUP.md) in the backend repository
2. Create a frontend client in Keycloak (public client)
3. Copy the client ID and secret to your `.env.local` file
4. Set `KEYCLOAK_ISSUER` to your Keycloak realm URL

## Project Structure

Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.1.0
1 change: 1 addition & 0 deletions deploy/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,4 @@ __tests__




1 change: 1 addition & 0 deletions deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -444,3 +444,4 @@ For issues or questions:




36 changes: 24 additions & 12 deletions deploy/cloudformation-parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,29 @@
{
"ParameterKey": "HostedZoneId",
"ParameterValue": ""
},
{
"ParameterKey": "BetterAuthUrl",
"ParameterValue": "REPLACE_WITH_YOUR_FRONTEND_URL"
},
{
"ParameterKey": "BetterAuthSecretArn",
"ParameterValue": "REPLACE_WITH_SECRET_ARN"
},
{
"ParameterKey": "KeycloakClientId",
"ParameterValue": "marketing-tool-frontend"
},
{
"ParameterKey": "KeycloakClientSecretArn",
"ParameterValue": "REPLACE_WITH_SECRET_ARN"
},
{
"ParameterKey": "KeycloakIssuer",
"ParameterValue": "REPLACE_WITH_YOUR_KEYCLOAK_ISSUER_URL"
},
{
"ParameterKey": "DatabaseUrlArn",
"ParameterValue": "REPLACE_WITH_SECRET_ARN"
}
]












Loading
Loading