Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
97157a4
Good with dummy data, very buggy, not finalized
Developing-Gamer Mar 10, 2026
388796c
Better design, still a lot of bugs, not final
Developing-Gamer Mar 10, 2026
c0bf265
Add email overview metrics and enhance chart interactivity
Developing-Gamer Mar 10, 2026
8467fc5
Add monthly active users metric and enhance dashboard interactivity
Developing-Gamer Mar 10, 2026
cb96f84
Merge branch 'dev' into overview-revamp
Developing-Gamer Mar 10, 2026
b71f9a1
Enhance dashboard interactivity with custom date range support
Developing-Gamer Mar 11, 2026
4ba4c7e
Completed, design, dummy data, not design-components
Developing-Gamer Mar 11, 2026
4a823a5
Refactor dashboard components to utilize DesignAnalyticsCard
Developing-Gamer Mar 11, 2026
f34c4ba
Enhance analytics overview with additional visitor metrics
Developing-Gamer Mar 11, 2026
4bd4ed2
Cursor PR review changes #1
Developing-Gamer Mar 11, 2026
6672e70
Enhance ComposedAnalyticsChart with conditional rendering for visitor…
Developing-Gamer Mar 11, 2026
659b5a6
Enhance PageLayout and ComposedAnalyticsChart with new props and cond…
Developing-Gamer Mar 11, 2026
2cb2596
Merge branch 'dev' into overview-revamp
Developing-Gamer Mar 11, 2026
1bdf953
fix
Developing-Gamer Mar 11, 2026
515d695
Refactor seeding functions and enhance metrics loading logic
Developing-Gamer Mar 12, 2026
d15f3f9
Refactor date handling in metrics loading functions
Developing-Gamer Mar 12, 2026
d3bd0f2
Refactor UUID handling and improve metrics data sanitization
Developing-Gamer Mar 12, 2026
919ae53
Merge branch 'dev' into overview-revamp
Developing-Gamer Mar 12, 2026
28956a9
Merge remote-tracking branch 'origin/dev' into overview-revamp
N2D4 Apr 3, 2026
5c42f80
Fix PR comments
N2D4 Apr 4, 2026
396a9b2
Enhance metrics calculations and UI components
mantrakp04 Apr 6, 2026
3f9b656
Refactor metrics data retrieval to use raw SQL queries
mantrakp04 Apr 6, 2026
3147102
Merge branch 'dev' into overview-revamp
mantrakp04 Apr 6, 2026
c7f64ca
Enhance metrics functionality and introduce deterministic UUIDs
mantrakp04 Apr 6, 2026
ea576c2
Add chart demo components for interactive data visualization
mantrakp04 Apr 8, 2026
451bbb0
Implement new analytics chart demo components
mantrakp04 Apr 8, 2026
dec11b4
Refactor analytics chart components and update imports
mantrakp04 Apr 8, 2026
3dd62d4
Add db:seed-activity script and enhance image validation in AI query …
mantrakp04 Apr 9, 2026
6c718e1
Merge branch 'dev' into overview-revamp
mantrakp04 Apr 9, 2026
11014b0
Refactor backend seed scripts and enhance data grid functionality
mantrakp04 Apr 10, 2026
7ff0cf8
Enhance image attachment validation and refactor related components
mantrakp04 Apr 11, 2026
a812ba2
Merge branch 'dev' into overview-revamp
mantrakp04 Apr 13, 2026
c17eb7c
Enhance AI Query Functionality and UI Components
mantrakp04 Apr 13, 2026
de3de70
Add Metrics Helper Functions and Tests
mantrakp04 Apr 13, 2026
31d3a8d
Refactor Analytics Metrics Queries
mantrakp04 Apr 13, 2026
19ad10e
Merge branch 'dev' into overview-revamp
mantrakp04 Apr 13, 2026
a52cba2
Update test snapshots to reflect changes in risk scores for sign-up m…
mantrakp04 Apr 13, 2026
7076f77
Increase timeout for internal metrics and team invitations tests to 1…
mantrakp04 Apr 14, 2026
ac1949b
Merge branch 'dev' into overview-revamp
N2D4 Apr 14, 2026
561d918
Merge branch 'dev' into overview-revamp
N2D4 Apr 14, 2026
096237c
Merge branch 'dev' into overview-revamp
mantrakp04 Apr 14, 2026
8ff2ad7
Merge branch 'dev' into overview-revamp
mantrakp04 Apr 14, 2026
49cef06
Merge branch 'dev' into overview-revamp
mantrakp04 Apr 15, 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
566 changes: 550 additions & 16 deletions apps/backend/prisma/seed.ts

Large diffs are not rendered by default.

1,020 changes: 1,014 additions & 6 deletions apps/backend/src/app/api/latest/internal/metrics/route.tsx

Large diffs are not rendered by default.

