Skip to content

feat: add comprehensive FAQ system with markdown support#406

Open
bradtaylorsf wants to merge 25 commits into
stagingfrom
docs/faq
Open

feat: add comprehensive FAQ system with markdown support#406
bradtaylorsf wants to merge 25 commits into
stagingfrom
docs/faq

Conversation

@bradtaylorsf
Copy link
Copy Markdown
Collaborator

  • Add FAQCard component with ReactMarkdown rendering
  • Convert all FAQ content from HTML to markdown format
  • Add contextual navigation links to AnswerAgent app routes
  • Update FAQ infrastructure with proper styling and responsive design
  • Add react-markdown dependency for safe markdown rendering
  • Include FAQ data for all major app features and troubleshooting
  • Fix linting issues with escaped characters and unused variables

bradtaylorsf and others added 23 commits July 16, 2025 09:57
- Fix JSX element return in homepage component
- Remove path restriction from redirect hook
- Add timeout protection and enhanced error handling
- Ensure all error scenarios fallback to /chat

Resolves AAI-489
- Fix JSX element return in homepage component
- Remove path restriction from redirect hook
- Add timeout protection and enhanced error handling
- Update related page components for consistency
- Ensure all error scenarios fallback to /chat

Resolves AAI-489
…edirect-handler-not-working-properly

Aai 489 bug homepage chat redirect handler not working properly
- Enhance clarity and structure of local development instructions
- Add steps for cloning the repository, setting up environment variables, initializing git submodules, and running the application
- Include optional steps for faster startup and database tool installation
- Add step for installing Docker Desktop and ensuring it is running
- Reorder steps for clarity, including building and migrating the initial database
- Update instructions for running the application and accessing it
- Enhance guidance for development with fast reload instructions
…me-updates

docs: update README for local development setup
…rovements

This comprehensive update addresses GitHub issue #391 and Jira ticket AAI-487 by implementing multi-tenant template management with proper organization scoping and critical security fixes.

## 🆕 New Features

### Multi-Tenant Template System
- **Organization Scoping**: Templates now belong to specific organizations
- **Template Sharing**: Option to share templates within organization
- **Template Lineage**: Track parent-child relationships and template origins
- **Answer Agent Framework**: Added support for Answer Agent framework detection

### Enhanced UI Experience
- **Organization Templates Tab**: New tab showing organization-shared templates
- **Template Segregation**: Answer Agent templates filtered from Example Templates
- **Share Toggle**: UI option to share templates with organization members
- **Improved Template Export**: Better framework detection and metadata handling

## 🔧 Database Schema Updates

### New Migrations
- `AddOrganizationToCustomTemplate`: Adds organization and user scoping
- `AddParentIdToCustomTemplate`: Enables template lineage tracking
- `AddTemplateIdToChatFlow`: Links chatflows to their template origins

### Enhanced Entities
- **CustomTemplate**: Added userId, organizationId, shareWithOrg, parentId fields
- **ChatFlow**: Added templateId field for template tracking
- **Soft Delete**: Implemented for data integrity and audit trails

## 🛡️ Critical Security Fixes

### Authentication & Authorization
- **Mandatory Authentication**: All marketplace endpoints now require authentication
- **Ownership Validation**: Proper user/organization ownership checks
- **Permission System**: Role-based access control for templates

### Chatflow Deletion Security
- **Authorization Logic**: Fixed flawed permission checking in deleteChatflow
- **Route Security**: Removed vulnerable DELETE pattern allowing deletion without ID
- **Transaction Safety**: Wrapped deletion operations in database transactions

### Migration Resilience
- **No-Organization Handling**: Migration handles environments without organizations
- **System Templates**: Orphaned templates become system-wide instead of failing

## 🎯 API Improvements

### New Endpoints
- `GET /marketplaces/organization`: Retrieve organization-shared templates
- Enhanced marketplace endpoints with proper authentication middleware

### Enhanced Services
- **Template Service**: Improved filtering, validation, and framework detection
- **Chatflow Service**: Better authorization and cleanup procedures
- **Error Handling**: Consistent error responses and proper status codes

## 📊 Frontend Enhancements

### Template Management
- **Filtered Views**: Answer Agent templates excluded from Example Templates
- **Organization Tab**: Dedicated view for organization-shared templates
- **Enhanced Metadata**: Better template information display and searching

### User Experience
- **Template Sharing**: Easy organization sharing toggle
- **Framework Detection**: Automatic framework classification
- **Improved Navigation**: Better template organization and discovery

## 🔍 Technical Details

### Framework Detection
- Automatic detection of Answer Agent templates based on MCP Tools usage
- Enhanced framework categorization (Langchain, LlamaIndex, Answer Agent)
- Better template metadata extraction and processing

### Data Integrity
- Soft delete implementation across all related entities
- Proper cleanup of chatflow dependencies (messages, feedback, history)
- Transaction-safe operations with rollback capabilities

### Performance Optimizations
- Efficient query patterns with proper indexing
- Optimized filtering and search operations
- Reduced database roundtrips through better query design

## 🚀 New MCP Sidekick Templates
- Answer Agent MCP Sidekick
- BraveSearch MCP Sidekick
- Confluence MCP Sidekick
- Contentful MCP Sidekick
- Jira MCP Sidekick
- PostgreSQL MCP Sidekick
- Salesforce MCP Sidekick
- Slack MCP Sidekick
- YouTube MCP Sidekick

Fixes: #391
Jira: AAI-487
- Fixed orphaned object literals after commented console.log statements
- Properly commented out object properties in MarketplaceCanvas.jsx
- Properly commented out object properties in MarketplaceLanding.jsx
- Properly commented out object properties in canvas/index.jsx
- Resolves build errors while preserving debug information for future use
- Removed the `update_ui_env.sh` script from the Dockerfile as it is no longer needed for application startup.
- Updated the ENTRYPOINT to use the default CMD for starting the application.
- Changed the DBClusterParameterGroup Family from 'aurora-postgresql14' to 'aurora-postgresql16'.
- Updated the EngineVersion from '14.4' to '16.9' for compatibility with the latest features.
…coping-and-security

feat: implement organization-scoped custom templates
Fix Sidekicks Loading Issues and Enhance UI Navigation
- Add FAQCard component with ReactMarkdown rendering
- Convert all FAQ content from HTML to markdown format
- Add contextual navigation links to AnswerAgent app routes
- Update FAQ infrastructure with proper styling and responsive design
- Add react-markdown dependency for safe markdown rendering
- Include FAQ data for all major app features and troubleshooting
- Fix linting issues with escaped characters and unused variables
@vercel
Copy link
Copy Markdown

vercel Bot commented Jul 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
answerai-docs ❌ Failed (Inspect) Jul 20, 2025 7:52pm
the-answerai ❌ Failed (Inspect) Jul 20, 2025 7:52pm

Copy link
Copy Markdown
Collaborator

@maxtechera maxtechera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants