Skip to content

Pratham-Prog861/Connectree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌟 Connectree

Create beautiful, shareable profile pages in seconds with AI-powered avatars and short URLs

✨ Features

  • 🎨 Beautiful Profile Pages - Create stunning, mobile-responsive profile pages

  • πŸ€– AI-Powered Avatars - Automatic fallback avatar generation using Google AI

  • πŸ”— Short URLs - Generate short, shareable links like https://connectree-sigma.vercel.app/p/fr2db2

  • 🎯 Link in Bio - Perfect replacement for Linktree, Bio.link, and similar services

  • πŸŒ™ Dark/Light Mode - Built-in theme switching

  • πŸ“± Mobile-First - Responsive design that works on all devices

  • πŸ’Ύ Client-Side Storage - No database required, works entirely in the browser

  • πŸ†“ 100% Free - No subscriptions, no limits, deploy anywhere

  • ⚑ Instant Deployment - Deploy to Vercel with zero configuration

  • 🧹 Auto Cleanup - Automatically manages storage and cleans up old profiles

πŸš€ Quick Start

1. Clone the Repository

git clone https://github.com/pratham-prog861/connectree.git
cd connectree

2. Install Dependencies

npm install
# or
yarn install
# or
pnpm install

3. Set Up Environment Variables

Create a .env.local file in the root directory:

# Google AI API Key (for avatar generation)
GOOGLE_GENAI_API_KEY=your_google_ai_api_key_here

Note: You can get a free Google AI API key from Google AI Studio

4. Run the Development Server

npm run dev

Open http://localhost:9002 in your browser.

🌐 Deploy to Vercel

  1. Push your code to GitHub
  2. Connect your repository to Vercel
  3. Add your environment variables in Vercel dashboard
  4. Deploy! πŸŽ‰

Deploy with Vercel

πŸ“– How It Works

Profile Creation

  1. Fill out your name, bio, and links
  2. Upload an avatar or provide a URL (AI fallback if none provided)
  3. Click "Generate JSON" to create your profile data
  4. Hit "Go Live & Share" to get your short URL

Storage System

  • Profiles are stored in browser localStorage
  • Each profile gets a unique 6-character hash
  • Short URLs like /p/abc123 redirect to full profile pages
  • Automatic cleanup removes profiles older than 30 days

URL Structure

yoursite.com/p/abc123  β†’  Short URL (redirects to profile)
yoursite.com/profile?data=... β†’  Full profile page

πŸ› οΈ Tech Stack

  • Framework: Next.js 15.3.3 with App Router
  • Language: TypeScript
  • Styling: Tailwind CSS + shadcn/ui components
  • Forms: React Hook Form + Zod validation
  • AI: Google Genkit for avatar generation
  • Icons: Lucide React
  • Deployment: Vercel-optimized

πŸ“ Project Structure

src/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ p/[hash]/          # Short URL handlers
β”‚   β”œβ”€β”€ profile/           # Profile viewer page
β”‚   β”œβ”€β”€ actions.ts         # Server actions
β”‚   β”œβ”€β”€ layout.tsx         # Root layout
β”‚   └── page.tsx          # Main profile creator
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ ui/               # shadcn/ui components
β”‚   β”œβ”€β”€ theme-provider.tsx
β”‚   └── theme-toggle.tsx
β”œβ”€β”€ hooks/
β”‚   β”œβ”€β”€ use-mobile.tsx
β”‚   └── use-toast.ts
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ profile-storage.ts # Client-side storage utilities
β”‚   └── utils.ts          # Utility functions
└── ai/
    β”œβ”€β”€ flows/            # AI avatar generation
    └── genkit.ts         # Genkit configuration

🎨 Customization

Themes

The app supports both light and dark modes out of the box. Customize colors in:

  • src/app/globals.css - CSS variables
  • tailwind.config.ts - Tailwind configuration

Components

All UI components are from shadcn/ui and can be customized:

  • src/components/ui/ - Individual component files
  • Modify styling, behavior, or add new components

Storage

Customize storage behavior in src/lib/profile-storage.ts:

  • Change cleanup interval (default: 30 days)
  • Modify hash generation algorithm
  • Add encryption or compression

πŸ”§ Available Scripts

# Development
npm run dev          # Start development server on port 9002
npm run genkit:dev   # Start Genkit development server
npm run genkit:watch # Start Genkit with file watching

# Production
npm run build        # Build for production
npm run start        # Start production server

# Code Quality
npm run lint         # Run ESLint
npm run typecheck    # Run TypeScript checks

πŸ€– AI Avatar Generation

Connectree uses Google's Genkit AI to generate fallback avatars when:

  • No avatar URL is provided
  • The provided URL is invalid or inaccessible
  • User uploads a file that can't be processed

The AI creates personalized avatars based on the user's name and profile information.

πŸ”’ Privacy & Data

  • No Server Storage: All data is stored in the user's browser
  • No Tracking: No analytics or user tracking
  • No Database: Profiles exist only in localStorage
  • Self-Hosted: Deploy anywhere you want

πŸ“± Browser Compatibility

  • βœ… Chrome (recommended)
  • βœ… Firefox
  • βœ… Safari
  • βœ… Edge
  • βœ… Mobile browsers

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ™ Acknowledgments

πŸ’‘ Use Cases

  • Personal Branding: Create a professional link-in-bio page
  • Social Media: Share all your links in one place
  • Events: Quick profile pages for speakers or attendees
  • Teams: Company directory or team member profiles
  • Students: Academic and project portfolios
  • Creators: Centralized hub for all content links

πŸ› Issues & Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Create a new issue with detailed information
  3. Join our community discussions

Made with ❀️ by Pratham Darji
GitHub β€’ LinkedIn

Releases

No releases published

Packages

 
 
 

Contributors

Languages