52 changes: 49 additions & 3 deletions apps/dashboard/DESIGN-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ If this guide conflicts with older examples in the codebase, follow this guide.

Always prefer components from `apps/dashboard/src/components/design-components`.

- Do not build new ad-hoc visual primitives (for example custom `GlassCard`, custom badge pills, custom pill toggles, custom list rows) if a design-components component exists.
- Do not build new ad-hoc visual primitives (for example custom `GlassCard`, custom `ChartCard`, custom badge pills, custom pill toggles, custom list rows) if a design-components component exists.
- If the desired UI can be achieved by tweaking/customizing/extending a design-components component, do that instead of creating a page-local alternative.
- In all cases, default to design-components first; only use a non-design-components approach when there is absolutely no viable way to achieve the result with design-components.
- Use `@/components/ui/*` primitives only when no design-components equivalent exists, or when the design-components component intentionally wraps the primitive.
Expand All @@ -29,6 +29,7 @@ Use this when implementing a new dashboard UI quickly:

1. Need a section container/card?
- Use `DesignCard`.
- For chart-heavy analytics surfaces (especially Recharts tooltips/overflow), use `DesignAnalyticsCard`.
2. Need user-facing status/info/warning/error message?
- Use `DesignAlert`.
3. Need small semantic label (sent, failed, queued, active)?
Expand Down Expand Up @@ -253,6 +254,36 @@ Default recommendation:
- for dashboard sections, use `glassmorphic` style (either explicit or via nesting context)
- use `gradient="default"` unless there is semantic reason for colored tint

### 4.1.1 `DesignAnalyticsCard` (and chart helpers)

File: `apps/dashboard/src/components/design-components/analytics-card.tsx`

Use for:

- chart-heavy analytics shells on overview and metrics surfaces
- cards where chart tooltips need to escape clipping/stacking issues
- previously duplicated glass analytics wrappers (`ChartCard`, `GlassCard` clones)

Exports:

- `DesignAnalyticsCard`
- `DesignAnalyticsCardHeader`
- `DesignChartLegend`
- `useInfiniteListWindow`
- `DesignInfiniteScrollList`

`DesignAnalyticsCard` props:

- `gradient`: `"blue" | "cyan" | "purple" | "green" | "orange" | "slate"`
- `className`

Rules:

- prefer `DesignAnalyticsCard` over local chart wrappers for overview/analytics cards
- keep chart implementation local (Recharts config, data transforms), but keep shell/legend/list plumbing shared
- use `DesignChartLegend` instead of hand-rolled dot/label legend rows when layout matches
- use `useInfiniteListWindow` for incremental scrolling lists in analytics/list tabs

### 4.2 `DesignAlert`

File: `apps/dashboard/src/components/design-components/alert.tsx`
Expand Down Expand Up @@ -551,6 +582,20 @@ Reference surfaces:

Current pattern in these pages often uses custom card/header/pill components. New and refactored code should standardize to design-components primitives as follows.

### 5.0 `/projects/[projectId]/(overview)` analytics surfaces

Use:

- chart/list shells: `DesignAnalyticsCard`
- compact chart headers: `DesignAnalyticsCardHeader`
- stacked chart legends: `DesignChartLegend`
- incremental list rendering: `useInfiniteListWindow` (or `DesignInfiniteScrollList` where it fits)

Avoid:

- page-local `ChartCard` wrappers
- duplicated `IntersectionObserver` list window logic per card

### 5.1 `/projects/[projectId]/emails`

Use:
Expand Down Expand Up @@ -774,7 +819,7 @@ Use this checklist before opening a dashboard UI PR:

## 10) Anti-Patterns (Do Not Introduce)

- Creating local `GlassCard` components instead of `DesignCard`.
- Creating local `GlassCard`/`ChartCard` components instead of `DesignCard` or `DesignAnalyticsCard`.
- Creating local status pills instead of `DesignBadge`.
- Creating local segmented/pill selectors instead of `DesignPillToggle`.
- Using raw `Alert`/`Button` in standard dashboard surfaces where `DesignAlert`/`DesignButton` should be used.
Expand All @@ -786,7 +831,7 @@ Use this checklist before opening a dashboard UI PR:

When touching existing email/project pages, migrate in this order:

1. Cards/surfaces (`DesignCard`)
1. Cards/surfaces (`DesignCard` / `DesignAnalyticsCard` for chart-heavy shells)
2. Alerts (`DesignAlert`)
3. Badges (`DesignBadge`)
4. Toggles/tabs (`DesignPillToggle` / `DesignCategoryTabs`)
Expand All @@ -806,3 +851,4 @@ Whenever a new reusable visual pattern is introduced in dashboard features:
- then document the component contract and preferred usage here
- avoid introducing permanent page-local UI primitives that duplicate design-components behavior


Loading
Loading