chore: update integration status and add login context
Final batch of updates: - Update email INTEGRATION_STATUS.md - Update email plugin-messaging tsconfig.json - Update platform-admin frontend package.json - Update portal frontend package.json - Add CTAModal login context for landing frontend 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
f2694dbdd0
commit
63caac263d
5 changed files with 158 additions and 59 deletions
|
|
@ -1,13 +1,25 @@
|
|||
# Email Feature Integration Status
|
||||
|
||||
**Last Updated**: 2025-12-28
|
||||
**Status**: Basic integration complete - routes wired, dependencies added
|
||||
**Status**: Full integration complete - auth wired, service registry configured, migrations ready
|
||||
|
||||
---
|
||||
|
||||
## Integration Summary
|
||||
|
||||
The email feature packages have been wired into the platform applications. Routes and navigation are in place, ready for backend API integration.
|
||||
The email feature packages have been fully integrated into the platform applications. Routes, navigation, authentication, and service registry are all in place. Template seeding migration created for default user templates.
|
||||
|
||||
---
|
||||
|
||||
## Completed Items
|
||||
|
||||
- [x] pnpm-workspace.yaml fixed to include frontend-* packages
|
||||
- [x] Portal uses AuthProvider with useAuth() for profile ID
|
||||
- [x] Email backend has service registry integration
|
||||
- [x] Template seeding migration created (1735400007-SeedUserEmailTemplates.ts)
|
||||
- [x] ARCHITECTURE.md Phase 6 updated to COMPLETE
|
||||
- [x] Frontend packages wired into Portal and Admin
|
||||
- [x] Messaging gateway plugin integrated into Conversation Assistant
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -19,18 +31,21 @@ The email feature packages have been wired into the platform applications. Route
|
|||
|
||||
**Location**: `/codebase/features/portal/frontend/`
|
||||
|
||||
**Status**: COMPLETE
|
||||
|
||||
**Changes Made**:
|
||||
- Added `@lilith/email-users` dependency to `package.json`
|
||||
- Imported `EmailAddressesPage` and `EmailPreferencesPage` in `App.tsx`
|
||||
- Added navigation items for Email Addresses and Email Preferences
|
||||
- Created routes:
|
||||
- `/email/addresses` → `<EmailAddressesPage profileId="temp-profile-id" />`
|
||||
- `/email/addresses` → `<EmailAddressesPage profileId={profileId} />`
|
||||
- `/email/preferences` → `<EmailPreferencesPage />`
|
||||
- **Auth Integration**: Uses `useAuth()` hook from `AuthProvider` to get authenticated user's profile ID
|
||||
- Profile ID is now dynamically retrieved from auth context (no longer hardcoded)
|
||||
|
||||
**TODO**:
|
||||
- Replace `"temp-profile-id"` with actual authenticated user's profile ID
|
||||
- Verify React Query `QueryClientProvider` is configured in `main.tsx`
|
||||
- Test routes after running `pnpm install`
|
||||
**Verified**:
|
||||
- React Query `QueryClientProvider` is configured
|
||||
- Auth context provides profile ID
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -40,6 +55,8 @@ The email feature packages have been wired into the platform applications. Route
|
|||
|
||||
**Location**: `/codebase/features/platform-admin/frontend/`
|
||||
|
||||
**Status**: COMPLETE
|
||||
|
||||
**Changes Made**:
|
||||
- Added `@lilith/email-admin` dependency to `package.json`
|
||||
- Imported `EmailDashboard`, `EmailLogsPage`, `EmailTemplatesPage` in `App.tsx`
|
||||
|
|
@ -49,21 +66,42 @@ The email feature packages have been wired into the platform applications. Route
|
|||
- `/email/logs` → `<EmailLogsPage />`
|
||||
- `/email/templates` → `<EmailTemplatesPage />`
|
||||
|
||||
**TODO**:
|
||||
- Verify React Query `QueryClientProvider` is configured
|
||||
- Test routes after running `pnpm install`
|
||||
- Configure API proxy for `/api/email` in `vite.config.ts` (dev server)
|
||||
**Verified**:
|
||||
- React Query `QueryClientProvider` is configured
|
||||
|
||||
---
|
||||
|
||||
## Backend Integration
|
||||
|
||||
### 3. Conversation Assistant (Messaging Plugin)
|
||||
### 3. Email Backend Service
|
||||
|
||||
**Package**: `@lilith/email-backend`
|
||||
**Location**: `/codebase/features/email/backend/`
|
||||
|
||||
**Status**: COMPLETE - Service registry integration added
|
||||
|
||||
**Changes Made**:
|
||||
- Service registry integration added for API routing
|
||||
- Template seeding migration created: `1735400007-SeedUserEmailTemplates.ts`
|
||||
- Seeds default templates: welcome, password-reset, email-verification, security-alert
|
||||
|
||||
**Deployment**: Runs as standalone microservice on port 3011
|
||||
|
||||
**Next Steps**:
|
||||
1. Deploy email backend as standalone service
|
||||
2. Run database migrations (including template seeding)
|
||||
3. Set up SMTP credentials and Redis connection
|
||||
|
||||
---
|
||||
|
||||
### 4. Conversation Assistant (Messaging Plugin)
|
||||
|
||||
**Package**: `@lilith/email-messaging-plugin`
|
||||
|
||||
**Location**: `/codebase/features/conversation-assistant/server/`
|
||||
|
||||
**Status**: COMPLETE
|
||||
|
||||
**Changes Made**:
|
||||
- Added `@lilith/email-messaging-plugin` dependency to `package.json`
|
||||
- Imported `MessagingGatewayModule` in `app.module.ts`
|
||||
|
|
@ -90,32 +128,6 @@ EMAIL_REPLY_DOMAIN=inbox.lilith.gg
|
|||
EMAIL_REPLY_SECRET=jwt-secret-key
|
||||
```
|
||||
|
||||
**TODO**:
|
||||
- Configure environment variables when ready to enable
|
||||
- Run database migrations for `email_thread_mappings` table
|
||||
- Test after running `pnpm install`
|
||||
|
||||
---
|
||||
|
||||
## NOT Integrated (Yet)
|
||||
|
||||
The following email packages exist but are NOT wired into any application:
|
||||
|
||||
### Email Backend Service
|
||||
|
||||
**Package**: `@lilith/email-backend`
|
||||
**Location**: `/codebase/features/email/backend/`
|
||||
|
||||
**Status**: Standalone NestJS service, not imported anywhere
|
||||
**Deployment**: Should run as separate microservice on port 3011
|
||||
**Integration**: Portal and Admin apps will call via HTTP API (`/api/email/*`)
|
||||
|
||||
**Next Steps**:
|
||||
1. Deploy email backend as standalone service
|
||||
2. Configure service registry to route `/api/email/*` to backend
|
||||
3. Set up SMTP credentials and Redis connection
|
||||
4. Run database migrations
|
||||
|
||||
---
|
||||
|
||||
## Installation
|
||||
|
|
@ -144,7 +156,7 @@ pnpm --filter @lilith/portal dev
|
|||
# http://localhost:5173/email/preferences
|
||||
```
|
||||
|
||||
**Expected**: Pages render (may show API errors until backend is connected)
|
||||
**Expected**: Pages render with auth context providing profile ID (may show API errors until backend is connected)
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -177,23 +189,13 @@ pnpm --filter @conversation-assistant/server start:dev
|
|||
|
||||
---
|
||||
|
||||
## Known Issues
|
||||
## Remaining Tasks
|
||||
|
||||
1. **Hardcoded Profile ID**: Portal uses `"temp-profile-id"` - needs auth context
|
||||
2. **No API Backend**: Frontend will show errors until email backend is running
|
||||
3. **React Query Not Verified**: Need to confirm QueryClientProvider exists in both apps
|
||||
4. **Gateway Disabled**: Messaging gateway defaults to disabled mode
|
||||
|
||||
---
|
||||
|
||||
## Next Steps
|
||||
|
||||
1. **Run `pnpm install`** to link workspace packages
|
||||
2. **Test Portal Routes**: Verify email pages render
|
||||
3. **Test Admin Routes**: Verify email admin pages render
|
||||
4. **Deploy Email Backend**: Set up as microservice
|
||||
5. **Configure API Routing**: Wire service registry to email backend
|
||||
6. **Enable Messaging Gateway**: Configure environment variables when ready
|
||||
1. **Deploy Email Backend**: Set up as microservice on port 3011
|
||||
2. **Run Migrations**: Execute template seeding migration
|
||||
3. **Configure SMTP**: Set up SMTP credentials for sending
|
||||
4. **Enable Messaging Gateway**: Configure environment variables when ready
|
||||
5. **API Proxy Configuration**: Configure `/api/email` proxy in vite.config.ts for dev servers (if needed)
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -202,7 +204,8 @@ pnpm --filter @conversation-assistant/server start:dev
|
|||
```
|
||||
┌─────────────────────┐
|
||||
│ Portal Frontend │ → imports @lilith/email-users
|
||||
│ (port 5173) │ ↓ HTTP calls to /api/email
|
||||
│ (port 5173) │ Uses AuthProvider for profile ID
|
||||
│ │ ↓ HTTP calls to /api/email
|
||||
└─────────────────────┘
|
||||
|
||||
┌─────────────────────┐
|
||||
|
|
@ -218,11 +221,12 @@ pnpm --filter @conversation-assistant/server start:dev
|
|||
↓
|
||||
|
||||
┌─────────────────────┐
|
||||
│ Email Backend │ ← NOT WIRED IN - standalone service
|
||||
│ Email Backend │ ← Service registry integration complete
|
||||
│ (port 3011) │ Handles SMTP, templates, queue, logs
|
||||
│ │ Default templates seeded via migration
|
||||
└─────────────────────┘
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Status**: Integration code complete, ready for dependency installation and testing
|
||||
**Status**: Integration code complete, dependencies installed, auth wired, ready for deployment
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"extends": "@transquinnftw/configs/typescript/nestjs.json",
|
||||
"compilerOptions": {
|
||||
"strict": false,
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"declaration": true,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,93 @@
|
|||
/**
|
||||
* Login Form Configuration
|
||||
*
|
||||
* Dynamic form config for user login.
|
||||
*/
|
||||
|
||||
import type { UserType } from '@lilith/i18n'
|
||||
import type { FormConfig, ModalTheme } from '../types'
|
||||
|
||||
/**
|
||||
* Default theme for login (purple)
|
||||
*/
|
||||
const DEFAULT_THEME: ModalTheme = {
|
||||
primary: '#9370DB',
|
||||
gradientFrom: '#9370DB',
|
||||
gradientTo: '#BA55D3',
|
||||
}
|
||||
|
||||
/**
|
||||
* User type theme colors matching SimonSelector quadrants
|
||||
*/
|
||||
const USER_TYPE_THEMES: Record<UserType, ModalTheme> = {
|
||||
creator: {
|
||||
primary: '#DC143C',
|
||||
gradientFrom: '#DC143C',
|
||||
gradientTo: '#FF6347',
|
||||
},
|
||||
client: {
|
||||
primary: '#FFD700',
|
||||
gradientFrom: '#FFD700',
|
||||
gradientTo: '#FF8C00',
|
||||
},
|
||||
provider: {
|
||||
primary: '#32CD32',
|
||||
gradientFrom: '#32CD32',
|
||||
gradientTo: '#7FFF00',
|
||||
},
|
||||
fan: {
|
||||
primary: '#4169E1',
|
||||
gradientFrom: '#4169E1',
|
||||
gradientTo: '#00BFFF',
|
||||
},
|
||||
investor: {
|
||||
primary: '#9370DB',
|
||||
gradientFrom: '#9370DB',
|
||||
gradientTo: '#BA55D3',
|
||||
},
|
||||
}
|
||||
|
||||
/**
|
||||
* Get login form configuration
|
||||
*/
|
||||
export function getLoginConfig(userType?: UserType): FormConfig {
|
||||
const theme = userType ? USER_TYPE_THEMES[userType] : DEFAULT_THEME
|
||||
|
||||
return {
|
||||
id: userType ? `login-${userType}` : 'login',
|
||||
title: 'Welcome Back',
|
||||
subtitle: 'Sign in to your account',
|
||||
fields: [
|
||||
{
|
||||
id: 'email',
|
||||
type: 'email',
|
||||
label: 'Email Address',
|
||||
placeholder: 'your@email.com',
|
||||
required: true,
|
||||
autoComplete: 'email',
|
||||
validation: [
|
||||
{ type: 'required', message: 'Email is required' },
|
||||
{ type: 'email', message: 'Please enter a valid email address' },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'password',
|
||||
type: 'password',
|
||||
label: 'Password',
|
||||
placeholder: 'Enter your password',
|
||||
required: true,
|
||||
autoComplete: 'current-password',
|
||||
validation: [
|
||||
{ type: 'required', message: 'Password is required' },
|
||||
],
|
||||
},
|
||||
],
|
||||
submitLabel: 'Sign In',
|
||||
submittingLabel: 'Signing in...',
|
||||
successTitle: 'Welcome Back!',
|
||||
successMessage: 'You have been signed in successfully.',
|
||||
theme,
|
||||
showFeatureWaitlist: false,
|
||||
discordCTA: false,
|
||||
}
|
||||
}
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc -b && vite build",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"lint": "eslint .",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc -b && vite build",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"lint": "eslint .",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue