Skip to content

AdeelTahir-SE/PowerMyPoint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

65 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PowerMyPoint 🎯

An AI-powered presentation generator built with Next.js, Google Gemini, and Supabase. Create professional presentations in seconds using natural language prompts.

Next.js TypeScript Tailwind CSS Google Gemini Supabase

✨ Features

  • πŸ€– AI-Powered Generation: Create presentations using Google Gemini 1.5 Pro
  • πŸ“Š Smart Slide Creation: Automatically generates 5-8 slides with structured content
  • ✏️ Full Editor: Edit titles, descriptions, and individual slides
  • πŸ‘οΈ Presentation Viewer: Fullscreen viewer with keyboard navigation
  • πŸ”₯ Trending Page: Discover popular presentations sorted by views
  • πŸ’Ύ Supabase Storage: Secure cloud storage with Row Level Security
  • 🎨 Modern UI: Beautiful, responsive design with dark mode support
  • πŸ“± Responsive: Works seamlessly on desktop, tablet, and mobile

πŸš€ Quick Start

Prerequisites

Installation

  1. Clone the repository

    git clone <your-repo-url>
    cd PowerMyPoint
  2. Install dependencies

    npm install
  3. Set up environment variables

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

    # Google Gemini API Key (get from https://makersuite.google.com/app/apikey)
    GOOGLE_GEMINI_API_KEY=your_google_gemini_api_key_here
    
    # Supabase Configuration (get from your Supabase project settings)
    NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url_here
    NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key_here
  4. Set up the database

    • Open your Supabase project dashboard
    • Navigate to SQL Editor
    • Copy the contents of src/database/schema.sql
    • Paste and run the SQL script

    This will create:

    • users table for user data
    • presentations table for storing presentations
    • Indexes for performance
    • Row Level Security policies
  5. Run the development server

    npm run dev
  6. Open your browser

    Navigate to http://localhost:3000

πŸ“ Project Structure

PowerMyPoint/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ (main)/              # Main app routes
β”‚   β”‚   β”‚   β”œβ”€β”€ explore/         # Browse presentations
β”‚   β”‚   β”‚   β”œβ”€β”€ presentations/   # Presentation detail & edit
β”‚   β”‚   β”‚   β”œβ”€β”€ trendings/       # Trending presentations
β”‚   β”‚   β”‚   └── settings/        # App settings
β”‚   β”‚   β”œβ”€β”€ api/                 # API routes
β”‚   β”‚   β”‚   β”œβ”€β”€ generate/        # Claude AI generation
β”‚   β”‚   β”‚   └── presentations/   # CRUD operations
β”‚   β”‚   └── layout.tsx           # Root layout
β”‚   β”œβ”€β”€ components/              # React components
β”‚   β”‚   β”œβ”€β”€ PresentationCard.tsx
β”‚   β”‚   β”œβ”€β”€ PresentationViewer.tsx
β”‚   β”‚   β”œβ”€β”€ SlideEditor.tsx
β”‚   β”‚   └── LoadingSpinner.tsx
β”‚   β”œβ”€β”€ database/
β”‚   β”‚   β”œβ”€β”€ connect.ts           # Supabase client
β”‚   β”‚   └── schema.sql           # Database schema
β”‚   └── types/
β”‚       └── types.ts             # TypeScript types
β”œβ”€β”€ public/                      # Static assets
β”œβ”€β”€ .env.local                   # Environment variables (create this)
└── package.json

🎨 Usage

Creating a Presentation

  1. Navigate to the Explore page
  2. Enter a prompt in the creation form, e.g., "Create a presentation about climate change"
  3. Click Create and wait for Google Gemini to generate your presentation
  4. Your presentation will appear in the grid

Viewing a Presentation

  1. Click on any presentation card
  2. Use the Previous/Next buttons or arrow keys to navigate slides
  3. Press F for fullscreen mode
  4. Press Esc to exit

