Skip to content

aine1100/Prompt-Ai

Repository files navigation

PromptAI - Intelligent Prompt Enhancement Platform

Transform your prompts with AI-powered intelligence

Next.js TypeScript Tailwind CSS React

Live Demo β€’ Documentation β€’ Contributing


🌟 Overview

PromptAI is a cutting-edge web application that revolutionizes how developers and content creators interact with AI models. Built with modern web technologies and featuring a sleek, professional interface inspired by industry-leading design systems, PromptAI transforms basic prompts into sophisticated, results-driven instructions.

✨ Key Highlights

  • πŸš€ AI-Powered Enhancement - Intelligent prompt optimization using advanced language models
  • 🎨 Modern UI/UX - Clean, intuitive interface with smooth animations and interactions
  • πŸ“± Fully Responsive - Seamless experience across desktop, tablet, and mobile devices
  • ⚑ Real-time Processing - Instant prompt enhancement with live feedback
  • πŸ”§ Multiple Enhancement Modes - Professional, Creative, SEO, and Concise options
  • πŸ“‹ One-Click Copy - Easy clipboard integration for enhanced prompts
  • πŸŒ™ Dark Theme - Professional dark interface optimized for extended use

πŸš€ Features

Core Functionality

  • Professional Mode: Transform casual prompts into business-ready, formal instructions
  • Creative Mode: Add imaginative flair and engaging language to boost creativity
  • SEO Optimized: Enhance prompts with search-friendly keywords and structure
  • Concise Mode: Streamline verbose prompts into clear, direct instructions

User Experience

  • Interactive Chat Interface: Modern conversational UI with typing indicators
  • Real-time Enhancement: Live processing with visual feedback and progress indicators
  • Smart Suggestions: Quick-start examples and prompt templates
  • Copy & Share: One-click copying with visual confirmation
  • Responsive Design: Optimized for all screen sizes and devices

Technical Features

  • Type-Safe Development: Full TypeScript implementation for robust code
  • Modern React Patterns: Hooks, context, and functional components
  • Performance Optimized: Code splitting, lazy loading, and optimized bundles
  • Accessibility First: WCAG compliant with keyboard navigation support

πŸ›  Tech Stack

Category Technology Version Purpose
Framework Next.js 15.5.2 React framework with App Router
Language TypeScript 5.9.2 Type safety and developer experience
Styling Tailwind CSS 3.4.17 Utility-first CSS framework
UI Library React 19.1.0 Component-based user interface
Icons Lucide React 0.542.0 Beautiful, customizable icons
Package Manager pnpm Latest Fast, efficient dependency management

πŸ“¦ Quick Start

Prerequisites

Ensure you have the following installed:

  • Node.js 18.0 or higher
  • pnpm (recommended) or npm/yarn
  • Git for version control

Installation

  1. Clone the repository
git clone https://github.com/ainedushimire/promptai.git
cd promptai
  1. Install dependencies
pnpm install
# or
npm install
  1. Start development server
pnpm dev
# or
npm run dev
  1. Open in browser Navigate to http://localhost:3000

Environment Setup

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

# Add your environment variables here
NEXT_PUBLIC_APP_URL=http://localhost:3000

πŸ“ Project Architecture

prompt-enhancer/
β”œβ”€β”€ πŸ“ public/                    # Static assets
β”‚   β”œβ”€β”€ dev2.jpg                 # Hero section image
β”‚   β”œβ”€β”€ mockup.jpg               # Features section mockup
β”‚   └── *.svg                    # Icon assets
β”œβ”€β”€ οΏ½ src/ 
β”‚   β”œβ”€β”€ πŸ“ app/                  # Next.js App Router
β”‚   β”‚   β”œβ”€β”€ globals.css          # Global styles & Tailwind
β”‚   β”‚   β”œβ”€β”€ layout.tsx           # Root layout component
β”‚   β”‚   └── page.tsx             # Home page
β”‚   β”œβ”€β”€ πŸ“ components/           # React components
β”‚   β”‚   β”œβ”€β”€ Navigation.tsx       # Header navigation
β”‚   β”‚   β”œβ”€β”€ HeroSection.tsx      # Landing hero section
β”‚   β”‚   β”œβ”€β”€ FeaturesSection.tsx  # Features showcase
β”‚   β”‚   β”œβ”€β”€ PromptEnhancer.tsx   # Main enhancement tool
β”‚   β”‚   β”œβ”€β”€ TestimonialsSection.tsx # Customer testimonials
β”‚   β”‚   β”œβ”€β”€ HowItWorksSection.tsx # Process explanation
β”‚   β”‚   β”œβ”€β”€ CTASection.tsx       # Call-to-action
β”‚   β”‚   β”œβ”€β”€ CopyButton.tsx       # Clipboard functionality
β”‚   β”‚   └── LoadingSpinner.tsx   # Loading animations
β”‚   β”œβ”€β”€ πŸ“ lib/                  # Utility functions
β”‚   β”‚   └── enhance.ts           # AI enhancement logic
β”‚   └── πŸ“ types/                # TypeScript definitions
β”‚       └── puter.d.ts           # Puter.js type definitions
β”œβ”€β”€ πŸ“„ tailwind.config.cjs       # Tailwind configuration
β”œβ”€β”€ πŸ“„ next.config.ts            # Next.js configuration
β”œβ”€β”€ πŸ“„ tsconfig.json             # TypeScript configuration
└── πŸ“„ package.json              # Dependencies & scripts

🎯 Usage Guide

Basic Enhancement

  1. Navigate to the enhancement section
  2. Enter your original prompt in the text area
  3. Select your preferred enhancement mode
  4. Click "Enhance" to process with AI
  5. Copy the enhanced result to your clipboard

Enhancement Modes

Mode Best For Example Use Case
Professional Business communications Email templates, proposals, documentation
Creative Content creation Marketing copy, storytelling, social media
SEO Web content Blog posts, product descriptions, meta tags
Concise Quick instructions API documentation, user guides, summaries

Advanced Features

  • Quick Examples: Use pre-built prompt templates
  • Real-time Preview: See enhancements as you type
  • History: Access previously enhanced prompts
  • Export Options: Download or share enhanced prompts

🎨 Customization

Styling & Theming

/* Update global styles in src/app/globals.css */
.midday-card {
  @apply bg-[#0A0A0A] border border-[#1A1A1A] rounded-xl;
}

/* Customize component styles */
.custom-button {
  @apply midday-btn-primary hover:scale-105 transition-transform;
}

Adding New Enhancement Modes

// In src/lib/enhance.ts
export type EnhancementMode = 'professional' | 'creative' | 'seo' | 'concise' | 'custom';

const enhancementPrompts = {
  custom: "Transform this prompt with your custom logic...",
  // Add your custom enhancement logic
};

Component Customization

Each component is designed for easy customization:

  • Modify props and styling independently
  • Add new sections by creating new components
  • Update content without affecting functionality

πŸš€ Deployment

Vercel (Recommended)

# Install Vercel CLI
npm i -g vercel

# Deploy to Vercel
vercel --prod

Manual Build

# Build for production
pnpm build

# Start production server
pnpm start

Docker Deployment

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]

πŸ“ Available Scripts

Command Description
pnpm dev Start development server with hot reload
pnpm build Build optimized production bundle
pnpm start Start production server
pnpm lint Run ESLint for code quality
pnpm type-check Run TypeScript compiler check

πŸ§ͺ Testing

# Run unit tests
pnpm test

# Run tests in watch mode
pnpm test:watch

# Generate coverage report
pnpm test:coverage

🀝 Contributing

We welcome contributions from the community! Here's how to get started:

Development Workflow

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

Contribution Guidelines

  • Follow the existing code style and conventions
  • Add tests for new features
  • Update documentation as needed
  • Ensure all tests pass before submitting

Code Style

  • Use TypeScript for all new code
  • Follow React best practices and hooks patterns
  • Use Tailwind CSS for styling
  • Maintain component modularity and reusability

πŸ“Š Performance

  • Lighthouse Score: 95+ across all metrics
  • Bundle Size: < 200KB gzipped
  • First Contentful Paint: < 1.5s
  • Time to Interactive: < 3s

πŸ”’ Security

  • Input sanitization and validation
  • XSS protection with React's built-in safeguards
  • CSRF protection via Next.js security headers
  • Environment variable protection

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

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

Aine Dushimire

πŸ™ Acknowledgments

  • Design Inspiration: Midday.ai for the clean, professional aesthetic
  • Icons: Lucide React for beautiful, consistent iconography
  • AI Integration: Puter.js for powerful AI capabilities
  • Community: Thanks to all contributors and users who make this projer

πŸ“ˆ Roadmap

  • Multi-language Support - Internationalization for global users
  • Advanced AI Models - Integration with GPT-4, Claude, and other models
  • Prompt Templates - Pre-built templates for common use cases
  • Team Collaboration - Shared workspaces and prompt libraries
  • Analytics Dashboard - Usage insights and performance metrics
  • API Integration - RESTful API for third-party integrations
  • Mobile App - Native iOS and Android applications

About

ai which enhances prompt

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published