From c812f016e633565606e01fd93c5c01387db8a859 Mon Sep 17 00:00:00 2001 From: VarshaK Date: Sat, 2 May 2026 21:46:35 +0100 Subject: [PATCH 1/2] test(testcases): refactor test data to use centralized mocks --- __tests__/integration/api-data-route.test.ts | 32 +++----------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/__tests__/integration/api-data-route.test.ts b/__tests__/integration/api-data-route.test.ts index d13a6fe..54164b1 100644 --- a/__tests__/integration/api-data-route.test.ts +++ b/__tests__/integration/api-data-route.test.ts @@ -5,41 +5,17 @@ import { POST } from '@/app/api/data/route'; import { createMockRequest } from '../utils/test-helpers'; +import { mockUser, mockAssessment, mockJournal } from '../mocks/test-data'; // Mock the Cloudant database functions jest.mock('@/lib/cloudant/db', () => ({ initializeDatabases: jest.fn().mockResolvedValue(true), saveUser: jest.fn().mockResolvedValue(true), - getUser: jest.fn().mockResolvedValue({ - _id: 'test_user_001', - email: 'test@example.com', - name: 'Test Mother', - mumType: 'returning_to_work', - createdAt: '2024-01-01T00:00:00.000Z', - }), + getUser: jest.fn().mockResolvedValue(mockUser), saveAssessment: jest.fn().mockResolvedValue(true), - getLatestAssessment: jest.fn().mockResolvedValue({ - _id: 'assessment_001', - userId: 'test_user_001', - scores: { - health: 7, - mind: 6, - relationships: 8, - work: 5, - nourish: 7, - }, - aiInsights: 'You are doing great! Focus on work-life balance.', - createdAt: '2024-01-01T00:00:00.000Z', - }), + getLatestAssessment: jest.fn().mockResolvedValue(mockAssessment), saveJournalEntry: jest.fn().mockResolvedValue(true), - getJournals: jest.fn().mockResolvedValue([{ - _id: 'journal_001', - userId: 'test_user_001', - entry: 'Today was challenging but I managed to stay positive.', - mood: 7, - aiReflection: 'Your resilience is admirable. Keep focusing on the positive.', - createdAt: '2024-01-01T00:00:00.000Z', - }]) + getJournals: jest.fn().mockResolvedValue([mockJournal]) })); describe('/api/data Route - Integration Tests', () => { From c0c38839221ad50517a85fbae05a6b5b2438d2cb Mon Sep 17 00:00:00 2001 From: VarshaK Date: Sat, 2 May 2026 22:30:29 +0100 Subject: [PATCH 2/2] docs(app-name): rebrand from Her.comeback.ai to SheCodes.AI --- CODE_IMPLEMENTATION_PLAN.md | 10 +++++----- IBM_CLOUD_SETUP.md | 2 +- IMPLEMENTATION_GUIDE.md | 20 ++++++++++---------- PLANNING_SUMMARY.md | 2 +- QUICK_START.md | 8 ++++---- RUN_SUMMARY.md | 6 +++--- TEST_REPORT.md | 2 +- WATSONX_SETUP_GUIDE.md | 16 ++++++++-------- app/about/page.tsx | 4 ++-- app/assessment/page.tsx | 4 ++-- app/blog/page.tsx | 2 +- app/contact/page.tsx | 2 +- app/mind/page.tsx | 2 +- lib/watsonx/client.ts | 6 +++--- scripts/setup-databases.js | 2 +- 15 files changed, 44 insertions(+), 44 deletions(-) diff --git a/CODE_IMPLEMENTATION_PLAN.md b/CODE_IMPLEMENTATION_PLAN.md index 01f96da..ecce0a3 100644 --- a/CODE_IMPLEMENTATION_PLAN.md +++ b/CODE_IMPLEMENTATION_PLAN.md @@ -85,7 +85,7 @@ async function testCloudant() { const testDoc = { _id: 'test_' + Date.now(), type: 'test', - message: 'Hello from Her.comeback.ai' + message: 'Hello from SheCodes.AI' }; await client.postDocument({ @@ -102,7 +102,7 @@ async function testCloudant() { import { generateText } from '../lib/watsonx/client'; async function testWatsonx() { - const prompt = 'Hello, this is a test message for Her.comeback.ai'; + const prompt = 'Hello, this is a test message for SheCodes.AI'; const response = await generateText(prompt); console.log('Prompt:', prompt); @@ -279,13 +279,13 @@ ibmcloud login --apikey ApiKey-ba67cf82-ab15-407a-818e-6999dbfeba72 -r us-south ibmcloud resource service-instances # 4. Create Cloudant (if needed) -ibmcloud resource service-instance-create her-cloudant-db cloudantnosqldb lite us-south +ibmcloud resource service-instance-create shecodes-cloudant-db cloudantnosqldb lite us-south # 5. Create credentials -ibmcloud resource service-key-create her-cloudant-credentials Manager --instance-name her-cloudant-db +ibmcloud resource service-key-create shecodes-cloudant-credentials Manager --instance-name shecodes-cloudant-db # 6. Get credentials -ibmcloud resource service-key her-cloudant-credentials --output json +ibmcloud resource service-key shecodes-cloudant-credentials --output json # 7. Install dependencies npm install tsx --save-dev diff --git a/IBM_CLOUD_SETUP.md b/IBM_CLOUD_SETUP.md index acaa046..136b766 100644 --- a/IBM_CLOUD_SETUP.md +++ b/IBM_CLOUD_SETUP.md @@ -1,4 +1,4 @@ -# IBM Cloud Integration Plan for Her.comeback.ai +# IBM Cloud Integration Plan for SheCodes.AI ## Overview This document outlines the complete setup process for integrating IBM Cloud services (Cloudant NoSQL Database and watsonx.ai) with the Her platform - an AI companion for mothers navigating life transitions. diff --git a/IMPLEMENTATION_GUIDE.md b/IMPLEMENTATION_GUIDE.md index aba6e5b..2b8a047 100644 --- a/IMPLEMENTATION_GUIDE.md +++ b/IMPLEMENTATION_GUIDE.md @@ -79,18 +79,18 @@ ibmcloud resource service-instances --service-name pm-20 ```bash # Create Cloudant instance (Lite plan - free) -ibmcloud resource service-instance-create her-cloudant-db \ +ibmcloud resource service-instance-create shecodes-cloudant-db \ cloudantnosqldb lite us-south # Wait for provisioning (check status) -ibmcloud resource service-instance her-cloudant-db +ibmcloud resource service-instance shecodes-cloudant-db # Create service credentials -ibmcloud resource service-key-create her-cloudant-credentials \ - Manager --instance-name her-cloudant-db +ibmcloud resource service-key-create shecodes-cloudant-credentials \ + Manager --instance-name shecodes-cloudant-db # Retrieve credentials -ibmcloud resource service-key her-cloudant-credentials --output json +ibmcloud resource service-key shecodes-cloudant-credentials --output json ``` **Copy the following from the output:** @@ -102,7 +102,7 @@ ibmcloud resource service-key her-cloudant-credentials --output json ### Option A: Using IBM Cloud Console (Recommended) 1. Go to https://dataplatform.cloud.ibm.com/ 2. Click "Create a project" → "Create an empty project" -3. Name it "Her AI Platform" +3. Name it "SheCodes AI Platform" 4. Note the Project ID from the project settings 5. Update `WATSONX_PROJECT_ID` in `.env.local` @@ -112,15 +112,15 @@ ibmcloud resource service-key her-cloudant-credentials --output json ibmcloud plugin install machine-learning # Create Watson Machine Learning instance -ibmcloud resource service-instance-create her-watsonx-ml \ +ibmcloud resource service-instance-create shecodes-watsonx-ml \ pm-20 lite us-south # Create service credentials -ibmcloud resource service-key-create her-watsonx-credentials \ - Manager --instance-name her-watsonx-ml +ibmcloud resource service-key-create shecodes-watsonx-credentials \ + Manager --instance-name shecodes-watsonx-ml # Retrieve credentials -ibmcloud resource service-key her-watsonx-credentials --output json +ibmcloud resource service-key shecodes-watsonx-credentials --output json ``` **Update `.env.local`:** diff --git a/PLANNING_SUMMARY.md b/PLANNING_SUMMARY.md index 7641795..4a27682 100644 --- a/PLANNING_SUMMARY.md +++ b/PLANNING_SUMMARY.md @@ -2,7 +2,7 @@ ## 📋 Planning Phase Complete -This document summarizes the planning work completed for integrating IBM Cloud services with Her.comeback.ai. +This document summarizes the planning work completed for integrating IBM Cloud services with SheCodes.AI. ## ✅ Completed Planning Tasks diff --git a/QUICK_START.md b/QUICK_START.md index e256812..575b465 100644 --- a/QUICK_START.md +++ b/QUICK_START.md @@ -52,14 +52,14 @@ ibmcloud resource service-instances --service-name pm-20 **Cloudant:** ```bash -ibmcloud resource service-instance-create her-cloudant-db cloudantnosqldb lite us-south -ibmcloud resource service-key-create her-cloudant-credentials Manager --instance-name her-cloudant-db -ibmcloud resource service-key her-cloudant-credentials --output json +ibmcloud resource service-instance-create shecodes-cloudant-db cloudantnosqldb lite us-south +ibmcloud resource service-key-create shecodes-cloudant-credentials Manager --instance-name shecodes-cloudant-db +ibmcloud resource service-key shecodes-cloudant-credentials --output json ``` **watsonx.ai:** - Go to https://dataplatform.cloud.ibm.com/ -- Create project → "Her AI Platform" +- Create project → "SheCodes AI Platform" - Copy Project ID ### 6. Update `.env.local` diff --git a/RUN_SUMMARY.md b/RUN_SUMMARY.md index 9211c0d..62d43ba 100644 --- a/RUN_SUMMARY.md +++ b/RUN_SUMMARY.md @@ -1,4 +1,4 @@ -# Her.comeback.ai - Run Summary & Status Report +# SheCodes.AI - Run Summary & Status Report **Date**: May 2, 2026 **Status**: ✅ Application Running Successfully @@ -57,7 +57,7 @@ **Quick Steps**: 1. Go to https://dataplatform.cloud.ibm.com/ -2. Create project "Her AI Platform" +2. Create project "SheCodes AI Platform" 3. Copy Project ID 4. Update `.env.local`: ```bash @@ -322,8 +322,8 @@ npm run test:ai --- ## 🎊 Summary +**Your SheCodes.AI application is running successfully!** -**Your Her.comeback.ai application is running successfully!** ✅ **What's Ready**: - Development server on port 3002 diff --git a/TEST_REPORT.md b/TEST_REPORT.md index 45ff2b1..b9663b5 100644 --- a/TEST_REPORT.md +++ b/TEST_REPORT.md @@ -1,4 +1,4 @@ -# Her.comeback.ai - Test Report +# SheCodes.AI - Test Report **Date**: May 2, 2026 **Test Environment**: Local Development diff --git a/WATSONX_SETUP_GUIDE.md b/WATSONX_SETUP_GUIDE.md index 1fd830a..fb6658e 100644 --- a/WATSONX_SETUP_GUIDE.md +++ b/WATSONX_SETUP_GUIDE.md @@ -37,8 +37,8 @@ This guide will help you set up IBM watsonx.ai to enable real AI-powered respons 2. Click **"New project"** button 3. Select **"Create an empty project"** 4. Fill in project details: - - **Name**: `Her AI Platform` - - **Description**: `AI companion for mothers - Her.comeback.ai` + - **Name**: `SheCodes AI Platform` + - **Description**: `AI companion for mothers - SheCodes.AI` - **Storage**: Select existing Cloud Object Storage or create new 5. Click **"Create"** @@ -111,21 +111,21 @@ ibmcloud plugin install machine-learning #### Step 4: Create Watson Machine Learning Instance ```bash # Create instance (Lite plan - free) -ibmcloud resource service-instance-create her-watsonx-ml \ +ibmcloud resource service-instance-create shecodes-watsonx-ml \ pm-20 lite us-south # Wait for provisioning -ibmcloud resource service-instance her-watsonx-ml +ibmcloud resource service-instance shecodes-watsonx-ml ``` #### Step 5: Create Service Credentials ```bash # Create credentials -ibmcloud resource service-key-create her-watsonx-credentials \ - Manager --instance-name her-watsonx-ml +ibmcloud resource service-key-create shecodes-watsonx-credentials \ + Manager --instance-name shecodes-watsonx-ml # Get credentials -ibmcloud resource service-key her-watsonx-credentials --output json +ibmcloud resource service-key shecodes-watsonx-credentials --output json ``` #### Step 6: Create Project via API @@ -138,7 +138,7 @@ curl -X POST "https://api.dataplatform.cloud.ibm.com/v2/projects" \ -H "Authorization: $TOKEN" \ -H "Content-Type: application/json" \ -d '{ - "name": "Her AI Platform", + "name": "SheCodes AI Platform", "description": "AI companion for mothers", "storage": { "type": "bmcos_object_storage", diff --git a/app/about/page.tsx b/app/about/page.tsx index 672e309..951212d 100644 --- a/app/about/page.tsx +++ b/app/about/page.tsx @@ -6,7 +6,7 @@ export default function AboutPage() {
{/* MINIMAL NAVBAR */}