An AI-powered multi-platform bio generator built with Next.js and Groq's Llama 3 models. This project features intelligent bio generation for Twitter/X, Instagram, and LinkedIn with platform-specific optimization, customizable settings, and real-time AI processing. Enhanced with RAG (Retrieval-Augmented Generation) for superior bio quality using curated knowledge base of bio writing best practices.
AI-Powered Generation - Leverages Groq's Llama 3 models (8B & 70B) for intelligent bio creation
Platform-Specific Optimization - Tailored content for Twitter/X, Instagram, and LinkedIn
RAG-Enhanced AI - Uses curated knowledge base for superior bio quality (always enabled)
Customizable Tone & Style - Professional, casual, funny, passionate, and more
Responsive Design - Beautiful, modern interface that works on all devices
Real-Time Generation - Fast bio creation with instant results
One-Click Copy - Easy clipboard integration for immediate use
Multiple Variations - Generate 4+ unique bio options per request
- Next.js 14 - React framework with App Router for server-side rendering and API routes
- React 18 - Component-based UI library with hooks and context
- TypeScript - Type-safe JavaScript for better development experience
- Vercel AI SDK - AI integration toolkit for LLM interactions
- Groq API - High-performance AI inference platform
- Llama 3 8B - Fast, efficient model for quick bio generation
- Llama 3 70B - Advanced model for sophisticated content creation
- RAG System - Enhanced generation using curated bio writing knowledge base
- OpenAI Embeddings - Advanced semantic search for knowledge retrieval
- Automatic Enhancement - RAG is always enabled for superior bio quality
- Zod - Schema validation for type-safe AI responses
- Endent - Template literal formatting for AI prompts
- Tailwind CSS - Utility-first CSS framework for styling
- Shadcn/ui - High-quality React component library
- Radix UI - Low-level UI primitives for accessibility
- Tailwind Animate - Animation utilities for Tailwind CSS
- Class Variance Authority - Component variant management
- React Hook Form - Performant forms with easy validation
- React Context API - State management for bio generation
- Hookform Resolvers - Zod integration for form validation
- Lucide React - Modern icon library
- Geist Font - Vercel's design system font family
- Custom SVG Icons - Platform-specific social media icons
- ESLint - Code linting and formatting
- PostCSS - CSS processing and optimization
- Clsx & Tailwind Merge - Conditional class name utilities
- Multi-Model Support - Choose between Llama 3 8B (fast) and 70B (sophisticated) models
- Platform Optimization - Tailored content for Twitter/X, Instagram, and LinkedIn
- Intelligent Prompting - Context-aware AI prompts for better results
- Schema Validation - Type-safe AI responses with structured output
- RAG Enhancement - Retrieval-Augmented Generation with curated knowledge base
- Fallback System - Graceful fallback to standard generation if RAG fails
- Always Active - RAG enhancement is automatically enabled for all bio generation
- Curated Knowledge Base - Pre-loaded with 17+ expert bio writing guidelines
- Platform-Specific Guidelines - Specialized knowledge for Twitter, Instagram, and LinkedIn
- Semantic Search - Intelligent retrieval of relevant context using OpenAI embeddings
- Text Fallback - Graceful fallback to text-based similarity when embeddings unavailable
- Best Practices Integration - Automatically incorporates proven bio writing techniques
- Tone-Specific Guidance - Contextual advice for professional, casual, funny, and other tones
- Tone Control - Professional, casual, humorous, passionate, thoughtful, and sarcastic
- Bio Types - Personal or brand/business focused content
- Creativity Levels - Adjustable creativity scale (0-2) for AI generation
- Emoji Integration - Optional emoji inclusion for enhanced engagement
- Platform Optimization - Automatic character limit and style optimization
- Flexible Input - No minimum word requirements for user input
- Streamlined Interface - Clean, intuitive design with simplified controls
- Real-Time Generation - Fast bio creation with instant results
- Multiple Variations - Generate 4+ unique bio options per request
- One-Click Copy - Easy clipboard integration for immediate use
- Responsive Design - Seamless experience across all devices
- Interactive UI - Modern interface with hover effects and animations
- Smart Validation - Real-time validation with helpful error messages
- Auto-Enhanced Quality - RAG system automatically improves all generated bios
- Twitter/X - 120-160 character limit, concise and punchy language
- Instagram - 100-150 character limit, visual and lifestyle-focused content
- LinkedIn - 160-220 character limit, professional tone with industry keywords
Create a .env.local file in the root directory with the following variables:
# Required - Groq API key for AI model access
GROQ_API_KEY=your_groq_api_key_here
# Optional - OpenAI API key for RAG embeddings (improves RAG performance)
OPENAI_API_KEY=your_openai_api_key_here-
Groq API Key (Required):
- Visit Groq Cloud
- Create an account and generate an API key
- Used for Llama 3 model access
-
OpenAI API Key (Optional):
- Visit OpenAI Platform
- Create an account and generate an API key
- Used for vector embeddings in RAG system
- If not provided, RAG will use text-based similarity matching
The application includes a comprehensive RAG (Retrieval-Augmented Generation) system that automatically enhances all bio generation:
- Always Active: RAG enhancement is automatically enabled for all bio generation
- Curated Knowledge Base: Pre-loaded with 17+ expert bio writing guidelines
- Platform-Specific Guidelines: Specialized knowledge for Twitter, Instagram, and LinkedIn
- Semantic Search: Intelligent retrieval of relevant context using OpenAI embeddings
- Text Fallback: Works without embeddings using text-based similarity matching
- Best Practices Integration: Automatically incorporates proven bio writing techniques
- Social media bio best practices
- Platform-specific optimization guidelines
- Tone and voice style guides
- High-converting bio templates
- Character limit optimization strategies
- Engagement psychology principles
BioSphere/
βββ public/ # Static assets
β βββ next.svg # Next.js logo
β βββ vercel.svg # Vercel logo
βββ src/
β βββ app/ # Next.js App Router
β β βββ actions.ts # Server actions for AI integration
β β βββ layout.tsx # Root layout with metadata and fonts
β β βββ page.tsx # Main application page
β β βββ globals.css # Global styles and CSS variables
β β βββ favicon.ico # Website favicon
β β βββ icon.png # App icon
β β βββ apple-icon.png # Apple touch icon
β β βββ api/ # API routes
β β β βββ generate-bio-rag/ # RAG-enhanced bio generation
β β β βββ rag-knowledge/ # RAG knowledge management
β β β βββ seed-knowledge/ # Knowledge base seeding
β β β βββ test-rag/ # RAG testing endpoint
β βββ components/ # React components
β β βββ home/ # Home page components
β β β βββ CopyLabel.tsx # Copy to clipboard functionality
β β β βββ Output.tsx # Bio generation results display
β β β βββ UserInput.tsx # Input form with all controls
β β βββ rag/ # RAG-specific components
β β β βββ RAGKnowledgeManager.tsx # RAG management interface (internal)
β β βββ icons/ # Custom SVG icon components
β β β βββ Instagram.tsx # Instagram brand icon
β β β βββ LinkedIn.tsx # LinkedIn brand icon
β β β βββ Meta.tsx # Meta/Facebook brand icon
β β β βββ Mistral.tsx # Mistral AI icon
β β β βββ Twitter.tsx # Twitter/X brand icon
β β βββ magicui/ # Enhanced UI components
β β β βββ animated-gradient-text.tsx # Gradient text animation
β β β βββ border-beam.tsx # Animated border effects
β β β βββ grid-pattern.tsx # Background grid pattern
β β βββ ui/ # Shadcn/ui base components
β β βββ alert-dialog.tsx # Modal dialogs
β β βββ badge.tsx # Status badges
β β βββ button.tsx # Button component with variants
β β βββ form.tsx # Form components and context
β β βββ hover-card.tsx # Hover card tooltips
β β βββ input.tsx # Text input fields
β β βββ label.tsx # Form labels
β β βββ select.tsx # Dropdown selections
β β βββ skeleton.tsx # Loading skeletons
β β βββ slider.tsx # Range sliders
β β βββ switch.tsx # Toggle switches
β β βββ textarea.tsx # Multi-line text input
β β βββ tooltip.tsx # Tooltips and help text
β βββ context/ # React Context providers
β β βββ BioContext.tsx # Bio generation state management
β βββ lib/ # Utility functions
β βββ utils.ts # Tailwind class merging utilities
β βββ rag/ # RAG system components
β βββ SimpleRAGStore.ts # Vector store implementation
β βββ RAGEnhancedAI.ts # RAG-enhanced AI generation
β βββ seedKnowledgeBase.ts # Initial knowledge base data
βββ data/ # Data storage
β βββ chunks.json # RAG knowledge chunks (auto-generated)
βββ components.json # Shadcn/ui configuration
βββ next.config.mjs # Next.js configuration
βββ package.json # Dependencies and scripts
βββ postcss.config.mjs # PostCSS configuration
βββ tailwind.config.ts # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ README.md # Project documentation
- Node.js (v18 or later)
- npm or yarn or pnpm
- Groq API key (free at console.groq.com)
# Clone the repository
git clone https://github.com/bepooee/BioSphere.git
# Navigate to the project directory
cd BioSphere
# Install dependencies
npm install
# or
yarn install
# or
pnpm install-
Create environment file
cp .env.example .env.local
-
Add your Groq API key to
.env.local:GROQ_API_KEY="your_groq_api_key_here"
-
Get your free Groq API key:
- Visit console.groq.com
- Sign up for a free account
- Generate an API key
- Copy the key to your environment file
# Start the development server
npm run dev
# or
yarn dev
# or
pnpm devOpen http://localhost:3000 in your browser to see BioSphere in action.
# Build the application
npm run build
# or
yarn build
# or
pnpm build
# Start the production server
npm run start
# or
yarn start
# or
pnpm startnpm run dev- Start development server with hot reloadnpm run build- Build optimized production bundlenpm run start- Start production servernpm run lint- Run ESLint for code quality
BioSphere uses Groq's API with Llama 3 models for bio generation. The AI system features:
Model Selection:
- Llama 3 8B - Optimized for speed and efficiency
- Llama 3 70B - Enhanced capability for complex bio generation
Intelligent Prompting:
- Platform-specific prompt engineering
- Context-aware content generation
- Tone and style adaptation
- Character limit optimization
Response Processing:
- Structured JSON output using Zod schemas
- Error handling and fallback responses
- Rate limiting and request optimization
The actions.ts file implements Next.js Server Actions for:
- Secure API key handling
- AI model communication
- Response validation and formatting
- Error management
// Example AI generation flow
const result = await generateObject({
model: groq(selectedModel),
schema: bioSchema,
prompt: constructedPrompt,
system: systemPrompt
});- Character Limit: 120-160 characters
- Style: Concise, punchy, engagement-focused
- Format: Single line, no hashtags
- Best Practices: Action-oriented language, clear value proposition
- Character Limit: 100-150 characters
- Style: Visual, lifestyle-focused, creative
- Format: Multi-line friendly, emoji-enhanced
- Best Practices: Personality-driven, authentic voice
- Character Limit: 160-220 characters
- Style: Professional, achievement-focused
- Format: Industry keywords, value-oriented
- Best Practices: Expertise highlighting, network-building focus
The project uses several optimizations for optimal performance:
Next.js Optimizations:
- App Router for improved performance
- Server-side rendering for faster initial loads
- Automatic code splitting
- Image optimization
Bundle Optimizations:
- Tree shaking for smaller bundle sizes
- Dynamic imports for code splitting
- Optimized dependency bundling
Runtime Optimizations:
- React 18 concurrent features
- Efficient re-rendering with proper memoization
- Optimized form handling with React Hook Form
Current Version: 2.0.0 (July 2025)
- Simplified User Experience: Removed RAG management UI for streamlined interface
- Automatic RAG Enhancement: RAG is now always enabled for superior bio quality
- Flexible Input Requirements: Removed minimum word count requirement for user input
- Enhanced Knowledge Base: Pre-loaded with 17+ expert bio writing guidelines
- Improved Performance: Optimized RAG system for faster generation
- Better Error Handling: Enhanced fallback systems for reliable operation
- Implemented Groq AI integration with Llama 3 models
- Added platform-specific bio optimization
- Enhanced UI with Shadcn/ui components
- Optimized form handling with React Hook Form
- Added responsive design for all screen sizes
- Implemented one-click copy functionality
- Added emoji integration toggle
- Enhanced error handling and validation
- AI Models: Groq - Llama 3 8B & 70B models
- UI Components: Shadcn/ui and Magic UI
- AI Integration: Vercel AI SDK
- Icons: Lucide React and Iconify Design
- Fonts: Vercel Fonts - Geist font family
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch
git checkout -b feature/amazing-feature
- Commit your changes
git commit -m 'Add some amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow the installation steps above
- Create a new branch for your feature
- Make your changes with proper TypeScript types
- Test your changes thoroughly
- Ensure ESLint passes:
npm run lint - Submit a pull request with a clear description
The easiest way to deploy BioSphere is using Vercel:
- Connect your GitHub repository to Vercel
- Add environment variables in Vercel dashboard:
GROQ_API_KEY- Your Groq API key
- Deploy automatically on git push
BioSphere can be deployed on any platform that supports Next.js:
- Netlify
- Railway
- AWS Amplify
- Google Cloud Platform
- Heroku
Make sure to set the GROQ_API_KEY environment variable on your chosen platform.
This project is created by bepooee and is available for educational and personal use.
Creator: bepoooe
Email: adrishbasak003@gmail.com
GitHub: https://github.com/bepoooe
Project Repository: https://github.com/bepoooe/BioSphere
If you found BioSphere helpful, please consider giving it a star on GitHub!
BioSphere v2.0 - AI-Powered Bio Generation with RAG Enhancement
Made with love by bepoooe