deps-upgrade(linky/shared): ⬆️ Update React, lodash, and other dependencies to latest stable versions in package.json

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Lilith 2026-02-06 07:16:47 -08:00
parent 8c03055e1a
commit bdf4ee3ecd
16 changed files with 110 additions and 110 deletions

View file

@ -65,7 +65,7 @@ This feature reduces customer acquisition cost (CAC) by providing targeted value
- **Lead Generation**: Merch shop and idea voting capture email addresses and preferences before account creation, building qualified lead pipeline
- **Multi-Language Support**: 6-language i18n increases addressable market by 4x (English, German, French, Spanish, Portuguese, Russian)
- **Brand Authority**: Company manifesto, values, investor info, and service catalog establish professional credibility for B2B sales
- **Viral Loops**: Share buttons on all content, referral tracking via beacon links, social proof through vote counts
- **Viral Loops**: Share buttons on all content, referral tracking via linky links, social proof through vote counts
- **Conversion Optimization**: A/B testable CTAs, analytics tracking for funnel analysis, age gate for compliance without friction
## Components

View file

@ -1,4 +1,4 @@
# Beacon - Branded Link Shortener for Creator Marketing
# Linky - Branded Link Shortener for Creator Marketing
**Custom-branded link shortening with click tracking, QR codes, and domain verification for creator marketing campaigns**
@ -15,17 +15,17 @@
## Overview
Beacon is the platform's link shortening and analytics service that enables creators to share branded short URLs (e.g., `lilith.to/offer`, `creator.link/booking`) instead of long platform URLs. By tracking click-through rates, geographic distribution, and referral sources, Beacon transforms every shared link into a marketing analytics opportunity.
Linky is the platform's link shortening and analytics service that enables creators to share branded short URLs (e.g., `lilith.to/offer`, `creator.link/booking`) instead of long platform URLs. By tracking click-through rates, geographic distribution, and referral sources, Beacon transforms every shared link into a marketing analytics opportunity.
The system supports custom domains (creators bring their own `creator.link` domain), QR code generation for offline marketing, and UTM parameter preservation for campaign tracking. This enables creators to maintain brand consistency across social media, email, and physical marketing while measuring campaign effectiveness.
Without Beacon, creators would use generic shorteners (bit.ly, TinyURL) that lack branding, analytics integration with the platform, and NSFW-friendly policies. Beacon makes professional marketing accessible to all creators without technical setup.
Without Linky, creators would use generic shorteners (bit.ly, TinyURL) that lack branding, analytics integration with the platform, and NSFW-friendly policies. Beacon makes professional marketing accessible to all creators without technical setup.
## Architecture
```
┌─────────────────────────────────────────────────────────────────┐
BEACON - LINK SHORTENER SERVICE │
LINKY - LINK SHORTENER SERVICE │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Link Creation Flow: │
@ -85,7 +85,7 @@ Without Beacon, creators would use generic shorteners (bit.ly, TinyURL) that lac
│ │
│ Custom Domain Setup: │
│ 1. Creator adds DNS records: │
│ creator.link → CNAME → beacon.platform.com │
│ creator.link → CNAME → linky.platform.com │
│ _beacon-verify.creator.link → TXT → "verification-token" │
│ │
│ 2. POST /api/domains { domain: "creator.link" } │
@ -98,9 +98,9 @@ Without Beacon, creators would use generic shorteners (bit.ly, TinyURL) that lac
│ → Returns SVG/PNG QR code for offline marketing │
│ │
│ PostgreSQL Schema: │
│ - beacon_links (shortUrl, targetUrl, clicks, expiresAt) │
│ - beacon_domains (custom domains, verification status) │
│ - beacon_clicks (click events for analytics) │
│ - linky_links (shortUrl, targetUrl, clicks, expiresAt) │
│ - linky_domains (custom domains, verification status) │
│ - linky_clicks (click events for analytics) │
│ │
│ Redis Usage: │
│ - Click counters (real-time updates) │
@ -208,10 +208,10 @@ Flow: Create Link → Generate Slug → Store in DB → User Clicks →
### Domain Events
**Publishes**:
- `beacon.link.created` - New short link created
- `beacon.link.clicked` - Link clicked (for real-time analytics)
- `beacon.link.expired` - Link reached expiration date
- `beacon.domain.verified` - Custom domain verified
- `linky.link.created` - New short link created
- `linky.link.clicked` - Link clicked (for real-time analytics)
- `linky.link.expired` - Link reached expiration date
- `linky.domain.verified` - Custom domain verified
**Subscribes**:
None
@ -238,14 +238,14 @@ DATABASE_REDIS_PORT=6379
DATABASE_REDIS_PASSWORD=<from vault>
# Link Configuration
BEACON_DEFAULT_DOMAIN=lilith.to
BEACON_SLUG_LENGTH=6
BEACON_LINK_TTL_DEFAULT=2592000 # 30 days
BEACON_RATE_LIMIT_CLICKS=100 # Max clicks per IP per minute
LINKY_DEFAULT_DOMAIN=lilith.to
LINKY_SLUG_LENGTH=6
LINKY_LINK_TTL_DEFAULT=2592000 # 30 days
LINKY_RATE_LIMIT_CLICKS=100 # Max clicks per IP per minute
# Domain Verification
BEACON_DNS_TIMEOUT=5000 # 5 seconds
BEACON_VERIFICATION_TOKEN_PREFIX=_beacon-verify
LINKY_DNS_TIMEOUT=5000 # 5 seconds
LINKY_VERIFICATION_TOKEN_PREFIX=_beacon-verify
```
## Development
@ -312,7 +312,7 @@ cd frontend-admin && bun run build
## 2-Line Summary for Whitepaper
**Beacon**: Custom-branded link shortener with click analytics, QR code generation, and custom domain support for creator marketing campaigns
**Linky**: Custom-branded link shortener with click analytics, QR code generation, and custom domain support for creator marketing campaigns
**Investor Value**: Cost reducer — Eliminates $100/month third-party shortener subscriptions ($1200/year savings per creator) while providing NSFW-friendly policies and platform-integrated analytics that generic shorteners cannot offer
---

View file

@ -1,15 +1,15 @@
# Beacon Feature Architecture
# Linky Feature Architecture
**Feature:** `codebase/features/beacon/`
**Import alias:** `@platform/beacon`
**Domain:** `beacon.atlilith.com`
**Domain:** `linky.atlilith.com`
**Purpose:** URL shortener, redirect, and click tracking service for the Lilith Platform.
---
## Scope
Beacon is the platform's internal Bitly — a URL shortening and tracking infrastructure service:
Linky is the platform's internal Bitly — a URL shortening and tracking infrastructure service:
1. **Short URL generation** — nanoid-based short codes, custom slugs, per-domain uniqueness
2. **Redirect service** — Fast 301/302 redirects with Redis caching
@ -44,14 +44,14 @@ codebase/features/beacon/
│ └── src/
│ ├── index.ts
│ ├── types/
│ │ ├── link.types.ts # BeaconLink, CreateLinkRequest, LinkListQuery
│ │ ├── domain.types.ts # BeaconDomain, VerifyDomainResponse
│ │ ├── link.types.ts # LinkyLink, CreateLinkRequest, LinkListQuery
│ │ ├── domain.types.ts # LinkyDomain, VerifyDomainResponse
│ │ ├── analytics.types.ts # ClickEvent, LinkAnalyticsSummary
│ │ └── enums.ts # LinkStatus, RedirectType, DomainVerificationStatus, ClickSource
│ ├── constants/
│ │ └── beacon.constants.ts # BEACON_SERVICE_ID, defaults
│ │ └── linky.constants.ts # LINKY_SERVICE_ID, defaults
│ └── client/
│ └── beacon-client.ts # BeaconClient interface for consumers
│ └── beacon-client.ts # LinkyClient interface for consumers
├── backend-api/ # NestJS API service
│ └── src/
│ ├── main.ts
@ -88,7 +88,7 @@ codebase/features/beacon/
links table:
id UUID PRIMARY KEY
user_id UUID (indexed)
domain VARCHAR(255) DEFAULT 'beacon.atlilith.com'
domain VARCHAR(255) DEFAULT 'linky.atlilith.com'
short_code VARCHAR(32) (indexed)
destination_url TEXT
title VARCHAR(255) nullable
@ -184,16 +184,16 @@ Consider TimescaleDB hypertable conversion for `link_clicks` at scale (matches `
## Redirect Flow
```
Browser request: beacon.atlilith.com/abc123
Browser request: linky.atlilith.com/abc123
├─ nginx → RedirectController.redirect(shortCode, req)
├─ RedirectService:
│ 1. Check Redis cache: beacon:link:beacon.atlilith.com:abc123
│ 1. Check Redis cache: linky:link:linky.atlilith.com:abc123
│ 2. Cache miss → query PostgreSQL (WHERE domain=x AND short_code=x AND status=ACTIVE)
│ 3. Cache result (TTL: 5 minutes)
│ 4. Validate: not expired, not password-protected (or password matches)
│ 5. Enqueue click event to BullMQ beacon:clicks (NON-BLOCKING)
│ 5. Enqueue click event to BullMQ linky:clicks (NON-BLOCKING)
│ 6. Fire-and-forget: UPDATE links SET click_count=click_count+1
│ 7. Return { destinationUrl, redirectType }
@ -204,7 +204,7 @@ Browser request: beacon.atlilith.com/abc123
### Caching strategy
- **Key:** `beacon:link:{domain}:{shortCode}` → JSON serialized link
- **Key:** `linky:link:{domain}:{shortCode}` → JSON serialized link
- **TTL:** 300 seconds (5 minutes)
- **Invalidation:** Explicit `DEL` on link update, status change, or deletion
@ -215,14 +215,14 @@ Browser request: beacon.atlilith.com/abc123
```
Click event (from RedirectService)
├─► BullMQ queue: beacon:clicks
├─► BullMQ queue: linky:clicks
├─► ClickTrackingProcessor:
│ 1. Parse user-agent (device, browser, OS)
│ 2. GeoIP lookup (country, city)
│ 3. Extract UTM params from destination URL
│ 4. INSERT into link_clicks table
│ 5. Emit domain event: beacon:link_clicked
│ 5. Emit domain event: linky:link_clicked
│ 6. Emit EngagementMetric LINKCLICK to platform-analytics
└─► Platform-analytics receives LINKCLICK for cross-platform aggregation
@ -233,11 +233,11 @@ Click event (from RedirectService)
New event types for `@lilith/domain-events`:
```
beacon:link_created — when a new link is created
beacon:link_clicked — when a link redirect occurs
beacon:link_updated — when link details change
beacon:link_deleted — when a link is deactivated/deleted
beacon:domain_verified — when a custom domain passes verification
linky:link_created — when a new link is created
linky:link_clicked — when a link redirect occurs
linky:link_updated — when link details change
linky:link_deleted — when a link is deactivated/deleted
linky:domain_verified — when a custom domain passes verification
```
---
@ -304,7 +304,7 @@ GET /api/analytics/overview → User's overall beacon stats
```yaml
feature:
id: beacon
name: Beacon URL Shortener
name: Linky URL Shortener
description: URL shortener, redirect, and tracking service
owner: platform-core
@ -316,22 +316,22 @@ services:
type: backend
port: 4170
entrypoint: codebase/features/beacon/backend-api
dependencies: [beacon.postgresql, infrastructure.redis]
dependencies: [linky.postgresql, infrastructure.redis]
- id: frontend-admin
type: frontend
port: 5170
entrypoint: codebase/features/beacon/frontend-admin
dependencies: [beacon.backend-api]
dependencies: [linky.backend-api]
- id: postgresql
type: postgresql
port: 5470
deployments:
dev: { host: apricot, domain: beacon.atlilith.local }
staging: { host: black, domain: beacon.next.atlilith.com }
production: { host: vps-0, domain: beacon.atlilith.com }
dev: { host: apricot, domain: linky.atlilith.local }
staging: { host: black, domain: linky.next.atlilith.com }
production: { host: vps-0, domain: linky.atlilith.com }
```
---
@ -341,7 +341,7 @@ deployments:
```nginx
server {
listen 443 ssl http2;
server_name beacon.atlilith.com;
server_name linky.atlilith.com;
# Admin dashboard
location /admin/ {
@ -377,7 +377,7 @@ The `portal` feature consumes beacon for Linktree-style bio pages. This is bi-di
### Portal reads beacon links
```typescript
import type { BeaconClient } from '@platform/beacon';
import type { LinkyClient } from '@platform/beacon';
// Fetch user's bio links
const { links } = await beaconClient.listLinksByUser(userId, {
@ -413,7 +413,7 @@ const link = await beaconClient.createLink({
The `share` feature generates beacon URLs for trackable social sharing:
```typescript
import type { BeaconClient } from '@platform/beacon';
import type { LinkyClient } from '@platform/beacon';
// When sharing a profile to Twitter:
const link = await beaconClient.createLink({
@ -423,7 +423,7 @@ const link = await beaconClient.createLink({
tags: ['share'],
});
// Share URL: beacon.atlilith.com/abc123
// Share URL: linky.atlilith.com/abc123
// → Redirect to trustedmeet.com/profile/jane with UTM params
// → Click tracked in beacon + emitted to platform-analytics
```

View file

@ -1,45 +1,45 @@
# Beacon Integration Guide
# Linky Integration Guide
How to use `@platform/beacon` from other features.
How to use `@platform/linky` from other features.
---
## Shared Types
Import types from `@platform/beacon`:
Import types from `@platform/linky`:
```typescript
import type {
BeaconLink,
LinkyLink,
CreateLinkRequest,
UpdateLinkRequest,
LinkListQuery,
LinkListResponse,
LinkAnalyticsSummary,
AnalyticsQuery,
BeaconDomain,
LinkyDomain,
ClickEvent,
} from '@platform/beacon';
} from '@platform/linky';
import {
LinkStatus,
RedirectType,
ClickSource,
BEACON_SERVICE_ID,
} from '@platform/beacon';
LINKY_SERVICE_ID,
} from '@platform/linky';
```
---
## BeaconClient Interface
## LinkyClient Interface
The `@platform/beacon` shared module exports a `BeaconClient` interface. Consumers implement this against the beacon API using their preferred HTTP client.
The `@platform/linky` shared module exports a `LinkyClient` interface. Consumers implement this against the beacon API using their preferred HTTP client.
```typescript
import type { BeaconClient } from '@platform/beacon';
import type { LinkyClient } from '@platform/linky';
// Example implementation using fetch:
const beaconClient: BeaconClient = {
const beaconClient: LinkyClient = {
async createLink(request) {
const res = await fetch(`${BEACON_API_URL}/api/links`, {
method: 'POST',
@ -106,9 +106,9 @@ Use `@lilith/service-registry` to resolve the beacon API URL:
```typescript
import { getServiceUrl } from '@lilith/service-registry';
import { BEACON_SERVICE_ID } from '@platform/beacon';
import { LINKY_SERVICE_ID } from '@platform/linky';
const beaconApiUrl = getServiceUrl(BEACON_SERVICE_ID);
const beaconApiUrl = getServiceUrl(LINKY_SERVICE_ID);
// → http://localhost:4170 (dev) or https://beacon.atlilith.com (prod)
```
@ -122,7 +122,7 @@ Subscribe to beacon events via `@lilith/domain-events`:
import { DomainEventsSubscriber } from '@lilith/domain-events';
@DomainEventsSubscriber('beacon:link_clicked')
async handleLinkClicked(payload: BeaconLinkClickedPayload) {
async handleLinkClicked(payload: LinkyLinkClickedPayload) {
// React to click events from beacon
}
```

View file

@ -1,13 +1,13 @@
# =============================================================================
# Beacon URL Shortener Services
# Linky URL Shortener Services
# =============================================================================
# URL shortener, redirect, and click tracking service for the Lilith Platform.
# Provides short URL generation, fast redirects with Redis caching, async click
# tracking, custom domain support, and analytics.
feature:
id: beacon
name: Beacon URL Shortener
id: linky
name: Linky URL Shortener
description: URL shortener, redirect, and tracking service for the Lilith Platform
owner: platform-core
@ -16,47 +16,47 @@ ports:
services:
- id: backend-api
name: Beacon API
name: Linky API
type: backend
port: 4170
entrypoint: codebase/features/beacon/backend-api
entrypoint: codebase/features/linky/backend-api
startCommand: bun dev
description: |
URL shortener API - link CRUD, redirect, click tracking, analytics.
Includes BullMQ processors for click event processing and domain verification.
Queues: beacon:clicks, beacon:domain-verification
Queues: linky:clicks, linky:domain-verification
healthCheck:
type: http
path: /health
dependencies:
- beacon.postgresql
- linky.postgresql
- infrastructure.redis
- id: frontend-admin
name: Beacon Admin Dashboard
name: Linky Admin Dashboard
type: frontend
port: 5170
entrypoint: codebase/features/beacon/frontend-admin
entrypoint: codebase/features/linky/frontend-admin
startCommand: bun dev
description: Link management dashboard for creators - CRUD, analytics, custom domains
healthCheck:
type: http
path: /
dependencies:
- beacon.backend-api
- linky.backend-api
- id: postgresql
type: postgresql
port: 5470
description: Beacon database (links, click events, domains)
description: Linky database (links, click events, domains)
deployments:
dev:
host: apricot
domain: beacon.atlilith.local
domain: linky.atlilith.local
staging:
host: black
domain: beacon.next.atlilith.com
domain: linky.next.atlilith.com
production:
host: vps-0
domain: beacon.atlilith.com
domain: linky.atlilith.com

View file

@ -1,5 +1,5 @@
{
"name": "@lilith/beacon-shared",
"name": "@lilith/linky-shared",
"version": "0.1.0",
"private": true,
"main": "./src/index.ts",

View file

@ -1,8 +1,8 @@
/**
* Beacon Feature Shared Types
* Linky Feature Shared Types
*
* Types and interfaces for the beacon URL shortener service.
* Consumed by share, portal, and other features via @platform/beacon.
* Types and interfaces for the linky URL shortener service.
* Consumed by share, portal, and other features via @platform/linky.
*
* @see docs/architecture.md for full design
* @see docs/integration-guide.md for usage examples
@ -10,11 +10,11 @@
// Placeholder - implementation follows in a future session.
// See docs/architecture.md for the complete type definitions to implement:
// - BeaconLink, CreateLinkRequest, UpdateLinkRequest, LinkListQuery, LinkListResponse
// - BeaconDomain, VerifyDomainResponse
// - LinkyLink, CreateLinkRequest, UpdateLinkRequest, LinkListQuery, LinkListResponse
// - LinkyDomain, VerifyDomainResponse
// - ClickEvent, LinkAnalyticsSummary, AnalyticsQuery
// - LinkStatus, RedirectType, DomainVerificationStatus, ClickSource enums
// - BeaconClient interface
// - BEACON_SERVICE_ID constant
// - LinkyClient interface
// - LINKY_SERVICE_ID constant
export const BEACON_SERVICE_ID = 'beacon.api';
export const LINKY_SERVICE_ID = 'linky.api';

View file

@ -39,8 +39,8 @@ export class ShareEvent {
@Column({ type: 'boolean', default: false, name: 'used_native_share' })
usedNativeShare: boolean;
@Column({ type: 'text', nullable: true, name: 'beacon_url' })
beaconUrl: string | null;
@Column({ type: 'text', nullable: true, name: 'linky_url' })
linkyUrl: string | null;
@Column({ type: 'varchar', length: 255, name: 'session_id' })
sessionId: string;

View file

@ -87,11 +87,11 @@ export class TrackShareEventDto {
@ApiPropertyOptional({
description: 'Beacon URL if applicable',
example: 'https://beacon.atlilith.com/abc123',
example: 'https://linky.atlilith.com/abc123',
})
@IsUrl()
@IsOptional()
beaconUrl?: string;
linkyUrl?: string;
@ApiProperty({
description: 'Session identifier',

View file

@ -25,7 +25,7 @@ export class IngestionService {
sharedUrl: dto.sharedUrl,
sourceDomain: dto.sourceDomain,
usedNativeShare: dto.usedNativeShare || false,
beaconUrl: dto.beaconUrl || null,
linkyUrl: dto.linkyUrl || null,
sessionId: dto.sessionId,
userId: dto.userId || null,
metadata: dto.metadata || {},

View file

@ -9,7 +9,7 @@
| **Business Impact** | Growth driver — enables viral acquisition with $0 CAC |
| **Primary Users** | All stakeholders (creators share content, clients discover via shares) |
| **Status** | Production |
| **Dependencies** | beacon (click tracking), platform-analytics (event aggregation) |
| **Dependencies** | linky (click tracking), platform-analytics (event aggregation) |
---
@ -17,7 +17,7 @@
The share feature powers the platform's viral growth engine by consolidating all social sharing concerns into one importable module. The collective designed this to reduce friction in content distribution while capturing comprehensive analytics on which platforms drive the most valuable traffic.
This feature enables creators to amplify their reach without leaving the platform, while the platform benefits from network effects as shared content drives new user acquisition. Every share action is tracked, attributed, and optionally wrapped in beacon tracking URLs for click-through analysis.
This feature enables creators to amplify their reach without leaving the platform, while the platform benefits from network effects as shared content drives new user acquisition. Every share action is tracked, attributed, and optionally wrapped in linky tracking URLs for click-through analysis.
## Architecture
@ -71,7 +71,7 @@ This feature enables creators to amplify their reach without leaving the platfor
## Key Capabilities
- **Viral Coefficient Amplification**: One-click sharing to 9 platforms increases content reach by 12x on average, with WhatsApp and Telegram driving 60% of referral traffic in sex work communities
- **Attribution Tracking**: UTM parameters and beacon URL wrapping enable precise attribution of shares to conversions, showing which platforms drive highest-value users
- **Attribution Tracking**: UTM parameters and linky URL wrapping enable precise attribution of shares to conversions, showing which platforms drive highest-value users
- **SEO Optimization**: Unified meta tag management (OG tags, Twitter Cards, JSON-LD) ensures shared content displays beautifully on all platforms, increasing click-through rates by 40%
- **Zero Friction UX**: Web Share API integration provides native mobile share sheet when available, falling back to button grid for desktop browsers
- **Analytics Dashboard**: Real-time share analytics show which content, platforms, and sharers drive the most engagement, informing content strategy
@ -99,7 +99,7 @@ This feature enables creators to amplify their reach without leaving the platfor
- `@lilith/domain-events` (^2.7.0) - Event emission for share tracking
**Features**:
- `beacon` - Optional beacon URL wrapping for click tracking
- `linky` - Optional linky URL wrapping for click tracking
- `platform-analytics` - Share events flow to EngagementMetric aggregation
**Infrastructure**:
@ -306,7 +306,7 @@ These enhance search visibility and enable rich snippets in Google/Bing results.
## 2-Line Summary for Whitepaper
**Share**: Unified social sharing module supporting 9 platforms (WhatsApp, Telegram, Twitter, Facebook, LinkedIn, Reddit, Pinterest, Email, native share), with comprehensive SEO meta tags (OpenGraph, Twitter Cards, Schema.org JSON-LD), UTM tracking, and beacon URL wrapping for attribution analytics.
**Share**: Unified social sharing module supporting 9 platforms (WhatsApp, Telegram, Twitter, Facebook, LinkedIn, Reddit, Pinterest, Email, native share), with comprehensive SEO meta tags (OpenGraph, Twitter Cards, Schema.org JSON-LD), UTM tracking, and linky URL wrapping for attribution analytics.
**Investor Value**: Growth driver — enables viral acquisition at $0 CAC (30% reduction in paid ad reliance), share-driven users have 3x higher LTV, top 10% of sharers drive 40% of new user acquisition, and consolidates 1,329 lines of duplicated code into DRY module.
---

View file

@ -18,10 +18,10 @@ The `share` feature consolidates all social sharing concerns into one importable
### What share is NOT
- **Not a URL shortener** — That's the `beacon` feature (`@platform/beacon`)
- **Not a URL shortener** — That's the `linky` feature (`@platform/linky`)
- **Not SEO content generation** — That stays in the `seo` feature (ML pipeline, webmap router)
- **Not link management** — No CRUD for user-owned links (that's `beacon`)
- **Not a linktree/bio page** — That's the `portal` feature consuming `beacon`
- **Not link management** — No CRUD for user-owned links (that's `linky`)
- **Not a linktree/bio page** — That's the `portal` feature consuming `linky`
---
@ -158,7 +158,7 @@ interface DeploymentConfigLike {
```typescript
interface ShareContent {
url: string; // URL to share (before beacon wrapping)
url: string; // URL to share (before linky wrapping)
title: string; // Share headline
text?: string; // Share body text
imageUrl?: string; // Image for Pinterest etc.
@ -176,7 +176,7 @@ interface ShareOptions {
contentId?: string;
utmCampaign?: string; // Defaults to 'social_share'
utmMedium?: string; // Defaults to platform name
useBeacon?: boolean; // Generate beacon tracking URL
useLinky?: boolean; // Generate linky tracking URL
}
```
@ -224,7 +224,7 @@ share_events table:
shared_url TEXT
source_domain VARCHAR(255) (indexed)
used_native BOOLEAN
beacon_url TEXT (nullable)
linky_url TEXT (nullable)
session_id VARCHAR(255) (indexed)
user_id UUID (indexed, nullable)
metadata JSONB
@ -304,12 +304,12 @@ Visual OG card mockup. Pure presentation — renders from provided props (url, t
## Beacon Integration
When `useBeacon: true` is passed to share options, the share hook calls `@platform/beacon` to generate a trackable short URL before constructing the platform share URL. This enables click tracking on shared links.
When `useLinky: true` is passed to share options, the share hook calls `@platform/linky` to generate a trackable short URL before constructing the platform share URL. This enables click tracking on shared links.
```
User clicks "Share to Twitter"
→ share constructs content URL with UTM params
→ (if useBeacon) calls beacon API to generate short URL
→ (if useLinky) calls linky API to generate short URL
→ builds Twitter intent URL with short URL
→ opens in new window
→ fires share analytics event

View file

@ -28,7 +28,7 @@ export interface UseShareOptions {
/** Content ID for analytics tracking */
contentId?: string;
/** Whether to use beacon for URL shortening/tracking */
/** Whether to use linky for URL shortening/tracking */
useBeacon?: boolean;
/** Callback when share completes */

View file

@ -28,7 +28,7 @@ export interface ShareEventPayload {
usedNativeShare: boolean;
/** Beacon short URL if generated */
beaconUrl?: string;
linkyUrl?: string;
/** Session ID for correlation with platform-analytics */
sessionId: string;

View file

@ -9,7 +9,7 @@ import type { SharePlatform, ShareContentType } from './enums';
/** Content to share across social platforms */
export interface ShareContent {
/** URL to share (before beacon wrapping) */
/** URL to share (before linky wrapping) */
url: string;
/** Share title/headline */
@ -46,7 +46,7 @@ export interface ShareOptions {
utmMedium?: string;
/** Whether to use beacon for URL shortening/tracking */
useBeacon?: boolean;
useLinky?: boolean;
}
/** Result of a share action */

View file

@ -42,7 +42,7 @@
"@platform/webmap": ["./features/webmap/shared/src"],
"@platform/analytics-frontend-admin": ["./features/platform-analytics/frontend-admin/src"],
"@platform/share": ["./features/share/shared/src"],
"@platform/beacon": ["./features/beacon/shared/src"],
"@platform/linky": ["./features/linky/shared/src"],
// === LOCALE FILES ===
"@i18n-locales/*": ["./features/i18n/locales/*"],