Skip to content

emma31-dev/DocSpice

Repository files navigation

DocSpice 🌶️

Transform your text into beautiful, illustrated articles with AI-powered image matching.

DocSpice is a Next.js web application that takes plain text content and automatically enhances it with relevant, high-quality images from Unsplash. Using natural language processing and keyword extraction, DocSpice analyzes your content to find the perfect visual elements that complement your story.

DocSpice Demo

✨ Features

  • Smart Text Analysis: AI-powered keyword extraction and theme identification
  • Beautiful Image Matching: Automatic image selection from Unsplash based on content analysis
  • Responsive Design: Stunning, mobile-friendly layouts that work on all devices
  • Instant Generation: Transform your content into visual stories in seconds
  • No Authentication Required: Simple, friction-free user experience
  • SEO Optimized: Clean, semantic HTML structure for better search visibility

🚀 Getting Started

Prerequisites

  • Node.js 18+
  • npm, yarn, or pnpm
  • Unsplash Developer Account (for images)

Installation

  1. Clone the repository

    git clone https://github.com/your-username/docspice.git
    cd docspice
  2. Install dependencies

    npm install
    # or
    yarn install
    # or
    pnpm install
  3. Set up environment variables

    cp .env.local.example .env.local

    Edit .env.local and add your Unsplash Access Key:

    NEXT_PUBLIC_UNSPLASH_ACCESS_KEY=your_unsplash_access_key_here
  4. Get your Unsplash API key

    • Visit Unsplash Developers
    • Create a new application
    • Copy your Access Key to the .env.local file
  5. Run the development server

    npm run dev
    # or
    yarn dev
    # or
    pnpm dev
  6. Open your browser Navigate to http://localhost:3000 to see DocSpice in action!

🛠️ How It Works

  1. Text Input: Users paste their content into the beautiful input form
  2. AI Analysis: The app analyzes the text using natural language processing to extract:
    • Key themes and topics
    • Important keywords
    • Named entities
    • Content structure
  3. Image Search: Based on the analysis, DocSpice searches Unsplash for relevant images
  4. Article Generation: The system creates a beautifully formatted article with strategically placed images
  5. Visual Enhancement: The final result is a stunning, magazine-quality article with perfect image placement

🎯 Use Cases

  • Bloggers: Transform plain blog posts into visually engaging articles
  • Content Creators: Enhance social media content with professional layouts
  • Students: Create visually appealing reports and presentations
  • Writers: Turn manuscripts into illustrated stories
  • Marketers: Develop compelling visual content from copy
  • Educators: Create engaging educational materials

🧪 Technology Stack

  • Frontend: Next.js 15, React 18, TypeScript
  • Styling: Tailwind CSS
  • Text Processing: Natural.js for NLP
  • Images: Unsplash API
  • Icons: Lucide React
  • Deployment: Vercel-ready

📁 Project Structure

docspice/
├── src/
│   ├── app/
│   │   ├── api/generate/      # API endpoint for article generation
│   │   ├── article/[id]/      # Dynamic article display pages
│   │   ├── globals.css        # Global styles
│   │   ├── layout.tsx         # Root layout
│   │   └── page.tsx           # Home page
│   └── lib/
│       ├── textAnalysis.ts    # NLP and keyword extraction
│       └── unsplash.ts        # Unsplash API integration
├── public/                    # Static assets
├── .env.local.example         # Environment variables template
└── README.md

🔧 Configuration

Environment Variables

Variable Description Required
NEXT_PUBLIC_UNSPLASH_ACCESS_KEY Your Unsplash API Access Key Yes

Customization

  • Themes: Modify theme categories in src/lib/textAnalysis.ts
  • Image Selection: Adjust search parameters in src/lib/unsplash.ts
  • Layout: Customize article layouts in src/app/article/[id]/page.tsx
  • Styling: Update global styles in src/app/globals.css

🚀 Deployment

Vercel (Recommended)

  1. Push your code to GitHub
  2. Connect your repository to Vercel
  3. Add environment variables in your Vercel dashboard
  4. Deploy automatically!

Other Platforms

DocSpice can be deployed on any platform that supports Next.js:

  • Netlify
  • Railway
  • AWS Amplify
  • DigitalOcean App Platform

📊 Performance

  • Lighthouse Score: 95+ across all metrics
  • Image Optimization: Next.js automatic image optimization
  • Caching: Efficient API caching strategies
  • SEO: Semantic HTML and meta optimization

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

📄 License

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

🙏 Acknowledgments

📞 Support


Made with ❤️ by the DocSpice team

About

Make documents more readable

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published