Skip to content

w3rc/personaflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

27 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

PersonaFlow

AI-powered personality insights for better communication

PersonaFlow is a modern web application that analyzes personality types using the DISC framework and AI to help users communicate more effectively and build stronger relationships.

๐ŸŒŸ Features

  • AI-Powered Analysis: Advanced personality analysis using Claude 3.5 Haiku
  • DISC Framework: Industry-standard personality assessment
  • Communication Templates: Pre-built templates optimized for different personality types
  • Writing Assistant: AI-powered suggestions for personalized communication
  • LinkedIn Integration: Enhanced content collection from LinkedIn profiles
  • Profile Management: Secure storage and management of personality profiles
  • Subscription Plans: Flexible pricing with usage limits

๐Ÿš€ Tech Stack

  • Frontend: Next.js 15, React 19, TypeScript
  • Styling: Tailwind CSS, shadcn/ui components
  • Backend: Next.js API routes
  • Database: Supabase (PostgreSQL with Row Level Security)
  • Authentication: Supabase Auth
  • AI: OpenRouter API with Claude 3.5 Haiku
  • Deployment: Vercel-ready

๐Ÿ›ก๏ธ Security Features

  • โœ… Comprehensive input validation and sanitization
  • โœ… Row Level Security (RLS) policies
  • โœ… API key protection and secure error handling
  • โœ… Rate limiting and abuse prevention
  • โœ… XSS protection with DOMPurify
  • โœ… Error boundaries and graceful degradation

๐Ÿ“ฆ Installation

  1. Clone the repository

    git clone <your-repo-url>
    cd personaflow
  2. Install dependencies

    npm install
  3. Set up environment variables

    cp .env.example .env.local

    Fill in your actual values:

  4. Set up the database

    • Run the SQL in supabase-schema.sql in your Supabase SQL editor
    • Optionally run supabase-security-enhancements.sql for enhanced security
  5. Start the development server

    npm run dev
  6. Open http://localhost:3000

๐Ÿ”ง Configuration

Environment Variables

See .env.example for all required environment variables. Key variables:

  • NEXT_PUBLIC_SUPABASE_URL: Your Supabase project URL
  • NEXT_PUBLIC_SUPABASE_ANON_KEY: Supabase anonymous key (safe for browser)
  • OPENROUTER_API_KEY: OpenRouter API key (keep secret)
  • SUPABASE_SERVICE_ROLE_KEY: Service role key (unused but available)

Database Schema

The application uses several tables:

  • profiles: User account information
  • personality_profiles: DISC analysis results
  • communication_templates: Email/message templates
  • subscriptions: User plan and usage limits
  • usage_logs: Audit trail and analytics

๐ŸŽฏ Usage

  1. Sign up for a PersonaFlow account
  2. Create a profile by analyzing someone's written communication
  3. Get AI insights about their personality type (DISC)
  4. Use templates to craft personalized messages
  5. Writing assistant helps optimize your communication style

๐Ÿ“ˆ DISC Personality Types

  • D (Dominance): Direct, results-oriented, decisive
  • I (Influence): Outgoing, enthusiastic, people-focused
  • S (Steadiness): Patient, reliable, supportive
  • C (Conscientiousness): Analytical, detailed, systematic

๐Ÿ”’ Security

PersonaFlow follows security best practices:

  • All user inputs are validated and sanitized
  • Database operations use Row Level Security
  • API keys are properly protected
  • Error messages don't expose sensitive data
  • Rate limiting prevents abuse

See SECURITY.md for detailed security information.

๐Ÿ“‹ Scripts

  • npm run dev: Start development server
  • npm run build: Build for production
  • npm run start: Start production server
  • npm run lint: Run ESLint
  • npm run format: Format code with Prettier

๐Ÿš€ Deployment

Vercel (Recommended)

  1. Connect your GitHub repository to Vercel
  2. Set environment variables in Vercel dashboard
  3. Deploy automatically on push to main branch

Other Platforms

The app is a standard Next.js application and can be deployed to:

  • Netlify
  • Railway
  • DigitalOcean App Platform
  • AWS Amplify

๐Ÿ“Š Monitoring

Production Monitoring

  • Monitor API usage in OpenRouter dashboard
  • Track database performance in Supabase
  • Set up error tracking (Sentry recommended)
  • Monitor costs and usage limits

Analytics

  • User registration and engagement
  • Profile creation trends
  • Template usage statistics
  • AI analysis accuracy metrics

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

๐Ÿ“„ License

This project is licensed under the ISC License.

๐Ÿ†˜ Support

  • ๐Ÿ“ง Email: support@personaflow.com
  • ๐Ÿ“– Documentation: See SECURITY.md and inline comments
  • ๐Ÿ› Issues: Create an issue in this repository

๐Ÿ”ฎ Roadmap

  • Advanced analytics dashboard
  • Team collaboration features
  • API access for integrations
  • Mobile app development
  • Advanced AI models
  • Multi-language support

Built with โค๏ธ using Next.js, Supabase, and OpenRouter AI

About

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors