## π¦ Overview
DocMagic is a TypeScript-based documentation utility built with Next.js and Tailwind CSS. It helps teams manage, preview, and share docs with ease.
@@ -39,12 +36,6 @@ DocMagic is a TypeScript-based documentation utility built with Next.js and Tail
- Tailwind-powered styling
- Type-safe architecture with clear folder separation
-## π οΈ Getting Started
-```bash
-git clone https://github.com/Muneerali199/DocMagic.git
-cd DocMagic
-npm install
-npm run dev
@@ -77,7 +68,6 @@ npm run dev
### π― **50,000+ Documents Created** β’ π **99% Success Rate** β’ β **4.9/5 User Rating** β’ π **50+ Countries**
-> _"Create professional documents in seconds with AI magic β¨"_
@@ -89,1273 +79,61 @@ npm run dev
----
-
-## β¨ Core Features & Capabilities
-
-### π€ **AI-Powered Document Generation**
-
-- **π― Smart Resume Builder**: Create professional resumes with Gemini AI 2.0 Flash and 9-step guided workflow
- 
-- **π Presentation Generator**: Generate complete slide decks with outlines, themes, and shareable public URLs
- 
-- **π CV Creator**: Build comprehensive curriculum vitae with intelligent formatting
- 
-- **βοΈ Letter Composer**: Draft professional letters for any purpose
- 
-- **π ATS Resume Analyzer**: Advanced ATS compatibility scoring with detailed optimization feedback
-
-
-
-
-
-- **π¨ Professional Templates**: ATS-optimized templates with modern glass morphism design
- 
-- **π Progress Tracking**: Visual progress indicators and step-by-step completion tracking
- 
-- **π Presentation Sharing**: Share presentations via public URLs with privacy controls and anonymous viewing
-
-### π¨ **Modern UI/UX Design**
-
-- **β¨ Glass Morphism Interface**: Modern glass-effect components with subtle transparency and blur effects
-- **π Gradient Magic**: Dynamic bolt gradients and shimmer effects throughout the interface
-- **π Floating Animations**: Smooth floating orbs and animated background elements powered by Framer Motion
-- **π± Responsive Excellence**: Mobile-first design optimized for all screen sizes
-- **π Dark/Light Theme**: Seamless theme switching with next-themes
-- **βΏ Accessibility First**: WCAG 2.1 AA compliant components
-- **π― Magical Professionalism**: Design philosophy combining cutting-edge visual effects with professional usability
-- **Micro-Interactions**: Hover effects, scale transitions, and pulse animations for enhanced user engagement
-
-### π€ **AI-Powered Document Generation**
-
-- **Smart Text Processing**: Advanced Gemini AI integration for intelligent content generation
-- **Context-Aware Creation**: AI understands industry standards and target audience requirements
-- **Multiple Document Types**:
- - π **Professional Resumes** with ATS optimization
- - π― **Stunning Presentations** with smart layouts, charts, and shareable public URLs
- - π **Shareable Presentations** with privacy controls and anonymous viewing support
- - π **Comprehensive CVs** for academic and research positions
- - βοΈ **Business Letters** with perfect tone and formatting
-
-### π οΈ **Professional Tools & Features**
-
-- **Progressive Web App (PWA)**: Install DocMagic as a native app on any device with offline support and enhanced performance
-- **Advanced ATS Analyzer**: Comprehensive resume scanning with detailed scoring and optimization suggestions
-- **Professional Template Library**: Curated collection of ATS-optimized, modern templates with glass morphism design
-- **Guided Resume Builder**: 9-step workflow with progress tracking and intelligent navigation
-- **Smart Editing**: Intuitive WYSIWYG editor with real-time preview and mobile-first design
-- **Enhanced Export Options**: Download as PDF, DOCX, or PPTX with improved formatting and ATS compatibility
-- **Presentation Sharing**: Generate shareable public URLs with one-click sharing and privacy controls
-- **Anonymous Viewing**: Public presentations viewable without authentication for seamless sharing
-- **Chart Integration**: Automatic data visualization for presentations using Recharts
-- **Mobile-Responsive Navigation**: Touch-optimized interface that works perfectly on all devices
-- **π Comprehensive About Page**: Detailed information about features, technology, security, and roadmap accessible at `/about`
-- **π§ Intuitive Navigation**: Clean header with easy access to Resume, Presentation, Letter tools, and About page
-- **Image Integration**: Professional stock photos from Pexels API
-
-## π οΈ Tech Stack & Architecture
-
-### π¨ **Frontend Excellence**
-
-- **Next.js 15** - Latest React framework with App Router and Server Components
-- **TypeScript 5.2** - Full type safety and enhanced developer experience
-- **Tailwind CSS 3.3** - Utility-first styling with custom animations and gradients
-- **Radix UI** - Accessible, unstyled component primitives for maximum customization
-- **Framer Motion 12** - Smooth animations and micro-interactions
-- **Lucide React** - 1000+ beautiful, customizable SVG icons
-- **React Hook Form** - Performant forms with validation
-- **Zustand** - Lightweight state management
-
-### π§ **Advanced Component System**
-
-- **π¨ Radix UI Foundation**: 25+ accessible components including dialogs, dropdowns, and forms
-- **π Form Management**: React Hook Form with Zod validation for type-safe forms
-- **π Data Visualization**: Recharts integration for analytics and progress tracking
-- **πͺ Interactive Elements**: Carousels, accordions, and collapsible content
-- **π― Smart Inputs**: OTP inputs, date pickers, and file upload with drag-and-drop
-- **π Toast Notifications**: Sonner-powered notifications for user feedback
-
-### π **Authentication & Security**
-
-- **π‘οΈ Supabase Auth**: Secure user authentication with JWT tokens
-- **π€ User Management**: Registration, login, password reset, and profile management
-- **π Protected Routes**: Client-side route protection and redirects
-- **π Session Management**: Persistent sessions with automatic token refresh
-- **π Environment Security**: Secure API key management and environment variables
-
-### π³ **Payment & Subscription System**
-
-- **π° Stripe Integration**: Secure payment processing with Stripe
-- **π Subscription Management**: Pro/Free tier management with usage limits
-- **πͺ Customer Portal**: Self-service billing and subscription management
-- **π Usage Tracking**: Monitor document generation limits and analytics
-- **π Webhook Handling**: Real-time payment and subscription status updates
-- **Glass Morphism Design**: Custom CSS with backdrop-blur and transparency effects
-- **Responsive Grid System**: Mobile-first approach with breakpoint optimization
-- **Custom Animations**: Floating orbs, shimmer effects, and gradient transitions
-- **Accessibility First**: ARIA compliance and keyboard navigation support
-- **Theme System**: Dark/light mode with system preference detection
-
-### ποΈ **Backend & Database**
-
-- **Supabase** - PostgreSQL with real-time subscriptions and Row Level Security
-- **Supabase Auth** - OAuth providers, magic links, and secure session management
-- **Database Migrations** - Version-controlled schema changes
-- **Real-time Updates** - Live collaboration features
-
-### π€ **AI & External Services**
-
-- **Google Gemini AI** - Advanced language model for intelligent content generation
-- **Pexels API** - Professional stock photography integration
-- **Document Parsers** - PDF, DOCX parsing with Mammoth.js and pdf-parse
-- **Export Libraries** - jsPDF, docx, and pptxgenjs for multi-format downloads
-
-### π³ **Payments & Subscriptions**
-
-- **Stripe Integration** - Secure payment processing with webhooks
-- **Subscription Management** - Tiered pricing with usage tracking
-- **Customer Portal** - Self-service billing and subscription management
-
-### π **Deployment & Performance**
-
-- **Netlify** - Edge deployment with automatic builds and previews
-- **Vercel Ready** - Alternative deployment configuration included
-- **Performance Optimized** - Image optimization, code splitting, and caching strategies
-
-## π¨ UI/UX Design Philosophy
-
-### β¨ **Modern Glass Morphism Interface**
-
-DocMagic features a cutting-edge design system built around glass morphism principles, creating a sophisticated and intuitive user experience:
-
-- **Glass Effects**: Subtle transparency and backdrop-blur effects throughout the interface
-- **Dynamic Gradients**: Custom "bolt gradients" that create visual depth and energy
-- **Floating Elements**: Animated orbs and particles that respond to user interactions
-- **Shimmer Animations**: Subtle shine effects that guide user attention
-- **Responsive Typography**: Fluid text scaling that adapts to all screen sizes
-
-### π― **User Experience Highlights**
-
-#### π± **Mobile-First Responsive Design**
-
-- Optimized touch targets for mobile devices
-- Swipe gestures and touch-friendly interactions
-- Progressive enhancement for larger screens
-- Consistent experience across all devices
-
-#### π **Intelligent Theme System**
-
-- Automatic dark/light mode detection based on system preferences
-- Smooth theme transitions with preserved user state
-- High contrast ratios for accessibility compliance
-- Custom color schemes for different document types
-
-#### β‘ **Performance-Optimized Interactions**
-
-- 60fps animations using hardware acceleration
-- Lazy loading for optimal page speed
-- Debounced search and form inputs
-- Optimistic UI updates for instant feedback
-
-## πΈ Platform Screenshots
-
-
-
-### π **Ready to Create Magic?**
-
-[](https://docmagic1.netlify.app)
-[](https://github.com/yourusername/docmagic)
-[](https://discord.gg/docmagic)
-
-
-
-**Made with β€οΈ by the DocMagic Team**
-
-_Transforming ideas into professional documents, one AI generation at a time._
-
-
-
-
-
-
-
-| Endpoint | Method | Description | Request Body | Response |
-| ----------------- | ------ | ----------- | ---------------------------------------------- | -------------- |
-| `/api/send-email` | POST | Send email | `{ to, subject, content, letterContent, ... }` | Success status |
-
-### Authentication
-
-| Endpoint | Method | Description | Request Body | Response |
-| -------------------- | ------ | ------------- | --------------------------- | --------- |
-| `/api/auth/register` | POST | Register user | `{ name, email, password }` | User data |
-
-### Payments
-
-| Endpoint | Method | Description | Request Body | Response |
-| -------------------------------- | ------ | ------------------------- | ------------ | ------------------- |
-| `/api/stripe/check-subscription` | GET | Check subscription status | - | Subscription status |
-| `/api/stripe/create-checkout` | POST | Create checkout session | - | Checkout URL |
-| `/api/stripe/create-portal` | POST | Create customer portal | - | Portal URL |
-| `/api/stripe/webhook` | POST | Handle Stripe webhooks | Stripe event | Success status |
-
-## π³ Stripe Integration
-
-DocMagic uses Stripe for handling subscription payments. This section provides a comprehensive guide to setting up and managing the Stripe integration.
-
-### π Environment Variables
-
-Add the following environment variables to your `.env.local` file:
+### 5) Build / Start
```bash
-# Stripe
-STRIPE_SECRET_KEY=your_stripe_secret_key
-NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
-STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
-STRIPE_PRICE_ID=your_stripe_price_id # The ID of the price for your subscription plan
-NEXT_PUBLIC_APP_URL=http://localhost:3000 # Your application URL
+npm build && npm start
```
+
-### π οΈ Setup Instructions
-
-1. **Create a Stripe Account**
-
- - Sign up at [Stripe](https://dashboard.stripe.com/register)
- - Retrieve your API keys from the Stripe Dashboard under Developers > API keys
-
-2. **Configure Products and Prices**
-
- - Go to Products in the Stripe Dashboard
- - Create a new product (e.g., "Pro Subscription")
- - Add a price for the product (e.g., $9.99/month)
- - Note down the Price ID (e.g., `price_abc123`)
-
-3. **Set Up Webhooks**
-
- - Go to Developers > Webhooks in the Stripe Dashboard
- - Add an endpoint URL: `https://your-domain.com/api/stripe/webhook`
- - Add these events to listen for:
- - `checkout.session.completed`
- - `invoice.payment_succeeded`
- - `customer.subscription.updated`
- - `customer.subscription.deleted`
- - Retrieve the webhook signing secret
-
-4. **Update Environment Variables**
- - Update `.env.local` with your Stripe keys and webhook secret
- - Set `STRIPE_PRICE_ID` to your subscription price ID
-
-### π§ͺ Testing the Integration
-
-#### 1. Test the Payment Demo
-
-1. Navigate to `/payment-demo` in your browser
-2. Use one of the test card numbers below
-3. Enter any future expiry date, any 3-digit CVC, and any postal code
-4. Submit the form to test the payment flow
-
-#### 2. Test Cards
-
-| Card Number | Description |
-| --------------------- | --------------------------------- |
-| `4242 4242 4242 4242` | Successful payment |
-| `4000 0025 0000 3155` | 3D Secure authentication required |
-| `4000 0000 0000 0002` | Payment failed |
-| `4000 0082 6000 3178` | Insufficient funds |
-
-#### 3. Testing Webhooks Locally
-
-To test webhooks during development:
-
-1. Install the Stripe CLI: https://stripe.com/docs/stripe-cli
-2. Log in to your Stripe account:
- ```bash
- stripe login
- ```
-3. Forward webhooks to your local server:
- ```bash
- stripe listen --forward-to localhost:3000/api/stripe/webhook
- ```
-4. The CLI will provide a webhook signing secret. Add it to your `.env.local`:
- ```bash
- STRIPE_WEBHOOK_SECRET=whsec_...
- ```
-
-#### 4. Testing Different Scenarios
-
-- **Successful Payment**: Use card `4242 4242 4242 4242`
-- **3D Secure Flow**: Use card `4000 0025 0000 3155`
-- **Payment Failure**: Use card `4000 0000 0000 0002`
-- **Insufficient Funds**: Use card `4000 0082 6000 3178`
-
-2. **Test Webhooks Locally**
- - Use the Stripe CLI to forward webhooks to your local server:
- ```bash
- stripe listen --forward-to localhost:3000/api/stripe/webhook
- ```
- - This will give you a webhook signing secret to use in your `.env.local`
-
-### π Webhook Events Handled
-
-- `checkout.session.completed`: Creates a new subscription in the database
-- `invoice.payment_succeeded`: Updates subscription details after successful payment
-- `customer.subscription.updated`: Updates subscription status if changed in Stripe
-- `customer.subscription.deleted`: Handles subscription cancellation
-
-### π Frontend Components
-
-The main subscription flow is handled by the `SubscriptionButton` component:
-
-```tsx
-
-```
-
-### π Security Considerations
-
-- Never expose Stripe secret keys in client-side code
-- Always verify webhook signatures
-- Use environment variables for sensitive data
-- Implement proper error handling and user feedback
-
-### π οΈ Troubleshooting
-
-1. **Webhook Failures**
-
- - Verify the webhook signing secret matches your Stripe dashboard
- - Check server logs for detailed error messages
- - Ensure your server's clock is synchronized (NTP)
-
-2. **Checkout Issues**
-
- - Verify the Price ID exists in your Stripe account
- - Check the browser console for JavaScript errors
- - Ensure your Stripe API keys are in the correct mode (test/live)
-
-3. **Subscription Status**
- - Check the `subscriptions` table in your database
- - Verify the webhook events are being received and processed
-
-### π Additional Resources
-
-- [Stripe Documentation](https://stripe.com/docs)
-- [Stripe Checkout](https://stripe.com/docs/payments/checkout)
-- [Stripe Webhooks](https://stripe.com/docs/webhooks)
-- [Stripe Testing](https://stripe.com/docs/testing)
-
-### π― Best Practices
-
-1. Always use the latest version of the Stripe API
-2. Implement idempotency keys for critical operations
-3. Log all webhook events for debugging
-4. Set up monitoring for failed webhook deliveries
-5. Regularly test your integration with test cards
-
-### User
-
-| Endpoint | Method | Description | Request Body | Response |
-| ----------- | ------ | ------------- | ------------ | --------------------------- |
-| `/api/user` | GET | Get user data | - | User data with subscription |
-
-## π Authentication
-
-Authentication is handled by Supabase Auth. The system includes:
-
-- User registration with email/password
-- Secure login
-- Protected routes with middleware
-- User profile management
-- Session persistence
-
-## πΎ Database Schema
-
-The Supabase database includes the following tables:
-
-### Users Table
-
-- `id` (UUID, primary key)
-- `email` (text, unique)
-- `name` (text)
-- `password` (text, hashed)
-- `stripe_customer_id` (text, optional)
-- `created_at` (timestamp)
-- `updated_at` (timestamp)
-
-### Subscriptions Table
-
-- `id` (UUID, primary key)
-- `user_id` (UUID, foreign key to users)
-- `stripe_subscription_id` (text, unique)
-- `stripe_price_id` (text)
-- `stripe_current_period_end` (timestamp)
-- `status` (text)
-- `created_at` (timestamp)
-- `updated_at` (timestamp)
-
-### Documents Table
-
-- `id` (UUID, primary key)
-- `user_id` (UUID, foreign key to users)
-- `title` (text)
-- `type` (text) - resume, presentation, letter, cv
-- `content` (jsonb) - document data
-- `prompt` (text) - original user prompt
-- `created_at` (timestamp)
-- `updated_at` (timestamp)
-
-## π° Subscription Model
-
-DocMagic offers a freemium model:
-
-- **Free tier**: Basic document generation with limited features
-- **Pro tier**: Unlimited documents, premium templates, and advanced features
-
-## π€ Contributing
-
-Contributions are welcome! Please feel free to submit a Pull Request.
-
-1. Fork the repository
-2. Create your feature branch (`git checkout -b feature/amazing-feature`)
-3. Commit your changes (`git commit -m 'Add some amazing feature'`)
-4. Push to the branch (`git push origin feature/amazing-feature`)
-5. Open a Pull Request
-
-See the [CONTRIBUTING.md](CONTRIBUTING.md) file for detailed guidelines.
-
-## π License
-
+## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
-## π Acknowledgements
-
-- [Next.js](https://nextjs.org/)
-- [Supabase](https://supabase.com/)
-- [Tailwind CSS](https://tailwindcss.com/)
-- [shadcn/ui](https://ui.shadcn.com/)
-- [Google Gemini AI](https://ai.google.dev/)
-- [Stripe](https://stripe.com/)
-- [Pexels](https://www.pexels.com/) for professional images
-- [Recharts](https://recharts.org/) for data visualization
-- [Netlify](https://www.netlify.com/) for hosting
-
----
+
+
## π Top Contributors
We sincerely thank the amazing individuals who have contributed to DocMagic. Your time, effort, and ideas make this project better every day.
@@ -1370,10 +148,3 @@ We sincerely thank the amazing individuals who have contributed to DocMagic. You