Skip to content

Repository files navigation

LinkedAI - AI-Powered LinkedIn Automation Platform

Complete LinkedIn automation platform with AI content generation, scheduling, analytics, workspace collaboration, and more.

✨ Features

πŸ€– AI-Powered Content

  • AI Content Generation - Generate engaging LinkedIn posts with Google Gemini AI
  • AI Image Generation - Create professional images for your posts
  • Viral Predictor - AI analysis to predict post performance
  • Content Ideas - Get AI-suggested topics and ideas

πŸ“… Scheduling & Publishing

  • Calendar View - Visual scheduling interface
  • Auto-Publishing - Automatic posting to LinkedIn
  • Draft Management - Save and edit drafts
  • Template System - Reusable content templates

πŸ“Š Analytics & Insights

  • Real-time Analytics - Track post performance
  • LinkedIn Sync - Automatic analytics synchronization
  • Engagement Metrics - Likes, comments, shares, impressions
  • Performance Trends - Historical data and insights

πŸ‘₯ Workspace Collaboration

  • Team Workspaces - Collaborate with your team
  • Role-Based Access - Owner, Admin, Editor, Viewer roles
  • Member Invitations - Invite team members via email
  • Workspace Management - Manage multiple workspaces

πŸ”” Notifications

  • Real-time Notifications - Stay updated on important events
  • Email Notifications - Workspace invitations and updates
  • Notification Preferences - Customize what you receive

πŸ” Authentication

  • Email/Password - Traditional authentication
  • Google OAuth - Sign in with Google
  • LinkedIn OAuth - Sign in with LinkedIn
  • Secure Sessions - Supabase Auth integration

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ installed
  • Supabase account
  • Google AI API key
  • LinkedIn Developer account (optional)
  • Resend account (optional, for emails)

1. Clone & Install

git clone https://github.com/piyush06singhal/linkedin-auto.git
cd linkedin-auto
npm install

2. Environment Setup

Copy .env.local.example to .env.local and fill in your credentials:

# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key

# Google Gemini AI
GOOGLE_AI_API_KEY=your_google_ai_api_key

# LinkedIn (Optional)
LINKEDIN_CLIENT_ID=your_linkedin_client_id
LINKEDIN_CLIENT_SECRET=your_linkedin_client_secret
LINKEDIN_REDIRECT_URI=http://localhost:3000/api/auth/linkedin/callback

# Email Service (Optional)
RESEND_API_KEY=your_resend_api_key
RESEND_FROM_EMAIL=LinkedAI <noreply@yourdomain.com>

# App URL
NEXT_PUBLIC_APP_URL=http://localhost:3000

3. Database Setup

  1. Go to your Supabase project SQL editor
  2. Run the schemas in order:
    supabase/schema.sql
    supabase/notifications_schema.sql
    supabase/workspaces_schema.sql

4. Run Development Server

npm run dev

Open http://localhost:3000

πŸ“ Project Structure

linkedin-auto/
β”œβ”€β”€ app/                      # Next.js 15 App Router
β”‚   β”œβ”€β”€ (auth)/              # Authentication pages
β”‚   β”œβ”€β”€ api/                 # API routes
β”‚   β”œβ”€β”€ dashboard/           # Dashboard pages
β”‚   └── page.tsx             # Landing page
β”œβ”€β”€ components/              # React components
β”‚   β”œβ”€β”€ DashboardLayout.tsx  # Main layout
β”‚   β”œβ”€β”€ Sidebar.tsx          # Navigation sidebar
β”‚   └── NotificationDropdown.tsx
β”œβ”€β”€ lib/                     # Utilities & services
β”‚   β”œβ”€β”€ ai/                  # AI services
β”‚   β”œβ”€β”€ email/               # Email services
β”‚   β”œβ”€β”€ linkedin/            # LinkedIn API
β”‚   β”œβ”€β”€ notifications/       # Notification system
β”‚   └── supabase/            # Supabase client
β”œβ”€β”€ supabase/                # Database schemas
β”œβ”€β”€ types/                   # TypeScript types
└── docs/                    # Documentation

πŸ› οΈ Tech Stack

  • Framework: Next.js 15 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Database: Supabase (PostgreSQL)
  • Authentication: Supabase Auth
  • AI: Google Gemini AI
  • Email: Resend
  • Deployment: Vercel
  • LinkedIn API: OAuth 2.0

πŸ“š Documentation

πŸ”§ Configuration

LinkedIn Integration

  1. Create app at LinkedIn Developers
  2. Add redirect URI: http://localhost:3000/api/auth/linkedin/callback
  3. Request permissions: openid, profile, email, w_member_social
  4. Add credentials to .env.local

Email Service (Resend)

  1. Sign up at Resend
  2. Get API key from dashboard
  3. For production: Verify your domain
  4. For testing: Use delivered@resend.dev

See Email Troubleshooting Guide for detailed setup.

Google AI (Gemini)

  1. Get API key from Google AI Studio
  2. Add to .env.local as GOOGLE_AI_API_KEY

πŸš€ Deployment

Deploy to Vercel

Deploy with Vercel

Manual Deployment:

  1. Push code to GitHub
  2. Import project in Vercel
  3. Add environment variables
  4. Deploy

Environment Variables for Production:

  • Update NEXT_PUBLIC_APP_URL to your domain
  • Update LINKEDIN_REDIRECT_URI to production URL
  • Verify domain in Resend for email delivery

πŸ“Š Database Schema

Main Tables

  • users - User accounts and profiles
  • posts - LinkedIn posts and drafts
  • scheduled_posts - Scheduled content
  • templates - Content templates
  • workspaces - Team workspaces
  • workspace_members - Workspace membership
  • workspace_invitations - Pending invitations
  • notifications - User notifications
  • notification_preferences - Notification settings

πŸ” Security

  • βœ… Row Level Security (RLS) enabled on all tables
  • βœ… Secure authentication with Supabase
  • βœ… API route protection
  • βœ… Environment variable validation
  • βœ… CORS configuration
  • βœ… Rate limiting on API routes

πŸ› Troubleshooting

Email Not Sending

See Email Troubleshooting Guide

LinkedIn Connection Issues

  1. Check redirect URI matches exactly
  2. Verify app permissions in LinkedIn Developer Portal
  3. Check API credentials in .env.local

Database Errors

  1. Verify all schemas are applied
  2. Check RLS policies are enabled
  3. Confirm service role key is correct

🀝 Contributing

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

πŸ“ License

This project is licensed under the MIT License.

πŸ‘¨β€πŸ’» Author

Piyush Singhal

πŸ™ Acknowledgments

  • Google Gemini AI for content generation
  • Supabase for backend infrastructure
  • Resend for email delivery
  • LinkedIn API for social integration
  • Vercel for hosting

Status: βœ… Production Ready | Version: 1.0.0 | Last Updated: December 2024

About

AI-powered LinkedIn automation platform with content generation, scheduling, analytics, and team collaboration. Built with Next.js 15, TypeScript, and Google Gemini AI.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages