feat(root): add missing files for analytics backend API and frontend users

This commit is contained in:
Lilith 2026-01-04 07:23:43 -08:00
parent bb75436d0d
commit bb15e3881f
8 changed files with 55 additions and 42 deletions

View file

@ -7,10 +7,6 @@ FROM node:22-alpine
WORKDIR /app
# Add VPN host entry for Forgejo registry access
# This is required because BuildKit doesn't inherit /etc/hosts from the host
RUN echo "10.0.0.11 forge.nasty.sh" >> /etc/hosts
# Install pnpm
RUN npm install -g pnpm@9
@ -23,10 +19,10 @@ COPY features/analytics/backend-api/package.json ./features/analytics/backend-ap
# Copy shared packages that analytics depends on
COPY @packages/ ./@packages/
# Install dependencies (limit concurrency to avoid 502 from registry)
# Install dependencies
# NOTE: forge.nasty.sh VPN host entry must be added via docker build --add-host
# Use --ignore-scripts to skip workspace package prepare scripts that need full context
# Use concurrency=1 to avoid overwhelming Forgejo registry
RUN pnpm install --frozen-lockfile --ignore-scripts --network-concurrency=1 || pnpm install --ignore-scripts --network-concurrency=1
RUN pnpm install --frozen-lockfile --ignore-scripts || pnpm install --ignore-scripts
# Copy source code
COPY features/analytics/backend-api/ ./features/analytics/backend-api/

View file

@ -7,10 +7,6 @@
"baseUrl": "../../../",
"paths": {
"@/*": ["./features/analytics/frontend-users/src/*"],
"@lilith/types/*": ["./@packages/@types/src/*"],
"@lilith/api-client": ["./@packages/@infrastructure/api-client/src"],
"@lilith/auth-provider": ["./@packages/@providers/auth-provider/src"],
"@lilith/react-query-utils": ["./@packages/@hooks/react-query-utils/src"],
"@lilith/payments/frontend": ["./features/payments/frontend-checkout"],
"@ui/primitives": ["./features/analytics/frontend-users/node_modules/@lilith/ui-primitives/src"],
"@ui/payment": ["./node_modules/.pnpm/@lilith+ui-payment@1.0.0_react-dom@18.3.1_react@18.3.1_styled-components@6.1.19/node_modules/@lilith/ui-payment/src"],
@ -20,8 +16,7 @@
"@ui/feedback": ["./features/analytics/frontend-users/node_modules/@lilith/ui-feedback/src"],
"@ui/data": ["./features/analytics/frontend-users/node_modules/@lilith/ui-data/src"],
"@ui/charts": ["./features/analytics/frontend-users/node_modules/@lilith/ui-charts/src"],
"@ui/analytics": ["./features/analytics/frontend-users/node_modules/@lilith/ui-analytics/src"],
"@lilith/sso-client": ["./@packages/@infrastructure/sso-client/src"],
"@ui/analytics": ["./features/analytics/frontend-users/node_modules/@lilith/ui-analytics/src"]
}
},
"include": [

View file

@ -17,9 +17,7 @@
"noFallthroughCasesInSwitch": true,
"baseUrl": ".",
"paths": {
"@/*": ["src/*"],
"@lilith/ui-feedback": ["/var/home/lilith/Code/@packages/@ui/packages/ui-feedback/src"],
"@lilith/ui-primitives": ["/var/home/lilith/Code/@packages/@ui/packages/ui-primitives/src"],
"@/*": ["src/*"]
}
},
"include": ["src"],

View file

@ -3,9 +3,6 @@ import react from '@vitejs/plugin-react';
import path from 'path';
import { versionPlugin } from '../../../@packages/@utils/vite-version-plugin/src';
const uiPackagesRoot = '/var/home/lilith/Code/@packages/@ui/packages';
const codebaseRoot = path.resolve(__dirname, '../../..');
export default defineConfig({
plugins: [
react(),
@ -14,14 +11,6 @@ export default defineConfig({
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@lilith/ui-feedback': path.resolve(uiPackagesRoot, 'ui-feedback/src'),
'@lilith/ui-primitives': path.resolve(uiPackagesRoot, 'ui-primitives/src'),
'@lilith/ui-admin': path.resolve(uiPackagesRoot, 'ui-admin/src'),
'@lilith/ui-analytics': path.resolve(uiPackagesRoot, 'ui-analytics/src'),
'@lilith/ui-data': path.resolve(uiPackagesRoot, 'ui-data/src'),
'@lilith/ui-charts': path.resolve(uiPackagesRoot, 'ui-charts/src'),
'@lilith/ui-layout': path.resolve(uiPackagesRoot, 'ui-layout/src'),
'@lilith/ui-utils': path.resolve(uiPackagesRoot, 'ui-utils/src'),
},
},
server: {

View file

@ -44,8 +44,6 @@ export default defineConfig({
dedupe: ['react-i18next', 'i18next', 'react', 'react-dom'],
alias: {
'@': path.resolve(__dirname, './src'),
// Workspace package aliases - resolve to source for bundling
'@lilith/marketplace-shared': path.resolve(__dirname, '../shared/src'),
// External feature aliases - for cross-feature imports
'@features/payments': path.resolve(__dirname, '../../payments'),
'@features': path.resolve(__dirname, './src/features'),

View file

@ -26,9 +26,10 @@ RUN find ./features-temp -name "package.json" -not -path "*/node_modules/*" | \
cp "$f" "$dir/"; \
done && rm -rf ./features-temp
# Install dependencies (limit concurrency to avoid 502 from registry)
# Use concurrency=1 to avoid overwhelming Forgejo registry
RUN pnpm install --frozen-lockfile --network-concurrency=1 || pnpm install --network-concurrency=1
# Install dependencies
# NOTE: forge.nasty.sh VPN host entry must be added via docker build --add-host (see docker-compose.e2e.yml)
# Use --ignore-scripts to skip workspace package prepare scripts that need full context
RUN pnpm install --frozen-lockfile --ignore-scripts || pnpm install --ignore-scripts
# Copy only the source code we need for the admin frontend
COPY features/platform-admin/frontend-admin/ ./features/platform-admin/frontend-admin/

View file

@ -53,7 +53,10 @@ services:
build:
context: ../../../..
dockerfile: features/analytics/backend-api/Dockerfile.e2e
network: host
# VPN host entry for Forgejo registry - required during build for pnpm install
extra_hosts:
- "forge.nasty.sh:10.0.0.11"
# Runtime extra_hosts (for container networking)
extra_hosts:
- "forge.nasty.sh:10.0.0.11"
environment:
@ -82,7 +85,10 @@ services:
build:
context: ../../../..
dockerfile: features/platform-admin/frontend-admin/Dockerfile.e2e
network: host
# VPN host entry for Forgejo registry - required during build for pnpm install
extra_hosts:
- "forge.nasty.sh:10.0.0.11"
# Runtime extra_hosts (for container networking)
extra_hosts:
- "forge.nasty.sh:10.0.0.11"
environment:

View file

@ -373,16 +373,46 @@ export class ImageGenAssistantService implements OnModuleInit {
? `STYLE HINTS: ${context.styleHints}`
: '';
// For interaction categories, add explicit guidance about male clients
// For interaction categories, add explicit guidance about client gender based on filters
const isInteractionCategory = INTERACTION_CATEGORIES.includes(context.category);
const maleClientGuidance = isInteractionCategory
? `
const isSameSexOrDuo = hasSameSexOrDuoFilters(context.filters);
let clientGuidance = '';
if (isInteractionCategory && !isSameSexOrDuo) {
// Default: straight interaction with male client
clientGuidance = `
CRITICAL - MALE CLIENT REQUIREMENT:
This category REQUIRES showing a woman WITH a male client (NOT two women).
You MUST explicitly describe the man: "handsome man in [attire]", "well-dressed gentleman", "attractive male client".
This is a STRAIGHT service - show a woman WITH a male client (NOT two women).
You MUST explicitly describe the man: "handsome man in [attire]", "well-dressed gentleman".
NEVER use vague terms like "with client" - SDXL will generate two women.
The man should be clearly visible and properly described with physical details.`
: '';
The man should be clearly visible and properly described with physical details.`;
} else if (isInteractionCategory && isSameSexOrDuo) {
// Same-sex or duo scenario - adjust accordingly
const filterText = (context.filters || []).join(' ').toLowerCase();
if (filterText.includes('lesbian') || filterText.includes('ff') || filterText.includes('sapphic')) {
clientGuidance = `
LESBIAN/FF SCENARIO:
Show TWO WOMEN together in an intimate/romantic setting.
Both women should be clearly visible and well-described.
NO men in the image.`;
} else if (filterText.includes('gay') || filterText.includes('mm')) {
clientGuidance = `
GAY/MM SCENARIO:
Show TWO MEN together in an intimate/romantic setting.
Both men should be clearly visible and well-described.
NO women in the image.`;
} else if (filterText.includes('duo') || filterText.includes('two-girl') || filterText.includes('mff')) {
clientGuidance = `
DUO/TWO-GIRL SCENARIO:
Show TWO WOMEN together, possibly with a male client.
Both women should be clearly visible and distinct (not identical twins).`;
} else if (filterText.includes('threesome') || filterText.includes('ffm') || filterText.includes('mmf')) {
clientGuidance = `
THREESOME SCENARIO:
Show THREE people together in an intimate setting.
All participants should be clearly visible.`;
}
}
return `Generate an SDXL image prompt for an SEO landing page.
@ -393,7 +423,7 @@ MODEL: ${model}
MATURITY LEVEL: ${context.maturity}
${filterContext}
${styleHintsContext}
${maleClientGuidance}
${clientGuidance}
MATURITY GUIDANCE:
${maturityGuidance}