Editing a Presentation

  1. Click the Edit button on a presentation card or detail page
  2. Modify the title, description, or slide content
  3. Add new slides with the Add Slide button
  4. Delete slides (minimum 1 slide required)
  5. Click Save Changes when done

Exploring Trending

  1. Navigate to the Trending page
  2. View presentations sorted by popularity (views)
  3. See statistics and top-ranked presentations

πŸ”Œ API Documentation

Generate Presentation

POST /api/generate

Generate a new presentation using Google Gemini.

Request Body:

{
  "prompt": "Create a presentation about renewable energy",
  "userId": "optional-user-id"
}

Response:

{
  "data": {
    "id": "uuid",
    "title": "Renewable Energy",
    "description": "An overview of renewable energy sources",
    "slides": [...],
    "created_at": "2025-12-07T...",
    "views": 0
  },
  "message": "Presentation generated successfully"
}

Get All Presentations

GET /api/presentations?public=true&limit=20&offset=0

Fetch presentations with pagination.

Query Parameters:

  • public (boolean): Filter public presentations
  • limit (number): Number of results (default: 20)
  • offset (number): Pagination offset (default: 0)

Get Single Presentation

GET /api/presentations/[id]

Fetch a specific presentation by ID. Automatically increments view count.

Update Presentation

PUT /api/presentations/[id]

Update presentation details.

Request Body:

{
  "title": "Updated Title",
  "description": "Updated description",
  "slides": [...],
  "is_public": true
}

Delete Presentation

DELETE /api/presentations/[id]

Delete a presentation permanently.

πŸ—„οΈ Database Schema

presentations

Column Type Description
id UUID Primary key
title TEXT Presentation title
description TEXT Brief description
slides JSONB Array of slide objects
user_id UUID Foreign key to users
is_public BOOLEAN Public visibility
views INTEGER View count
created_at TIMESTAMP Creation timestamp
updated_at TIMESTAMP Last update timestamp

users

Column Type Description
id UUID Primary key
email TEXT User email
name TEXT User name
created_at TIMESTAMP Creation timestamp

πŸ› οΈ Technologies

πŸ”’ Security

  • Row Level Security (RLS) enabled on all tables
  • Environment variables for sensitive credentials
  • API key validation
  • Secure database queries with Supabase client

🚒 Deployment

Vercel (Recommended)

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

Other Platforms

The app can be deployed to any platform that supports Next.js:

  • Netlify
  • Railway
  • AWS Amplify
  • Self-hosted with Docker

πŸ“ Environment Variables

Variable Description Required
GOOGLE_GEMINI_API_KEY Your Google Gemini API key Yes
NEXT_PUBLIC_SUPABASE_URL Supabase project URL Yes
NEXT_PUBLIC_SUPABASE_ANON_KEY Supabase anonymous key Yes
OPENAI_API_KEY OpenAI API key for ChatGPT (optional, for better outline generation) No
PEXELS_API_KEY Pexels API key for image fallback (optional, for replacing broken images) No
GOOGLE_IMAGEN_API_KEY Google Imagen API key for image generation fallback (optional, can use GOOGLE_GEMINI_API_KEY if compatible) No
GOOGLE_CLOUD_PROJECT_ID Google Cloud Project ID (required if using Imagen API) No
GOOGLE_CLOUD_LOCATION Google Cloud location (default: us-central1, required if using Imagen API) No

🀝 Contributing

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

πŸ“„ License

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

πŸ†˜ Support

If you encounter any issues:

  1. Check that all environment variables are set correctly
  2. Ensure the database schema has been run in Supabase
  3. Verify your Google Gemini API key is valid
  4. Check the browser console for errors

🎯 Roadmap

  • User authentication with Supabase Auth
  • Presentation templates
  • Export to PDF/PPTX
  • Collaborative editing
  • Custom themes and styling
  • Image generation for slides
  • Presentation analytics

Built with ❀️ using Next.js, Google Gemini, and Supabase

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors