Skip to content

VisioGram is a web application where users can generate images based on text prompts using a custom image generation model hosted on serverless GPUs (via Modal). The app features an intuitive user interface built with React and Tailwind CSS, and includes real-time interaction capabilities, such as viewing and managing generated images.

Notifications You must be signed in to change notification settings

rahatmoktadir03/visio-gram

Β 
Β 

Repository files navigation

VisioGram - AI Image Generation Platform

VisioGram

Transform your imagination into stunning visuals with AI-powered image generation

🎨 Create β€’ πŸ’« Share β€’ ✨ Inspire

Next.js TypeScript Tailwind CSS Modal

✨ Features

🎨 AI Image Generation

  • Stable Diffusion integration via Modal serverless GPU hosting
  • Smart content moderation to ensure appropriate image generation
  • Real-time image generation with loading states and error handling

🌟 Social Platform

  • Instagram-like interface with image feed and interactions
  • Like, comment, and bookmark generated images
  • Share functionality with native Web Share API support
  • Semantic search to discover relevant content

🎯 User Experience

  • Landing-first approach for new users with smart redirection
  • Dark/Light mode toggle with system preference detection
  • Responsive design optimized for all device sizes
  • Smooth animations and modern UI/UX patterns

πŸ”§ Technical Features

  • Content moderation API for safe image generation
  • Recommendation engine for personalized content discovery
  • Toast notifications for user feedback
  • Copy, download, and share utilities for enhanced interactions

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Modal account (for AI image generation)

Installation

  1. Clone the repository
git clone https://github.com/rahatmoktadir03/visio-gram.git
cd visio-gram
  1. Install dependencies
npm install
  1. Set up Modal backend (Optional - demo works with placeholder images)
# Install Modal CLI
pip install modal

# Deploy the image generation function
modal deploy modal_app.py
  1. Start development server
npm run dev
  1. Open your browser
http://localhost:3000

πŸ—οΈ Project Structure

src/
β”œβ”€β”€ app/                    # Next.js App Router
β”‚   β”œβ”€β”€ api/               # API routes
β”‚   β”‚   β”œβ”€β”€ generate-image/    # AI image generation
β”‚   β”‚   β”œβ”€β”€ moderate-content/  # Content moderation
β”‚   β”‚   └── recommendations/   # Content recommendations
β”‚   β”œβ”€β”€ feed/              # Main social feed
β”‚   β”œβ”€β”€ create/            # Image creation page
β”‚   β”œβ”€β”€ history/           # User's generation history
β”‚   β”œβ”€β”€ bookmarks/         # Bookmarked content
β”‚   β”œβ”€β”€ _profile/          # Profile page (disabled for demo)
β”‚   └── page.tsx           # Landing page
β”œβ”€β”€ components/            # Reusable React components
β”‚   β”œβ”€β”€ Header.tsx         # Navigation header
β”‚   β”œβ”€β”€ ImageCard.tsx      # Image display component
β”‚   β”œβ”€β”€ SearchBar.tsx      # Search functionality
β”‚   β”œβ”€β”€ ThemeProvider.tsx  # Dark/light mode context
β”‚   └── ThemeToggle.tsx    # Theme switch button
β”œβ”€β”€ utils/                 # Utility functions
β”‚   └── interactions.ts    # User interaction helpers
└── modal_app.py          # Modal serverless functions

🎨 Tech Stack

Frontend

  • Next.js 15 - React framework with App Router
  • TypeScript - Type-safe development
  • Tailwind CSS - Utility-first styling with dark mode
  • Heroicons - Beautiful SVG icons

Backend & AI

  • Modal - Serverless GPU compute for AI inference
  • Stable Diffusion - Text-to-image AI model
  • Next.js API Routes - Backend API endpoints

Features

  • Responsive Design - Mobile-first approach
  • Dark Mode - System preference with manual toggle
  • PWA Ready - Progressive Web App capabilities
  • SEO Optimized - Meta tags and semantic HTML

🌟 Key Pages

  • / - Landing page with feature showcase
  • /feed - Main social feed with image generation
  • /create - Dedicated image creation interface
  • /history - User's generation history
  • /bookmarks - Saved/bookmarked images

πŸ”§ Configuration

Image Sources

The app uses Picsum Photos for placeholder images. For production, integrate with:

  • Modal AI image generation API
  • Your preferred image hosting service

Environment Variables

# Add your Modal API endpoint if using real AI generation
NEXT_PUBLIC_MODAL_ENDPOINT=your-modal-endpoint

🎯 Usage

  1. First Visit: Experience the landing page with feature overview
  2. Returning Users: Automatically redirected to the main feed
  3. Generate Images: Use the creation form with text prompts
  4. Social Interaction: Like, comment, and bookmark images
  5. Search & Discover: Find images using semantic search
  6. Theme Toggle: Switch between light and dark modes

πŸš€ Deployment

Netlify (Recommended)

  1. Connect your GitHub repository to Netlify
  2. Build command: npm run build
  3. Publish directory: .next
  4. Deploy!

Vercel

npm install -g vercel
vercel

Other Platforms

The app is a standard Next.js application and can be deployed to any platform supporting Node.js.

🀝 Contributing

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

πŸ“ License

This project is open source and available under the MIT License.

πŸ™ Acknowledgments

  • Modal for serverless GPU infrastructure
  • Stability AI for Stable Diffusion models
  • Vercel for Next.js framework
  • Tailwind Labs for amazing CSS framework

Built with ❀️ by Rahat Moktadir

Live Demo β€’ Report Bug β€’ Request Feature

About

VisioGram is a web application where users can generate images based on text prompts using a custom image generation model hosted on serverless GPUs (via Modal). The app features an intuitive user interface built with React and Tailwind CSS, and includes real-time interaction capabilities, such as viewing and managing generated images.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 95.8%
  • Python 3.7%
  • Other 0.5%