Docs & Roadmap updates
This commit is contained in:
202
Roadmap TBDs/CONTRIBUTING.md
Normal file
202
Roadmap TBDs/CONTRIBUTING.md
Normal file
@@ -0,0 +1,202 @@
|
||||
# Contributing to AI-Writer
|
||||
|
||||
Thank you for your interest in contributing to AI-Writer! This document provides guidelines and instructions for contributing to the project.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Code of Conduct](#code-of-conduct)
|
||||
- [Getting Started](#getting-started)
|
||||
- [Development Environment](#development-environment)
|
||||
- [Coding Standards](#coding-standards)
|
||||
- [Pull Request Process](#pull-request-process)
|
||||
- [Testing Guidelines](#testing-guidelines)
|
||||
- [Documentation](#documentation)
|
||||
- [Community](#community)
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
By participating in this project, you agree to abide by our [Code of Conduct](CODE_OF_CONDUCT.md). Please read it before contributing.
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Issues
|
||||
|
||||
- Check existing issues to see if your problem or idea has already been addressed.
|
||||
- For bugs, create a new issue with a clear description, steps to reproduce, and relevant information about your environment.
|
||||
- For feature requests, describe the feature, its benefits, and potential implementation approaches.
|
||||
- Use issue templates when available.
|
||||
|
||||
### Feature Branches
|
||||
|
||||
- Fork the repository and create a feature branch from `main`.
|
||||
- Use descriptive branch names: `feature/your-feature-name` or `fix/issue-description`.
|
||||
- Keep branches focused on a single issue or feature.
|
||||
|
||||
## Development Environment
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Python 3.9 or higher
|
||||
- Git
|
||||
- A code editor (VS Code, PyCharm, etc.)
|
||||
- Docker (optional, for containerized development)
|
||||
|
||||
### Setup
|
||||
|
||||
1. Clone the repository:
|
||||
```bash
|
||||
git clone https://github.com/AJaySi/AI-Writer.git
|
||||
cd AI-Writer
|
||||
```
|
||||
|
||||
2. Create a virtual environment:
|
||||
```bash
|
||||
python -m venv venv
|
||||
source venv/bin/activate # On Windows: venv\Scripts\activate
|
||||
```
|
||||
|
||||
3. Install dependencies:
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
4. Set up environment variables:
|
||||
- Create a `.env` file in the project root
|
||||
- Add necessary API keys and configuration (see `.env.example` for reference)
|
||||
|
||||
5. Initialize the database:
|
||||
```bash
|
||||
python -c "from lib.database.db_manager import init_db; init_db()"
|
||||
```
|
||||
|
||||
6. Run the application:
|
||||
```bash
|
||||
streamlit run alwrity.py
|
||||
```
|
||||
|
||||
## Coding Standards
|
||||
|
||||
### Style Guide
|
||||
|
||||
- Follow [PEP 8](https://www.python.org/dev/peps/pep-0008/) for Python code.
|
||||
- Use 4 spaces for indentation (no tabs).
|
||||
- Maximum line length is 100 characters.
|
||||
- Use meaningful variable and function names.
|
||||
|
||||
### Documentation
|
||||
|
||||
- Use Google-style docstrings for all modules, classes, and functions.
|
||||
- Include type hints in function signatures.
|
||||
- Keep comments up-to-date with code changes.
|
||||
|
||||
Example:
|
||||
|
||||
```python
|
||||
def generate_content(prompt: str, max_tokens: int = 100) -> str:
|
||||
"""Generate content using the AI model.
|
||||
|
||||
Args:
|
||||
prompt: The input prompt for content generation.
|
||||
max_tokens: Maximum number of tokens to generate.
|
||||
|
||||
Returns:
|
||||
The generated content as a string.
|
||||
|
||||
Raises:
|
||||
ValueError: If the prompt is empty or max_tokens is negative.
|
||||
"""
|
||||
# Implementation...
|
||||
```
|
||||
|
||||
### Error Handling
|
||||
|
||||
- Use specific exception types rather than generic exceptions.
|
||||
- Include meaningful error messages.
|
||||
- Log exceptions with appropriate context.
|
||||
|
||||
### Imports
|
||||
|
||||
- Group imports in the following order:
|
||||
1. Standard library imports
|
||||
2. Related third-party imports
|
||||
3. Local application/library specific imports
|
||||
- Within each group, imports should be sorted alphabetically.
|
||||
|
||||
## Pull Request Process
|
||||
|
||||
1. Ensure your code follows the project's coding standards.
|
||||
2. Update documentation as necessary.
|
||||
3. Add or update tests to cover your changes.
|
||||
4. Ensure all tests pass.
|
||||
5. Submit a pull request with a clear description of the changes and any relevant issue numbers.
|
||||
6. Wait for review and address any feedback.
|
||||
|
||||
### Commit Messages
|
||||
|
||||
Follow the [Conventional Commits](https://www.conventionalcommits.org/) specification:
|
||||
|
||||
- `feat`: A new feature
|
||||
- `fix`: A bug fix
|
||||
- `docs`: Documentation changes
|
||||
- `style`: Code style changes (formatting, etc.)
|
||||
- `refactor`: Code changes that neither fix bugs nor add features
|
||||
- `test`: Adding or updating tests
|
||||
- `chore`: Changes to the build process or auxiliary tools
|
||||
|
||||
Example: `feat: add support for Google Gemini models`
|
||||
|
||||
## Testing Guidelines
|
||||
|
||||
### Writing Tests
|
||||
|
||||
- Write unit tests for all new functions and classes.
|
||||
- Place tests in the `tests/` directory, mirroring the package structure.
|
||||
- Use descriptive test names that explain what is being tested.
|
||||
- Aim for at least 80% test coverage for new code.
|
||||
|
||||
### Running Tests
|
||||
|
||||
```bash
|
||||
# Run all tests
|
||||
pytest
|
||||
|
||||
# Run specific tests
|
||||
pytest tests/path/to/test_file.py
|
||||
|
||||
# Run with coverage
|
||||
pytest --cov=lib
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
### Code Documentation
|
||||
|
||||
- Document all public modules, classes, and functions.
|
||||
- Keep docstrings up-to-date with code changes.
|
||||
- Use type hints consistently.
|
||||
|
||||
### Project Documentation
|
||||
|
||||
- Update README.md with new features or changes.
|
||||
- Update installation and usage instructions as needed.
|
||||
- For significant changes, update the documentation in the `docs/` directory.
|
||||
|
||||
## Community
|
||||
|
||||
### Communication Channels
|
||||
|
||||
- GitHub Issues: For bug reports and feature requests
|
||||
- Discussions: For general questions and discussions
|
||||
- Pull Requests: For code contributions
|
||||
|
||||
### Recognition
|
||||
|
||||
All contributors will be recognized in the project's CONTRIBUTORS.md file.
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- [Project Roadmap](docs/roadmap.rst)
|
||||
- [Architecture Documentation](docs/architecture/index.rst)
|
||||
- [API Reference](docs/api/index.rst)
|
||||
|
||||
Thank you for contributing to AI-Writer!
|
||||
2586
Roadmap TBDs/GOOGLE_INTEGRATION_PLAN.md
Normal file
2586
Roadmap TBDs/GOOGLE_INTEGRATION_PLAN.md
Normal file
File diff suppressed because it is too large
Load Diff
631
Roadmap TBDs/ONBOARDING_IMPROVEMENTS.md
Normal file
631
Roadmap TBDs/ONBOARDING_IMPROVEMENTS.md
Normal file
@@ -0,0 +1,631 @@
|
||||
# Onboarding Process Improvements
|
||||
|
||||
This document outlines a comprehensive plan to improve the user onboarding experience in AI-Writer, focusing on the API key management and initial setup process.
|
||||
|
||||
## Current Issues
|
||||
|
||||
After analyzing the current onboarding process in `utils.api_key_manager`, several issues were identified:
|
||||
|
||||
### User Experience Issues
|
||||
|
||||
- **Complex Multi-step Process**: The onboarding is split across multiple steps without clear indication of progress or purpose
|
||||
- **Confusing Navigation**: Users can get lost between steps with no clear path forward
|
||||
- **Required vs. Optional**: No clear distinction between required and optional API keys
|
||||
- **No Skip Option**: Users must go through all steps even if some are not relevant to them
|
||||
- **Limited Guidance**: Insufficient contextual help for users unfamiliar with API keys
|
||||
|
||||
### Technical Issues
|
||||
|
||||
- **Inconsistent State Management**: Wizard state is initialized in multiple places
|
||||
- **Basic Validation**: API keys are only checked for non-emptiness, not actual validity
|
||||
- **Environment Variable Handling**: Not robust across different environments
|
||||
- **Error Handling**: Inconsistent error handling and user feedback
|
||||
- **No Testing Mechanism**: No way to test API keys during setup
|
||||
|
||||
### UI/Design Issues
|
||||
|
||||
- **Inconsistent Styling**: Visual inconsistency across different components
|
||||
- **Poor Mobile Experience**: Limited responsiveness for mobile users
|
||||
- **Visual Hierarchy**: Lack of clear visual distinction for important elements
|
||||
- **Help Text Visibility**: Instructions and help text are not prominent enough
|
||||
|
||||
## Proposed Improvements
|
||||
|
||||
### 1. Redesigned Onboarding Flow
|
||||
|
||||
#### Welcome Screen
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────┐
|
||||
│ │
|
||||
│ Welcome to AI-Writer! 👋 │
|
||||
│ │
|
||||
│ Let's get you set up in just a few minutes. │
|
||||
│ │
|
||||
│ What would you like to do? │
|
||||
│ │
|
||||
│ ○ Quick Start (minimal setup) │
|
||||
│ ○ Complete Setup (all features) │
|
||||
│ ○ Import Configuration │
|
||||
│ │
|
||||
│ [Start Setup] │
|
||||
│ │
|
||||
└─────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
#### API Key Setup Screen
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────┐
|
||||
│ │
|
||||
│ Step 1 of 4: Connect AI Models │
|
||||
│ ━━━━━━━━━━○○○○ │
|
||||
│ │
|
||||
│ Required (choose at least one): │
|
||||
│ ┌─────────────────────────────────────────────┐ │
|
||||
│ │ ⭐ OpenAI API Key │ │
|
||||
│ │ [••••••••••••••••••] │ │
|
||||
│ │ ✓ Validated successfully! │ │
|
||||
│ └─────────────────────────────────────────────┘ │
|
||||
│ │
|
||||
│ ┌─────────────────────────────────────────────┐ │
|
||||
│ │ ⭐ Google Gemini API Key │ │
|
||||
│ │ [ ] │ │
|
||||
│ │ ℹ️ Not configured (optional) │ │
|
||||
│ └─────────────────────────────────────────────┘ │
|
||||
│ │
|
||||
│ Optional: │
|
||||
│ ┌─────────────────────────────────────────────┐ │
|
||||
│ │ Anthropic API Key (Coming Soon) │ │
|
||||
│ │ [ ] │ │
|
||||
│ └─────────────────────────────────────────────┘ │
|
||||
│ │
|
||||
│ [Skip Optional] [Test Keys] [Continue →] │
|
||||
│ │
|
||||
└─────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
#### Progress Summary Screen
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────┐
|
||||
│ │
|
||||
│ Setup Complete! 🎉 │
|
||||
│ │
|
||||
│ Here's your configuration: │
|
||||
│ │
|
||||
│ AI Models: │
|
||||
│ ✅ OpenAI API - Connected │
|
||||
│ ❌ Google Gemini - Not configured │
|
||||
│ │
|
||||
│ Research Tools: │
|
||||
│ ✅ Tavily Search - Connected │
|
||||
│ ❌ Serper API - Not configured │
|
||||
│ │
|
||||
│ Publishing: │
|
||||
│ ❌ WordPress - Not configured │
|
||||
│ │
|
||||
│ You can change these settings anytime from │
|
||||
│ the Settings menu. │
|
||||
│ │
|
||||
│ [Edit Configuration] [Start Using AI-Writer] │
|
||||
│ │
|
||||
└─────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
### 2. Technical Improvements
|
||||
|
||||
#### Unified State Management
|
||||
|
||||
```python
|
||||
# Create a dedicated state manager class
|
||||
class OnboardingStateManager:
|
||||
"""Manages the state of the onboarding process."""
|
||||
|
||||
def __init__(self):
|
||||
"""Initialize the onboarding state."""
|
||||
if 'onboarding_state' not in st.session_state:
|
||||
st.session_state.onboarding_state = {
|
||||
'current_step': 1,
|
||||
'total_steps': 4,
|
||||
'completed_steps': set(),
|
||||
'api_keys': {},
|
||||
'validated_keys': {},
|
||||
'setup_mode': 'quick_start', # or 'complete'
|
||||
'setup_complete': False
|
||||
}
|
||||
|
||||
def get_state(self):
|
||||
"""Get the current onboarding state."""
|
||||
return st.session_state.onboarding_state
|
||||
|
||||
def update_state(self, updates):
|
||||
"""Update the onboarding state."""
|
||||
st.session_state.onboarding_state.update(updates)
|
||||
|
||||
def next_step(self):
|
||||
"""Move to the next step."""
|
||||
current = st.session_state.onboarding_state['current_step']
|
||||
total = st.session_state.onboarding_state['total_steps']
|
||||
|
||||
if current < total:
|
||||
st.session_state.onboarding_state['current_step'] += 1
|
||||
st.session_state.onboarding_state['completed_steps'].add(current)
|
||||
|
||||
def previous_step(self):
|
||||
"""Move to the previous step."""
|
||||
if st.session_state.onboarding_state['current_step'] > 1:
|
||||
st.session_state.onboarding_state['current_step'] -= 1
|
||||
|
||||
def skip_to_step(self, step):
|
||||
"""Skip to a specific step."""
|
||||
if 1 <= step <= st.session_state.onboarding_state['total_steps']:
|
||||
st.session_state.onboarding_state['current_step'] = step
|
||||
|
||||
def mark_complete(self):
|
||||
"""Mark the onboarding as complete."""
|
||||
st.session_state.onboarding_state['setup_complete'] = True
|
||||
```
|
||||
|
||||
#### Enhanced API Key Validation
|
||||
|
||||
```python
|
||||
async def validate_api_key(service, key):
|
||||
"""Validate an API key by making a test request."""
|
||||
try:
|
||||
if service == "openai":
|
||||
# Test OpenAI API key with a minimal request
|
||||
import openai
|
||||
client = openai.OpenAI(api_key=key)
|
||||
response = await client.models.list()
|
||||
return {"valid": True, "models": [model.id for model in response.data[:5]]}
|
||||
|
||||
elif service == "gemini":
|
||||
# Test Google Gemini API key
|
||||
import google.generativeai as genai
|
||||
genai.configure(api_key=key)
|
||||
models = genai.list_models()
|
||||
return {"valid": True, "models": [model.name for model in models]}
|
||||
|
||||
elif service == "tavily":
|
||||
# Test Tavily API key
|
||||
import requests
|
||||
response = requests.get(
|
||||
"https://api.tavily.com/health",
|
||||
headers={"x-api-key": key}
|
||||
)
|
||||
if response.status_code == 200:
|
||||
return {"valid": True, "status": "healthy"}
|
||||
else:
|
||||
return {"valid": False, "error": f"Status code: {response.status_code}"}
|
||||
|
||||
# Add more services as needed
|
||||
|
||||
except Exception as e:
|
||||
return {"valid": False, "error": str(e)}
|
||||
```
|
||||
|
||||
#### Secure API Key Storage
|
||||
|
||||
```python
|
||||
def save_api_keys(keys_dict):
|
||||
"""Save API keys securely."""
|
||||
try:
|
||||
# 1. Save to .env file
|
||||
env_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), '.env')
|
||||
|
||||
# Read existing .env file
|
||||
env_contents = {}
|
||||
if os.path.exists(env_path):
|
||||
with open(env_path, 'r') as f:
|
||||
for line in f:
|
||||
if '=' in line:
|
||||
key, value = line.strip().split('=', 1)
|
||||
env_contents[key] = value
|
||||
|
||||
# Update with new keys
|
||||
for key_name, key_value in keys_dict.items():
|
||||
if key_value: # Only save non-empty keys
|
||||
env_key = f"{key_name.upper()}_API_KEY"
|
||||
env_contents[env_key] = key_value
|
||||
|
||||
# Write back to .env file
|
||||
with open(env_path, 'w') as f:
|
||||
for key, value in env_contents.items():
|
||||
f.write(f"{key}={value}\n")
|
||||
|
||||
# 2. Also store in session state for immediate use
|
||||
for key_name, key_value in keys_dict.items():
|
||||
if key_value:
|
||||
st.session_state[f"{key_name}_api_key"] = key_value
|
||||
|
||||
# 3. Set environment variables for current session
|
||||
for key_name, key_value in keys_dict.items():
|
||||
if key_value:
|
||||
os.environ[f"{key_name.upper()}_API_KEY"] = key_value
|
||||
|
||||
return True
|
||||
except Exception as e:
|
||||
logger.error(f"Error saving API keys: {str(e)}")
|
||||
return False
|
||||
```
|
||||
|
||||
### 3. UI/UX Improvements
|
||||
|
||||
#### Responsive Design
|
||||
|
||||
```python
|
||||
def render_responsive_layout():
|
||||
"""Render a responsive layout that works on mobile and desktop."""
|
||||
# Check viewport width
|
||||
st.markdown("""
|
||||
<script>
|
||||
var width = window.innerWidth;
|
||||
if (width < 768) {
|
||||
document.documentElement.style.setProperty('--layout', 'mobile');
|
||||
} else {
|
||||
document.documentElement.style.setProperty('--layout', 'desktop');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* Mobile-first styles */
|
||||
.container {
|
||||
padding: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
/* Desktop adjustments */
|
||||
@media (min-width: 768px) {
|
||||
.container {
|
||||
padding: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
""", unsafe_allow_html=True)
|
||||
```
|
||||
|
||||
#### Visual Hierarchy for Required vs Optional
|
||||
|
||||
```python
|
||||
def render_api_key_input(label, key_name, required=False, help_text=""):
|
||||
"""Render an API key input with clear visual hierarchy."""
|
||||
|
||||
# Add required indicator if needed
|
||||
display_label = f"{label} {'*' if required else '(optional)'}"
|
||||
|
||||
# Get existing value from session state or environment
|
||||
existing_value = st.session_state.get(f"{key_name}_api_key", "") or os.getenv(f"{key_name.upper()}_API_KEY", "")
|
||||
|
||||
# Render the input with appropriate styling
|
||||
st.markdown(f"""
|
||||
<div class="api-key-input {'required' if required else 'optional'}">
|
||||
<label>{display_label}</label>
|
||||
<div class="input-help-text">{help_text}</div>
|
||||
</div>
|
||||
""", unsafe_allow_html=True)
|
||||
|
||||
# The actual input field
|
||||
value = st.text_input(
|
||||
label="", # Empty because we use custom label above
|
||||
value=existing_value,
|
||||
type="password",
|
||||
key=f"input_{key_name}",
|
||||
label_visibility="collapsed"
|
||||
)
|
||||
|
||||
# Validation status
|
||||
if value:
|
||||
is_valid = key_name in st.session_state.get("validated_keys", {})
|
||||
if is_valid:
|
||||
st.success(f"✓ {label} validated successfully")
|
||||
else:
|
||||
st.info(f"⚠️ {label} not validated yet")
|
||||
|
||||
return value
|
||||
```
|
||||
|
||||
#### Interactive Help and Tooltips
|
||||
|
||||
```python
|
||||
def render_help_section(service):
|
||||
"""Render an interactive help section for getting API keys."""
|
||||
|
||||
help_content = {
|
||||
"openai": {
|
||||
"title": "How to get your OpenAI API key",
|
||||
"steps": [
|
||||
"Go to [OpenAI's website](https://platform.openai.com)",
|
||||
"Sign up or log in to your account",
|
||||
"Navigate to the API section",
|
||||
"Click 'Create new secret key'",
|
||||
"Copy the generated key and paste it here"
|
||||
],
|
||||
"note": "Keep your API key secure and never share it publicly.",
|
||||
"pricing": "$0.002 per 1K tokens for GPT-3.5, $0.06 per 1K tokens for GPT-4",
|
||||
"link": "https://platform.openai.com/account/api-keys"
|
||||
},
|
||||
"gemini": {
|
||||
"title": "How to get your Google Gemini API key",
|
||||
"steps": [
|
||||
"Visit [Google AI Studio](https://makersuite.google.com/app/apikey)",
|
||||
"Sign in with your Google account",
|
||||
"Click 'Create API key'",
|
||||
"Copy the generated key and paste it here"
|
||||
],
|
||||
"note": "Make sure to enable the Gemini API in your Google Cloud Console.",
|
||||
"pricing": "Free tier available, then $0.0025 per 1K tokens",
|
||||
"link": "https://makersuite.google.com/app/apikey"
|
||||
}
|
||||
# Add more services as needed
|
||||
}
|
||||
|
||||
if service in help_content:
|
||||
content = help_content[service]
|
||||
|
||||
with st.expander(f"📋 {content['title']}", expanded=False):
|
||||
st.markdown("**Step-by-step guide:**")
|
||||
for i, step in enumerate(content["steps"], 1):
|
||||
st.markdown(f"{i}. {step}")
|
||||
|
||||
st.markdown(f"**Note:** {content['note']}")
|
||||
st.markdown(f"**Pricing:** {content['pricing']}")
|
||||
st.markdown(f"[Get your API key here]({content['link']})")
|
||||
```
|
||||
|
||||
### 4. Implementation Plan
|
||||
|
||||
#### Phase 1: Core Improvements
|
||||
|
||||
1. **Create Unified State Manager**
|
||||
- Implement the `OnboardingStateManager` class
|
||||
- Refactor existing code to use the new state manager
|
||||
- Add proper state persistence
|
||||
|
||||
2. **Enhance API Key Validation**
|
||||
- Implement real validation for each service
|
||||
- Add visual feedback for validation status
|
||||
- Create a "Test All Keys" function
|
||||
|
||||
3. **Improve Navigation**
|
||||
- Redesign step indicator with clear labels
|
||||
- Add skip options for optional steps
|
||||
- Implement a "Quick Start" mode
|
||||
|
||||
#### Phase 2: UI/UX Enhancements
|
||||
|
||||
1. **Redesign Input Components**
|
||||
- Create clear visual hierarchy
|
||||
- Add responsive design for mobile
|
||||
- Implement interactive help sections
|
||||
|
||||
2. **Create Summary Screens**
|
||||
- Add welcome screen with setup options
|
||||
- Implement completion summary screen
|
||||
- Add configuration export/import
|
||||
|
||||
3. **Enhance Visual Design**
|
||||
- Update color scheme for better accessibility
|
||||
- Add animations for transitions
|
||||
- Implement progress indicators
|
||||
|
||||
#### Phase 3: Advanced Features
|
||||
|
||||
1. **Guided Tours**
|
||||
- Add interactive tutorials
|
||||
- Create contextual help popups
|
||||
- Implement feature discovery
|
||||
|
||||
2. **Smart Defaults**
|
||||
- Suggest configurations based on user needs
|
||||
- Implement templates for common use cases
|
||||
- Add recommended settings
|
||||
|
||||
3. **Troubleshooting Assistance**
|
||||
- Add automatic error detection
|
||||
- Create guided troubleshooting flows
|
||||
- Implement self-healing for common issues
|
||||
|
||||
## Code Implementation Examples
|
||||
|
||||
### Welcome Screen Component
|
||||
|
||||
```python
|
||||
def render_welcome_screen():
|
||||
"""Render the welcome screen for onboarding."""
|
||||
st.markdown("""
|
||||
<div class="welcome-container">
|
||||
<h1>Welcome to AI-Writer! 👋</h1>
|
||||
<p class="welcome-subtitle">Let's get you set up in just a few minutes.</p>
|
||||
</div>
|
||||
""", unsafe_allow_html=True)
|
||||
|
||||
# Setup mode selection
|
||||
setup_mode = st.radio(
|
||||
"What would you like to do?",
|
||||
options=["Quick Start (minimal setup)",
|
||||
"Complete Setup (all features)",
|
||||
"Import Configuration"],
|
||||
index=0,
|
||||
key="setup_mode_selection"
|
||||
)
|
||||
|
||||
# Store the selection in state
|
||||
if "onboarding_state" in st.session_state:
|
||||
st.session_state.onboarding_state["setup_mode"] = setup_mode.split(" ")[0].lower()
|
||||
|
||||
# Start button
|
||||
if st.button("Start Setup", use_container_width=True, type="primary"):
|
||||
if "onboarding_state" in st.session_state:
|
||||
st.session_state.onboarding_state["current_step"] = 1
|
||||
st.rerun()
|
||||
```
|
||||
|
||||
### API Key Manager Component
|
||||
|
||||
```python
|
||||
def render_api_key_manager():
|
||||
"""Render the improved API key manager."""
|
||||
# Get state manager
|
||||
state_manager = OnboardingStateManager()
|
||||
state = state_manager.get_state()
|
||||
|
||||
# Render step indicator
|
||||
render_step_indicator(state["current_step"], state["total_steps"])
|
||||
|
||||
# Render appropriate step based on current_step
|
||||
if state["current_step"] == 1:
|
||||
render_ai_providers_step(state_manager)
|
||||
elif state["current_step"] == 2:
|
||||
render_research_tools_step(state_manager)
|
||||
elif state["current_step"] == 3:
|
||||
render_publishing_step(state_manager)
|
||||
elif state["current_step"] == 4:
|
||||
render_summary_step(state_manager)
|
||||
|
||||
# Render navigation buttons
|
||||
render_navigation_buttons(state_manager)
|
||||
```
|
||||
|
||||
### Improved AI Providers Step
|
||||
|
||||
```python
|
||||
def render_ai_providers_step(state_manager):
|
||||
"""Render the improved AI providers setup step."""
|
||||
st.markdown("## Step 1: Connect AI Models")
|
||||
st.markdown("Configure the AI models you want to use for content generation.")
|
||||
|
||||
# Create tabs for required vs optional
|
||||
tab1, tab2 = st.tabs(["Required (at least one)", "Optional Models"])
|
||||
|
||||
with tab1:
|
||||
col1, col2 = st.columns(2)
|
||||
|
||||
with col1:
|
||||
# OpenAI
|
||||
openai_key = render_api_key_input(
|
||||
"OpenAI API Key",
|
||||
"openai",
|
||||
required=True,
|
||||
help_text="Powers GPT-3.5 and GPT-4 models"
|
||||
)
|
||||
render_help_section("openai")
|
||||
|
||||
with col2:
|
||||
# Google Gemini
|
||||
gemini_key = render_api_key_input(
|
||||
"Google Gemini API Key",
|
||||
"gemini",
|
||||
required=False,
|
||||
help_text="Powers Gemini Pro models"
|
||||
)
|
||||
render_help_section("gemini")
|
||||
|
||||
with tab2:
|
||||
col1, col2 = st.columns(2)
|
||||
|
||||
with col1:
|
||||
# Anthropic
|
||||
anthropic_key = render_api_key_input(
|
||||
"Anthropic API Key",
|
||||
"anthropic",
|
||||
required=False,
|
||||
help_text="Powers Claude models"
|
||||
)
|
||||
render_help_section("anthropic")
|
||||
|
||||
with col2:
|
||||
# Mistral
|
||||
mistral_key = render_api_key_input(
|
||||
"Mistral API Key",
|
||||
"mistral",
|
||||
required=False,
|
||||
help_text="Powers Mistral models"
|
||||
)
|
||||
render_help_section("mistral")
|
||||
|
||||
# Test keys button
|
||||
if st.button("Test API Keys", use_container_width=True):
|
||||
with st.spinner("Testing API keys..."):
|
||||
# Test each provided key
|
||||
results = {}
|
||||
if openai_key:
|
||||
results["openai"] = asyncio.run(validate_api_key("openai", openai_key))
|
||||
if gemini_key:
|
||||
results["gemini"] = asyncio.run(validate_api_key("gemini", gemini_key))
|
||||
if anthropic_key:
|
||||
results["anthropic"] = asyncio.run(validate_api_key("anthropic", anthropic_key))
|
||||
if mistral_key:
|
||||
results["mistral"] = asyncio.run(validate_api_key("mistral", mistral_key))
|
||||
|
||||
# Store validation results
|
||||
state_manager.update_state({"validated_keys": results})
|
||||
|
||||
# Display results
|
||||
for service, result in results.items():
|
||||
if result.get("valid", False):
|
||||
st.success(f"✅ {service.title()} API key is valid")
|
||||
else:
|
||||
st.error(f"❌ {service.title()} API key is invalid: {result.get('error', 'Unknown error')}")
|
||||
|
||||
# Save keys to state
|
||||
api_keys = {
|
||||
"openai": openai_key,
|
||||
"gemini": gemini_key,
|
||||
"anthropic": anthropic_key,
|
||||
"mistral": mistral_key
|
||||
}
|
||||
state_manager.update_state({"api_keys": api_keys})
|
||||
|
||||
# Check if we have at least one valid key
|
||||
has_valid_key = any([
|
||||
openai_key and state_manager.get_state().get("validated_keys", {}).get("openai", {}).get("valid", False),
|
||||
gemini_key and state_manager.get_state().get("validated_keys", {}).get("gemini", {}).get("valid", False)
|
||||
])
|
||||
|
||||
if not has_valid_key and (openai_key or gemini_key):
|
||||
st.warning("Please test your API keys before continuing")
|
||||
```
|
||||
|
||||
## Benefits of Improved Onboarding
|
||||
|
||||
1. **Increased User Retention**
|
||||
- Smoother onboarding leads to higher completion rates
|
||||
- Clear guidance reduces frustration and abandonment
|
||||
- Faster time-to-value improves user satisfaction
|
||||
|
||||
2. **Reduced Support Burden**
|
||||
- Better self-service options decrease support tickets
|
||||
- Clearer instructions prevent common setup issues
|
||||
- Automated validation catches problems early
|
||||
|
||||
3. **Higher Feature Adoption**
|
||||
- Users understand available features better
|
||||
- Guided setup encourages exploration of capabilities
|
||||
- Contextual help improves feature discovery
|
||||
|
||||
4. **Improved User Experience**
|
||||
- Consistent design creates a professional impression
|
||||
- Responsive layout works across all devices
|
||||
- Intuitive navigation reduces cognitive load
|
||||
|
||||
5. **Better Data Quality**
|
||||
- Proper validation ensures working API keys
|
||||
- Clear requirements improve data completeness
|
||||
- Structured setup leads to better configuration
|
||||
|
||||
## Implementation Timeline
|
||||
|
||||
- **Week 1**: Design and prototype core improvements
|
||||
- **Week 2**: Implement unified state management and API validation
|
||||
- **Week 3**: Develop UI components and responsive design
|
||||
- **Week 4**: Create welcome and summary screens
|
||||
- **Week 5**: Add help content and contextual assistance
|
||||
- **Week 6**: Testing, refinement, and documentation
|
||||
|
||||
## Conclusion
|
||||
|
||||
The proposed improvements to the onboarding process will significantly enhance the user experience for new AI-Writer users. By implementing a more intuitive, guided, and responsive setup flow, we can increase user retention, reduce support needs, and help users get value from the platform faster.
|
||||
|
||||
These changes represent a comprehensive overhaul of the current system, addressing both technical and user experience issues while maintaining compatibility with the existing codebase.
|
||||
250
Roadmap TBDs/ROADMAP.md
Normal file
250
Roadmap TBDs/ROADMAP.md
Normal file
@@ -0,0 +1,250 @@
|
||||
# AI-Writer Public Roadmap
|
||||
|
||||
This roadmap outlines the planned features and improvements for the AI-Writer platform. It provides transparency into our development priorities and gives users insight into upcoming capabilities.
|
||||
|
||||
## 🚦 Roadmap Status Indicators
|
||||
|
||||
- 🟢 **In Progress**: Currently being developed
|
||||
- 🟡 **Planned**: Scheduled for upcoming development cycles
|
||||
- 🔵 **Researching**: Under investigation and evaluation
|
||||
- ✅ **Completed**: Released and available
|
||||
|
||||
## 🗓️ Q2 2025 (April - June)
|
||||
|
||||
### Core Platform
|
||||
|
||||
- 🟢 **Performance Optimization**
|
||||
- Reduce content generation time by 30%
|
||||
- Optimize memory usage for large content pieces
|
||||
- Implement caching for frequently used research data
|
||||
|
||||
- 🟡 **Multi-language Support**
|
||||
- Add support for Spanish, French, and German content generation
|
||||
- Implement language-specific research capabilities
|
||||
- Create language-specific SEO optimization
|
||||
|
||||
- 🟡 **User Interface Refresh**
|
||||
- Redesign main dashboard for improved usability
|
||||
- Implement dark mode
|
||||
- Add customizable workspace layouts
|
||||
|
||||
### AI Writers
|
||||
|
||||
- 🟢 **Enhanced Blog Writer**
|
||||
- Add support for more blog formats (listicles, how-to guides, etc.)
|
||||
- Implement advanced outline generation
|
||||
- Add competitor content analysis
|
||||
|
||||
- 🟡 **AI Script Writer**
|
||||
- Create specialized writer for video scripts
|
||||
- Support multiple video formats (YouTube, TikTok, Instagram)
|
||||
- Add scene breakdown and shot suggestions
|
||||
|
||||
- 🟡 **Technical Content Writer**
|
||||
- Specialized writer for technical documentation
|
||||
- Code snippet generation and formatting
|
||||
- Technical accuracy verification
|
||||
|
||||
### Research & SEO
|
||||
|
||||
- 🟢 **Advanced Web Research**
|
||||
- Implement multi-source research aggregation
|
||||
- Add research depth controls
|
||||
- Improve citation and source tracking
|
||||
|
||||
- 🟡 **Semantic SEO Tools**
|
||||
- Entity-based content optimization
|
||||
- Topic cluster mapping
|
||||
- Natural language query optimization
|
||||
|
||||
- 🔵 **Competitive Analysis Tools**
|
||||
- Analyze top-ranking content for target keywords
|
||||
- Identify content gaps and opportunities
|
||||
- Generate differentiation strategies
|
||||
|
||||
## 🗓️ Q3 2025 (July - September)
|
||||
|
||||
### Core Platform
|
||||
|
||||
- 🟡 **Collaboration Features**
|
||||
- Multi-user editing capabilities
|
||||
- Role-based access control
|
||||
- Comment and feedback system
|
||||
|
||||
- 🟡 **Content Versioning**
|
||||
- Track content revisions
|
||||
- Compare different versions
|
||||
- Restore previous versions
|
||||
|
||||
- 🔵 **Analytics Dashboard**
|
||||
- Content performance tracking
|
||||
- Usage statistics and insights
|
||||
- AI model performance metrics
|
||||
|
||||
### AI Writers
|
||||
|
||||
- 🟡 **E-commerce Content Suite**
|
||||
- Enhanced product description generator
|
||||
- Category page content creator
|
||||
- Product comparison generator
|
||||
|
||||
- 🟡 **AI Newsletter Writer**
|
||||
- Email newsletter templates
|
||||
- Subscriber segmentation support
|
||||
- A/B testing headline generator
|
||||
|
||||
- 🔵 **Interactive Content Generator**
|
||||
- Quiz and poll creator
|
||||
- Interactive calculator generator
|
||||
- Decision tree content builder
|
||||
|
||||
### Research & SEO
|
||||
|
||||
- 🟡 **AI-Powered Content Audit**
|
||||
- Analyze existing content
|
||||
- Identify improvement opportunities
|
||||
- Generate update recommendations
|
||||
|
||||
- 🟡 **Local SEO Tools**
|
||||
- Location-based content optimization
|
||||
- Local business schema generator
|
||||
- Regional keyword research
|
||||
|
||||
- 🔵 **Content Distribution Planner**
|
||||
- Channel-specific content adaptation
|
||||
- Publishing schedule optimizer
|
||||
- Cross-platform content strategy
|
||||
|
||||
## 🗓️ Q4 2025 (October - December)
|
||||
|
||||
### Core Platform
|
||||
|
||||
- 🟡 **API Expansion**
|
||||
- Comprehensive REST API
|
||||
- Webhook integrations
|
||||
- Developer documentation and SDKs
|
||||
|
||||
- 🟡 **Enterprise Features**
|
||||
- SSO integration
|
||||
- Advanced security controls
|
||||
- Custom branding options
|
||||
|
||||
- 🔵 **AI Workflow Automation**
|
||||
- Custom workflow builder
|
||||
- Scheduled content generation
|
||||
- Conditional content processing
|
||||
|
||||
### AI Writers
|
||||
|
||||
- 🟡 **AI Book Writer**
|
||||
- Long-form content organization
|
||||
- Chapter planning and generation
|
||||
- Book formatting and structure
|
||||
|
||||
- 🟡 **AI Course Creator**
|
||||
- Educational content generator
|
||||
- Lesson plan development
|
||||
- Quiz and assessment creator
|
||||
|
||||
- 🔵 **Multimedia Content Generator**
|
||||
- Integrated image generation
|
||||
- Infographic creator
|
||||
- Audio content generator
|
||||
|
||||
### Research & SEO
|
||||
|
||||
- 🟡 **AI Research Assistant**
|
||||
- Conversational research interface
|
||||
- Deep research capabilities
|
||||
- Research summarization and extraction
|
||||
|
||||
- 🟡 **International SEO Tools**
|
||||
- Multi-language keyword research
|
||||
- International content optimization
|
||||
- Hreflang tag generator
|
||||
|
||||
- 🔵 **Predictive Content Performance**
|
||||
- AI-powered performance prediction
|
||||
- Content improvement recommendations
|
||||
- Trend analysis and forecasting
|
||||
|
||||
## 🗓️ 2026 and Beyond
|
||||
|
||||
### Core Platform
|
||||
|
||||
- 🔵 **NextJS React Application**
|
||||
- Complete frontend rebuild
|
||||
- Enhanced performance and responsiveness
|
||||
- Progressive web app capabilities
|
||||
|
||||
- 🔵 **AI Agent Ecosystem**
|
||||
- Specialized AI agents for different tasks
|
||||
- Agent collaboration framework
|
||||
- Custom agent creation
|
||||
|
||||
- 🔵 **Advanced Personalization**
|
||||
- User behavior-based recommendations
|
||||
- Personalized content generation
|
||||
- Learning from user preferences
|
||||
|
||||
### AI Writers
|
||||
|
||||
- 🔵 **Multimodal Content Creation**
|
||||
- Integrated text, image, and video generation
|
||||
- Cross-format content consistency
|
||||
- Single-prompt multi-format generation
|
||||
|
||||
- 🔵 **Industry-Specific Writers**
|
||||
- Legal content generator
|
||||
- Medical content writer
|
||||
- Financial content creator
|
||||
|
||||
- 🔵 **Real-time Collaborative Writing**
|
||||
- Multi-user simultaneous editing
|
||||
- AI-assisted collaboration
|
||||
- Role-based collaborative workflows
|
||||
|
||||
### Research & SEO
|
||||
|
||||
- 🔵 **Real-time Content Optimization**
|
||||
- Live SEO feedback during writing
|
||||
- Instant research integration
|
||||
- Dynamic content suggestions
|
||||
|
||||
- 🔵 **Comprehensive Analytics Suite**
|
||||
- Advanced content performance tracking
|
||||
- Conversion attribution
|
||||
- ROI calculation and reporting
|
||||
|
||||
- 🔵 **AI-Driven Content Strategy**
|
||||
- Content gap analysis
|
||||
- Opportunity identification
|
||||
- Automated content planning
|
||||
|
||||
## ✅ Recently Completed
|
||||
|
||||
- ✅ **Google Gemini Integration** - Added support for Google's Gemini Pro model
|
||||
- ✅ **AI News Article Writer** - Specialized writer for news content with citation support
|
||||
- ✅ **ChromaDB Vector Storage** - Implemented vector database for semantic search capabilities
|
||||
- ✅ **Tavily AI Research Integration** - Added support for AI-powered web research
|
||||
- ✅ **Streamlit UI Improvements** - Enhanced user interface with better navigation and controls
|
||||
|
||||
## 🤝 Community Contributions
|
||||
|
||||
We welcome community contributions to the AI-Writer platform! If you're interested in contributing to any of the features on our roadmap or have ideas for new features, please:
|
||||
|
||||
1. Check our [Contributing Guidelines](CONTRIBUTING.md)
|
||||
2. Open an issue to discuss your proposed feature or improvement
|
||||
3. Submit a pull request with your implementation
|
||||
|
||||
## 📝 Feedback
|
||||
|
||||
Your feedback is essential in shaping the future of AI-Writer. If you have feature requests, suggestions, or feedback on existing features, please:
|
||||
|
||||
- Open an issue on GitHub
|
||||
- Join our [community forum](https://alwrity.com)
|
||||
- Contact us directly at info@alwrity.com
|
||||
|
||||
---
|
||||
|
||||
*Note: This roadmap is subject to change based on user feedback, technological developments, and strategic priorities. Last updated: April 18, 2025*
|
||||
4018
Roadmap TBDs/TWITTER_IMPLEMENTATION_PLAN.md
Normal file
4018
Roadmap TBDs/TWITTER_IMPLEMENTATION_PLAN.md
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user