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.
- 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
- 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
- ✅ 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
-
Clone the repository
git clone <your-repo-url> cd personaflow
-
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local
Fill in your actual values:
- Supabase URL and keys from Supabase Dashboard
- OpenRouter API key from OpenRouter
-
Set up the database
- Run the SQL in
supabase-schema.sqlin your Supabase SQL editor - Optionally run
supabase-security-enhancements.sqlfor enhanced security
- Run the SQL in
-
Start the development server
npm run dev
See .env.example for all required environment variables. Key variables:
NEXT_PUBLIC_SUPABASE_URL: Your Supabase project URLNEXT_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)
The application uses several tables:
profiles: User account informationpersonality_profiles: DISC analysis resultscommunication_templates: Email/message templatessubscriptions: User plan and usage limitsusage_logs: Audit trail and analytics
- Sign up for a PersonaFlow account
- Create a profile by analyzing someone's written communication
- Get AI insights about their personality type (DISC)
- Use templates to craft personalized messages
- Writing assistant helps optimize your communication style
- D (Dominance): Direct, results-oriented, decisive
- I (Influence): Outgoing, enthusiastic, people-focused
- S (Steadiness): Patient, reliable, supportive
- C (Conscientiousness): Analytical, detailed, systematic
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.
npm run dev: Start development servernpm run build: Build for productionnpm run start: Start production servernpm run lint: Run ESLintnpm run format: Format code with Prettier
- Connect your GitHub repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push to main branch
The app is a standard Next.js application and can be deployed to:
- Netlify
- Railway
- DigitalOcean App Platform
- AWS Amplify
- Monitor API usage in OpenRouter dashboard
- Track database performance in Supabase
- Set up error tracking (Sentry recommended)
- Monitor costs and usage limits
- User registration and engagement
- Profile creation trends
- Template usage statistics
- AI analysis accuracy metrics
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the ISC License.
- 📧 Email: support@personaflow.com
- 📖 Documentation: See
SECURITY.mdand inline comments - 🐛 Issues: Create an issue in this repository
- 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