A modern blog platform with AI-powered journal-to-blog conversion. Transform your academic journals and PDF documents into engaging blog posts automatically.
- 📝 AI-Powered PDF Conversion: Automatically convert journals and PDFs to blog posts
- 🎨 Intuitive Create Page: Drag-and-drop interface with real-time preview
- ✏️ Inline Editing: Edit titles, summaries, tags, and content seamlessly
- 🏷️ Smart Tagging: AI-generated tags for better content organization
- 📱 Responsive Design: Beautiful interface across all devices
- 🔐 User Authentication: Secure login and user management
- Node.js 18+ installed
- Google Gemini API key (Get one here)
- (Optional) OpenRouter API key for fallback (Get one here)
- Clone the repository:
git clone https://github.com/Faedyl/Weiblogja.git
cd Weiblogja- Install dependencies:
npm install- Set up environment variables:
cp .env.example .env.localEdit .env.local and add:
GOOGLE_GEMINI_API_KEY=your_api_key_here
OPENROUTER_API_KEY=your_openrouter_key_here # Optional: for fallback when Gemini fails
# Add other required environment variables- Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev- Open http://localhost:3000 in your browser
- Journal to Blog Conversion Guide - Complete guide for PDF to blog conversion
- API Documentation - API endpoints and usage
- Deployment Guide - How to deploy to production
- Navigate to the Create page
- Upload your PDF:
- Drag and drop your PDF file
- Or click "Browse Files" to select
- Wait for AI conversion (15-45 seconds)
- Review and edit the generated content
- Publish or save as draft
See the detailed guide for more information.
- Framework: Next.js 15 with App Router
- Language: TypeScript
- AI: Google Gemini API (primary), OpenRouter API (fallback)
- AI Models: Gemini 2.0, Llama 3.2 (via OpenRouter)
- PDF Processing: pdf-parse
- Styling: CSS Modules
- Icons: Lucide React
- Authentication: NextAuth.js
- Database: DynamoDB
- Storage: AWS S3
src/
├── app/ # Next.js app directory
│ ├── create/ # PDF to blog creation page
│ ├── blog/ # Blog post pages
│ ├── api/ # API routes
│ └── components/ # React components
├── services/ # Business logic services
│ ├── pdf-extractor.ts # PDF text extraction
│ ├── gemini-service.ts # AI conversion service (primary)
│ └── openrouter-service.ts # AI conversion service (fallback)
├── types/ # TypeScript type definitions
└── lib/ # Utility functions
- Extracts text and structure from PDFs
- Transforms academic language to blog-friendly content
- Generates engaging titles and summaries
- Creates relevant tags automatically
- Maintains factual accuracy
- Automatic fallback: Uses OpenRouter (Llama 3.2) if Gemini fails
- Modern drag-and-drop interface
- Real-time file validation
- Visual progress tracking
- Inline content editing
- Live preview mode
- Tag management
# Required
GOOGLE_GEMINI_API_KEY=your_gemini_api_key
NEXTAUTH_SECRET=your_nextauth_secret
NEXTAUTH_URL=http://localhost:3000
# Optional (for AI fallback)
OPENROUTER_API_KEY=your_openrouter_api_key
# AWS (if using)
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_REGION=your_regionRun the development server with hot reload:
Run linting:
npm run lintBuild for production:
npm run buildContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
PDF conversion fails:
- Ensure your Gemini API key is valid
- If Gemini fails, add an OpenRouter API key for automatic fallback
- Check if the PDF is password-protected (not supported)
- Verify the PDF contains readable text
Upload size limit:
- Maximum file size is 50MB
- Compress large PDFs before uploading
See JOURNAL_TO_BLOG.md for more troubleshooting tips.
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.
