Skip to content

πŸš€ Vector.AI - Full-stack AI SaaS platform for content creation, image generation, and AI-powered tools. Built with React, Node.js, PostgreSQL, and multiple AI APIs.

Notifications You must be signed in to change notification settings

aashutosh585/Vector.AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Vector.AI - AI-Powered Content Creation Platform

A comprehensive full-stack AI SaaS application that empowers users to create content, generate images, and enhance their digital assets using cutting-edge artificial intelligence.

🌐 Live Demo β€’ πŸ“– Documentation β€’ πŸš€ Quick Start β€’ 🀝 Contributing


πŸ“Έ Screenshots

Vector.AI Dashboard & Features AI Content Generation Interface

🎯 Features

Transform your content creation workflow with AI-powered tools

🎯 Core AI Tools

  • AI Article Writer: Generate high-quality, engaging articles with customizable length (500-1600+ words)
  • Blog Title Generator: Create catchy and SEO-optimized titles across 8 different categories
  • AI Image Generation: Produce stunning images from text prompts with 8+ artistic styles
  • Background Removal: Automatically remove backgrounds from images using AI
  • Object Removal: Seamlessly erase unwanted objects from photos
  • Resume Reviewer: Get AI-driven feedback and suggestions to improve your resume

πŸ‘₯ User Experience

  • Authentication: Secure user management with Clerk
  • Dashboard: Personal workspace to view all your AI creations
  • Community Gallery: Share and discover AI-generated content from other users
  • Like System: Engage with community content through likes
  • Usage Plans: Free tier with limits + Premium unlimited access

πŸ”§ Technical Features

  • Responsive Design: Mobile-first approach with Tailwind CSS
  • Real-time Feedback: Toast notifications for all user actions
  • File Upload: Secure image and PDF upload functionality (5MB limit)
  • Content Management: Publish/unpublish your creations
  • Database Persistence: All creations are stored and retrievable
  • Download Functionality: Download all generated content (images as PNG, text as TXT)
  • Loading Animations: Beautiful animated loading states during processing
  • Error Handling: Comprehensive error handling with user-friendly messages
  • Rate Limiting: Built-in API rate limiting and usage tracking

πŸ›  Tech Stack

Frontend

  • React 19 - Modern UI library
  • Vite - Fast build tool and development server
  • React Router DOM - Client-side routing
  • Tailwind CSS - Utility-first CSS framework
  • Axios - HTTP client for API requests
  • Lucide React - Beautiful icon library
  • React Hot Toast - Elegant notifications
  • React Markdown - Markdown rendering
  • Clerk - Authentication and user management

Backend

  • Node.js - Runtime environment
  • Express.js - Web application framework
  • PostgreSQL - Primary database (via Neon)
  • Clerk Express - Authentication middleware
  • Cloudinary - Image storage and processing
  • Multer - File upload handling
  • OpenAI API - AI text generation (via Gemini)
  • ClipDrop API - AI image generation
  • PDF Parse - Resume processing

Database & Storage

  • Neon PostgreSQL - Serverless PostgreSQL database
  • Cloudinary - Cloud-based image and video management

πŸš€ Quick Start

Get Vector.AI running in under 5 minutes:

# 1. Clone the repository
git clone https://github.com/aashutosh585/Vector.AI.git
cd Vector.AI

# 2. Install dependencies (both client and server)
npm run install:all

# 3. Set up environment variables (see .env.example files)
cp client/.env.example client/.env
cp server/.env.example server/.env

# 4. Start development servers
npm run dev

Open http://localhost:5173 to see the application.

⚑ Quick Note: You'll need API keys for Clerk, OpenAI/Gemini, ClipDrop, and Cloudinary. See the Environment Variables section for details.

πŸ“ Project Structure

AI SaaS/
β”œβ”€β”€ client/                     # Frontend React application
β”‚   β”œβ”€β”€ public/                 # Static assets
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ assets/            # Images, icons, and data
β”‚   β”‚   β”œβ”€β”€ components/        # Reusable UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ AiTools.jsx    # AI tools showcase
β”‚   β”‚   β”‚   β”œβ”€β”€ CreationItem.jsx # Individual creation display
β”‚   β”‚   β”‚   β”œβ”€β”€ Footer.jsx     # Site footer
β”‚   β”‚   β”‚   β”œβ”€β”€ Hero.jsx       # Landing page hero
β”‚   β”‚   β”‚   β”œβ”€β”€ Navbar.jsx     # Navigation bar
β”‚   β”‚   β”‚   β”œβ”€β”€ Plan.jsx       # Pricing plans
β”‚   β”‚   β”‚   β”œβ”€β”€ Sidebar.jsx    # Dashboard sidebar
β”‚   β”‚   β”‚   └── Testimonial.jsx # User testimonials
β”‚   β”‚   β”œβ”€β”€ pages/             # Application pages
β”‚   β”‚   β”‚   β”œβ”€β”€ BlogTitles.jsx # Blog title generator
β”‚   β”‚   β”‚   β”œβ”€β”€ Community.jsx  # Community gallery
β”‚   β”‚   β”‚   β”œβ”€β”€ DashBoard.jsx  # User dashboard
β”‚   β”‚   β”‚   β”œβ”€β”€ GenerateImages.jsx # Image generation
β”‚   β”‚   β”‚   β”œβ”€β”€ Home.jsx       # Landing page
β”‚   β”‚   β”‚   β”œβ”€β”€ Layout.jsx     # App layout wrapper
β”‚   β”‚   β”‚   β”œβ”€β”€ RemoveBackground.jsx # Background removal
β”‚   β”‚   β”‚   β”œβ”€β”€ RemoveObject.jsx # Object removal
β”‚   β”‚   β”‚   β”œβ”€β”€ ReviewResume.jsx # Resume review
β”‚   β”‚   β”‚   └── WriteArticle.jsx # Article generation
β”‚   β”‚   β”œβ”€β”€ App.jsx            # Main app component
β”‚   β”‚   β”œβ”€β”€ index.css          # Global styles
β”‚   β”‚   └── main.jsx           # App entry point
β”‚   β”œβ”€β”€ .env                   # Environment variables
β”‚   β”œβ”€β”€ package.json           # Dependencies and scripts
β”‚   └── vite.config.js         # Vite configuration
β”œβ”€β”€ server/                     # Backend Express application
β”‚   β”œβ”€β”€ configs/               # Configuration files
β”‚   β”‚   β”œβ”€β”€ cloudinary.js      # Cloudinary setup
β”‚   β”‚   β”œβ”€β”€ db.js              # Database connection
β”‚   β”‚   └── multer.js          # File upload config
β”‚   β”œβ”€β”€ controllers/           # Route controllers
β”‚   β”‚   β”œβ”€β”€ aiController.js    # AI-related endpoints
β”‚   β”‚   └── userController.js  # User-related endpoints
β”‚   β”œβ”€β”€ middlewares/           # Custom middleware
β”‚   β”‚   └── auth.js            # Authentication middleware
β”‚   β”œβ”€β”€ routes/                # API routes
β”‚   β”‚   β”œβ”€β”€ aiRoutes.js        # AI endpoints routing
β”‚   β”‚   └── userRoutes.js      # User endpoints routing
β”‚   β”œβ”€β”€ package.json           # Dependencies and scripts
β”‚   └── server.js              # Express server setup
└── README.md                   # Project documentation

πŸ“‹ Prerequisites

Before running this application, make sure you have:

πŸ”§ Development Environment

  • Node.js (v18 or higher) - Download
  • npm or yarn - Package manager
  • Git - Version control

πŸ”‘ Required Services & API Keys

πŸ“± Optional

  • Vercel Account - For deployment
  • VS Code - Recommended editor with extensions:
    • ES7+ React/Redux/React-Native snippets
    • Tailwind CSS IntelliSense
    • Prettier - Code formatter

βš™οΈ Installation

Method 1: Automatic Setup (Recommended)

# Clone the repository
git clone https://github.com/aashutosh585/Vector.AI.git
cd Vector.AI

# Run automatic setup script
npm run setup

Method 2: Manual Installation

1. Clone the Repository

git clone https://github.com/aashutosh585/Vector.AI.git
cd Vector.AI

2. Install Dependencies

# Install root dependencies
npm install

# Install client dependencies
cd client
npm install

# Install server dependencies
cd ../server
npm install

3. Database Setup

# Create database tables (run from server directory)
cd server
npm run db:setup

πŸ” Environment Variables

Frontend (.env)

Create a .env file in the client directory:

VITE_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
VITE_BASE_URL=http://localhost:3000

Backend (.env)

Create a .env file in the server directory:

# Database
DATABASE_URL=your_neon_postgresql_connection_string

# Authentication
CLERK_SECRET_KEY=your_clerk_secret_key
CLERK_WEBHOOK_SECRET=your_clerk_webhook_secret

# AI Services
GEMINI_API_KEY=your_gemini_api_key
CLIPDROP_API_KEY=your_clipdrop_api_key

# Cloud Storage
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret

# Server
PORT=3000
NODE_ENV=development

πŸƒβ€β™‚οΈ Usage

Development Mode

  1. Start the Backend Server:
cd server
npm run server
  1. Start the Frontend Development Server:
cd client
npm run dev
  1. Access the Application:
    • Frontend: http://localhost:5173
    • Backend API: http://localhost:3000

Production Mode

  1. Build the Frontend:
cd client
npm run build
  1. Start the Production Server:
cd server
npm start

οΏ½ API Documentation

πŸ€– AI Endpoints (/api/ai)

Method Endpoint Description Parameters Response Auth
POST /generate-article Generate articles with custom length prompt, length {success, content} βœ…
POST /generate-blog-title Create blog titles by category prompt {success, content} βœ…
POST /generate-images Generate images from text prompts prompt, publish {success, content} βœ…
POST /remove-background Remove image backgrounds image (file) {success, content} βœ…
POST /remove-image-object Remove objects from images image (file), object {success, content} βœ…
POST /resume-review Analyze and review resumes resume (PDF file) {success, content} βœ…

πŸ‘€ User Endpoints (/api/user)

Method Endpoint Description Parameters Response Auth
GET /get-user-creations Fetch user's all creations - {success, creations[]} βœ…
GET /get-published-creations Fetch public community creations - {success, creations[]} βœ…
POST /toggle-like-creation Like/unlike community creations id {success, message} βœ…

πŸ“ Example API Usage

// Generate an article
const response = await fetch('/api/ai/generate-article', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    prompt: 'Write about artificial intelligence',
    length: 800
  })
});

const data = await response.json();
console.log(data.content); // Generated article

πŸ”„ Response Format

All API responses follow this structure:

{
  "success": true,
  "message": "Operation completed successfully",
  "content": "Generated content or data",
  "error": null
}

πŸ—„ Database Schema

Creations Table

CREATE TABLE creations (
  id SERIAL PRIMARY KEY,
  user_id VARCHAR(255) NOT NULL,
  prompt TEXT NOT NULL,
  content TEXT NOT NULL,
  type VARCHAR(50) NOT NULL, -- 'article', 'blog-title', 'image'
  publish BOOLEAN DEFAULT false,
  likes TEXT[], -- Array of user IDs who liked
  created_at TIMESTAMP DEFAULT NOW(),
  updated_at TIMESTAMP DEFAULT NOW()
);

🎯 Key Features Explained

AI Article Writer

  • Generate articles from 500 to 1600+ words
  • Customizable prompts and topics
  • Markdown formatting support
  • Instant preview and editing

Blog Title Generator

  • 8 categories: General, Technology, Health, Lifestyle, Travel, Food, Education, Business
  • SEO-optimized suggestions
  • Multiple title variations per request

AI Image Generation

  • 8 artistic styles: Realistic, Ghibli, Cartoon, Anime, Fantasy, 3D, Portrait
  • High-quality image output
  • Cloudinary integration for storage
  • Community sharing options

Background & Object Removal

  • AI-powered precision removal
  • Support for JPG, PNG formats
  • Real-time processing feedback
  • Download and save functionality

Community Features

  • Public gallery of user creations
  • Like and engagement system
  • Real-time updates
  • User authentication integration

🎨 UI/UX Features

🎯 Design Philosophy

  • Clean & Minimal: Focus on content creation without distractions
  • Intuitive Navigation: Easy-to-use interface for all skill levels
  • Responsive Design: Seamless experience across all devices
  • Dark/Light Mode: Automatic theme detection (coming soon)

πŸ”„ User Flow

  1. Sign Up/Login: Quick authentication via Clerk
  2. Choose Tool: Select from 6 AI-powered tools
  3. Create Content: Input prompts or upload files
  4. Review Results: Preview generated content with loading animations
  5. Download & Share: Save locally or publish to community

πŸ“± Mobile Experience

  • Touch-optimized interface
  • Responsive layouts for all screen sizes
  • Mobile-first design approach
  • Progressive Web App (PWA) ready

🚒 Deployment

Vercel (Recommended)

Frontend Deployment

# Install Vercel CLI
npm i -g vercel

# Deploy frontend
cd client
vercel --prod

Backend Deployment

# Deploy backend
cd server
vercel --prod

Manual Deployment

Using PM2

# Install PM2
npm install -g pm2

# Start server with PM2
cd server
pm2 start server.js --name "vector-ai-backend"

# Build and serve frontend
cd ../client
npm run build
pm2 serve dist 5173 --name "vector-ai-frontend"

Environment Configuration for Production

# Production environment variables
NODE_ENV=production
DATABASE_URL=your_production_database_url
VITE_BASE_URL=https://your-backend-domain.com

πŸ§ͺ Testing

Running Tests

# Run all tests
npm run test

# Run frontend tests
cd client
npm run test

# Run backend tests
cd server
npm run test

# Run with coverage
npm run test:coverage

Test Structure

tests/
β”œβ”€β”€ unit/           # Unit tests
β”œβ”€β”€ integration/    # Integration tests
β”œβ”€β”€ e2e/           # End-to-end tests
└── fixtures/      # Test data

πŸ“Š Performance

Optimization Features

  • Code Splitting: Automatic route-based code splitting
  • Image Optimization: Cloudinary automatic optimization
  • Caching: API response caching
  • Bundle Analysis: Webpack bundle analyzer integration

Performance Metrics

  • Lighthouse Score: 95+ performance rating
  • First Contentful Paint: < 1.5s
  • Time to Interactive: < 3s
  • Bundle Size: < 250KB (gzipped)
# Analyze bundle size
npm run analyze

# Performance audit
npm run lighthouse

πŸ›‘οΈ Security

Security Measures

  • Authentication: Clerk-powered secure authentication
  • API Protection: JWT token validation
  • File Upload Security: File type and size validation
  • Rate Limiting: API rate limiting per user
  • Data Encryption: Encrypted data transmission (HTTPS)
  • Input Sanitization: XSS protection

Security Best Practices

  • Regular dependency updates
  • Environment variable protection
  • Secure headers implementation
  • CORS configuration
  • SQL injection prevention

πŸ”§ Development

Frontend Scripts

npm run dev      # Start development server
npm run build    # Build for production
npm run preview  # Preview production build
npm run lint     # Run ESLint

Backend Scripts

npm run server   # Start with nodemon (development)
npm start        # Start production server

🀝 Contributing

We love contributions! Vector.AI is an open-source project and we welcome contributions of all kinds.

🌟 Ways to Contribute

  • πŸ› Bug Reports: Found a bug? Let us know!
  • πŸš€ Feature Requests: Have an idea? We'd love to hear it!
  • πŸ’» Code Contributions: Submit pull requests
  • πŸ“š Documentation: Improve our docs
  • 🎨 Design: UI/UX improvements
  • πŸ§ͺ Testing: Add or improve tests

πŸ”„ Development Workflow

  1. Fork & Clone

    git clone https://github.com/your-username/Vector.AI.git
    cd Vector.AI
  2. Create Feature Branch

    git checkout -b feature/amazing-feature
  3. Make Changes

    # Make your changes
    npm run dev  # Test locally
  4. Commit Changes

    git add .
    git commit -m "feat: add amazing feature"
  5. Push & PR

    git push origin feature/amazing-feature
    # Create Pull Request on GitHub

πŸ“‹ Contribution Guidelines

  • Follow the existing code style
  • Write clear commit messages
  • Add tests for new features
  • Update documentation
  • Ensure all tests pass

πŸ› Bug Reports

When filing a bug report, please include:

  • Steps to reproduce
  • Expected behavior
  • Actual behavior
  • Browser/OS information
  • Screenshots (if applicable)

πŸ’‘ Feature Requests

For feature requests, please include:

  • Clear description of the feature
  • Use cases and benefits
  • Mockups or examples (if applicable)

πŸ™ Acknowledgments

πŸ”§ Technologies & Services

  • Clerk - Seamless authentication and user management
  • OpenAI / Gemini - Powerful AI text generation
  • ClipDrop - Advanced AI image generation
  • Cloudinary - Reliable image processing and storage
  • Neon - Serverless PostgreSQL database
  • Vercel - Seamless deployment platform

🎨 Design & UI

🧰 Development Tools

  • Vite - Lightning-fast build tool
  • React - Powerful UI library
  • Node.js - JavaScript runtime
  • Express.js - Web application framework

🌟 Special Thanks

  • The open-source community for continuous inspiration
  • Beta testers who provided valuable feedback
  • All contributors who helped improve Vector.AI

πŸ“ž Support & Community

🀝 Get Help & Connect

Email GitHub LinkedIn Discord

πŸ’¬ Support Channels

⭐ Show Your Support

If Vector.AI helped you create amazing content, please consider:

  • ⭐ Star the repository on GitHub
  • 🐦 Share on social media with #VectorAI
  • 🀝 Contribute to the project
  • πŸ“ Write a review or blog post
  • β˜• Buy me a coffee (coming soon)

πŸš€ Built with ❀️ by Ashutosh Maurya

"Empowering creators with AI - one prompt at a time"

Made with Love Open Source AI Powered


πŸ‘¨β€πŸ’» Developer Portfolio: www.aashutosh.me

⬆ Back to Top

About

πŸš€ Vector.AI - Full-stack AI SaaS platform for content creation, image generation, and AI-powered tools. Built with React, Node.js, PostgreSQL, and multiple AI APIs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages