Skip to content

2005rishabh/thumbnail-studio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎨 Thumbnail Studio

An AI-powered YouTube thumbnail generator that helps content creators design stunning, professional thumbnails in seconds using Google's Gemini AI.

Thumbnail Studio License TypeScript React

🌟 Features

  • AI-Powered Generation: Leverage Google's Gemini AI to create custom YouTube thumbnails
  • Multiple Styles: Choose from various design styles and color schemes
  • Aspect Ratio Control: Generate thumbnails in different aspect ratios
  • User Authentication: Secure session-based authentication with MongoDB
  • Save & Manage: Store and retrieve your generated thumbnails
  • Real-time Preview: See your thumbnail in a YouTube-like interface
  • Cloud Storage: Images stored securely using Cloudinary
  • Responsive Design: Beautiful, modern UI built with TailwindCSS and Motion
  • Smooth Animations: Enhanced UX with Lenis smooth scrolling and Motion animations

πŸš€ Tech Stack

Frontend

  • Framework: React 19.1 with TypeScript
  • Build Tool: Vite 7.1
  • Styling: TailwindCSS 4.1
  • Routing: React Router DOM 7.8
  • Animations: Motion 12.23
  • Smooth Scrolling: Lenis
  • HTTP Client: Axios
  • UI Icons: Lucide React
  • Notifications: React Hot Toast

Backend

  • Runtime: Node.js with TypeScript
  • Framework: Express 5.2
  • Database: MongoDB with Mongoose
  • AI Integration: Google Generative AI (Gemini)
  • Authentication: Express Session + JWT
  • Password Hashing: Bcrypt
  • Image Storage: Cloudinary
  • Session Store: connect-mongo
  • CORS: Enabled for cross-origin requests

πŸ“ Project Structure

gemini-project/
β”œβ”€β”€ client/                 # Frontend React application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/    # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ pages/         # Page components (Home, Generate, etc.)
β”‚   β”‚   β”œβ”€β”€ sections/      # Landing page sections
β”‚   β”‚   β”œβ”€β”€ context/       # React context (AuthContext)
β”‚   β”‚   β”œβ”€β”€ data/          # Static data and constants
β”‚   β”‚   β”œβ”€β”€ config/        # Client configuration
β”‚   β”‚   └── App.tsx        # Main app component
β”‚   β”œβ”€β”€ public/            # Static assets
β”‚   └── package.json
β”‚
β”œβ”€β”€ server/                # Backend Express application
β”‚   β”œβ”€β”€ config/           # Database configuration
β”‚   β”œβ”€β”€ controllers/      # Request handlers
β”‚   β”‚   β”œβ”€β”€ authControllers.ts
β”‚   β”‚   β”œβ”€β”€ thumbnailController.ts
β”‚   β”‚   └── userController.ts
β”‚   β”œβ”€β”€ models/           # MongoDB models
β”‚   β”‚   β”œβ”€β”€ User.ts
β”‚   β”‚   └── Thumbnail.ts
β”‚   β”œβ”€β”€ routes/           # API routes
β”‚   β”‚   β”œβ”€β”€ AuthRoutes.ts
β”‚   β”‚   β”œβ”€β”€ ThumnailRoutes.ts
β”‚   β”‚   └── UserRoutes.ts
β”‚   β”œβ”€β”€ middlewares/      # Express middlewares
β”‚   β”œβ”€β”€ server.ts         # Main server file
β”‚   └── package.json
β”‚
└── vercel.json           # Vercel deployment configuration

πŸ› οΈ Installation & Setup

Prerequisites

  • Node.js (v18 or higher)
  • MongoDB (local or MongoDB Atlas)
  • Google Gemini API key
  • Cloudinary account

Environment Variables

Create .env files in both client and server directories:

Server .env

PORT=3000
NODE_ENV=development
MONGODB_URI=your_mongodb_connection_string
SESSION_SECRET=your_session_secret
GEMINI_API_KEY=your_gemini_api_key
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret

Client .env

VITE_API_URL=http://localhost:3000

Installation Steps

  1. Clone the repository
git clone <repository-url>
cd gemini-project
  1. Install server dependencies
cd server
npm install
  1. Install client dependencies
cd ../client
npm install
  1. Start the development servers

In the server directory:

npm run server

In the client directory:

npm run dev

The client will run on http://localhost:5173 and the server on http://localhost:3000.

🌐 API Endpoints

Authentication Routes (/api/auth)

  • POST /register - Register a new user
  • POST /login - Login user
  • POST /logout - Logout user
  • GET /check-auth - Check authentication status

Thumbnail Routes (/api/thumbnails)

  • POST /generate - Generate a new thumbnail
  • GET / - Get all user thumbnails
  • GET /:id - Get specific thumbnail
  • PUT /:id - Update thumbnail
  • DELETE /:id - Delete thumbnail

User Routes (/api/users)

  • GET /profile - Get user profile
  • PUT /profile - Update user profile

πŸ“± Pages

  • Home (/): Landing page with features, pricing, and testimonials
  • Login (/login): User authentication
  • Generate (/generate): AI thumbnail generation interface
  • My Generations (/my-generation): View and manage saved thumbnails
  • Preview (/preview): Preview thumbnails in YouTube interface

🎨 Key Components

  • Navbar: Global navigation with authentication state
  • Footer: Footer with links and information
  • AspectRatioSelector: Choose thumbnail dimensions
  • ColorSchemeSelector: Pick color palettes
  • StyleSelector: Select design styles
  • PreviewPanel: Real-time thumbnail preview
  • TiltImage: Interactive image with tilt effect
  • TestimonialCard: User testimonial display

🚒 Deployment

This project is configured for deployment on Vercel.

# Deploy from root directory
vercel --prod

The vercel.json configuration handles routing for both client and server.

πŸ”’ Security Features

  • Session-based authentication with secure cookies
  • Password hashing with bcrypt
  • CORS protection
  • Environment variable protection
  • JWT token support
  • Secure session storage in MongoDB

🀝 Contributing

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

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

πŸ“„ License

This project is licensed under the MIT License.

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

Rishabh Singh

πŸ™ Acknowledgments

  • Google Gemini AI for thumbnail generation
  • Cloudinary for image hosting
  • React and TypeScript communities
  • TailwindCSS for the beautiful UI framework

Made with ❀️ by Rishabh Singh

About

Click on this link to view

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages