feat: Initial implementation of Marketing Assistant AI for Adriana James

- Set up FastAPI backend with modular structure:

  - main.py for API routing

  - copywriter.py for AI-powered content generation using Cohere

  - embeddings.py for generating and reranking content embeddings

  - vector_store.py for FAISS-based similarity search

  - brand_style.py for managing brand tone, taboo words, and preferred terms

  - config.py for managing environment and application settings

- Configured RESTful API endpoints: /generate-copy, /brand-style, /training-data, /improve-content, /analyze-content

- Created frontend with vanilla HTML, CSS, and JS (index.html, styles.css, app.js)

- Integrated brand style management for tone, voice, taboo words, and terminology

- Implemented vector search for referencing similar historical content

- Enabled training data input to improve future AI output

- Added environment variable support for API keys and model configs

- Structured data storage with local JSON and DB files

- Added developer documentation, API reference, and project setup instructions

This commit provides the foundation for a full-stack, AI-driven content creation platform that ensures brand consistency, speeds up marketing workflows, and supports iterative improvement over time.
This commit is contained in:
Michael Ikehi
2025-04-17 08:50:12 +01:00
commit 6fd7213076
21 changed files with 4497 additions and 0 deletions
+81
View File
@@ -0,0 +1,81 @@
# Marketing Assistant AI - Data Directory
This directory contains the data used by the Marketing Assistant AI system.
## Structure
- **past_campaigns/**: Contains JSON files of past marketing campaigns used for training and reference
- **user_queries/**: Stores user queries and requests for analytics and model improvement
- **style_guidelines/**: Contains brand tone and voice guidelines
- **vector_store/**: Generated vector database for content retrieval (created automatically)
## File Formats
### Past Campaigns
Past campaign files are stored as JSON with the following structure:
```json
{
"content": "The actual marketing content text",
"content_type": "email_campaign|social_media|blog_post|etc",
"metadata": {
"campaign_name": "Name of the campaign",
"performance_metrics": {
"metric1": value,
"metric2": value
},
"content_type": "Same as above",
"added_at": "ISO timestamp",
"training_data": true
},
"document_id": 0,
"timestamp": "ISO timestamp"
}
```
### User Queries
User query files store information about requests made to the AI:
```json
{
"prompt": "The user's prompt text",
"parameters": {
"content_type": "Type of content requested",
"tone": "Requested tone",
"length": "Requested length",
"include_cta": true|false
},
"timestamp": "ISO timestamp"
}
```
### Brand Style Guidelines
Brand style is stored as a JSON file with the following structure:
```json
{
"brand_name": "Adriana James",
"tone": ["professional", "friendly", "inspirational"],
"voice_characteristics": ["clear", "direct", "empowering"],
"taboo_words": ["cheap", "discount", "bargain"],
"preferred_terms": {
"customers": "clients",
"products": "solutions"
}
}
```
## Adding New Data
### Adding Past Campaigns
1. Use the API endpoint `POST /training-data` with the appropriate JSON payload
2. Alternatively, add a JSON file to the `past_campaigns` directory following the format above
### Updating Brand Style
1. Use the API endpoint `PUT /brand-style` with the updated style guidelines
2. The system will automatically update the style file