Akari Art — AI Image Generator & Gallery
AI Tools
Early 2025
Next.jsCloudflare WorkersMongoDBMongooseNextAuth.jsCloudinary

Akari Art is a full-stack web application that lets users generate beautiful AI artwork from natural language prompts and share their creations with a growing community. Powered by Cloudflare Workers AI and the Flux-1-Schnell model, Akari Art delivers fast, high-quality image generation right in the browser.
Approach
Designed and built a serverless, database-backed web application optimized for quick rendering, secure social authentication, and cost-efficient media management.
- Fast Synthesis Pipeline: Configured a direct proxy endpoint in Next.js to forward text prompts securely to Cloudflare Workers AI, generating Base64 PNGs on the fly.
- Optimized Storage Flow: Uploaded the generated base64 image data immediately to Cloudinary, ensuring only lightweight, high-performance secure URLs are persisted to MongoDB.
- Serverless-Safe Database: Integrated Mongoose with MongoDB Atlas utilizing global connection caching and strict connection limits (
maxPoolSize: 10) to prevent serverless function scaling issues. - Stateless Authentication: Configured NextAuth.js Google OAuth with JWT session strategies, extending next-auth types to dynamically store the MongoDB user ID.
- Edge Route Protection: Implemented Edge-optimized middleware route guards using NextAuth to prevent unauthenticated access to the creation dashboard and community feed.
Key Features
- AI-Powered Image Synthesis: Description to image generation using Cloudflare Workers AI and the
Flux-1-Schnellmodel. - Social Gallery Feed: A responsive visual gallery page loading published creations directly from MongoDB in a reversed, newest-first layout.
- Desktop Hover & Mobile Tap Overlays: Sleek card states that display the prompt, creator avatar, and action triggers, optimized for hover on desktop and tap on mobile.
- Instant Downloads: Save shared community creations directly to local devices with one click, utilizing client-side file-saving.
- URL-based Search & Filters: Seamless text filtering on creator names and prompt substrings with shareable and bookmarkable URL search parameters.
Tech Stack
- Frontend: Next.js 15, React, Tailwind CSS, Lucide React, file-saver
- Backend: Next.js App Router (Route Handlers), NextAuth.js
- Database & Storage: MongoDB, Mongoose ORM, Cloudinary SDK
- Infrastructure: Cloudflare Workers AI (Flux model)
Result
- Fast, end-to-end image generation and CDN deployment in a matter of seconds.
- Fully serverless implementation scaling to multi-user workloads without database connection pool exhaustion.
- Dynamic, accessible social feed featuring shareable query states.