Moonafy
AI-Powered Story Creation Platform
Project Overview
Moonafy is a comprehensive AI-powered story creation platform that enables users to generate personalized stories using advanced AI technology. Built with modern web technologies, it features a React frontend, Node.js/Express backend, and Azure OpenAI integration for intelligent story generation.
AI Story Generation
Powered by Azure OpenAI for creative, contextual storytelling
User Management
Full authentication system with profile management
Premium Subscriptions
Stripe integration for subscription management
Video Generation
Automated video creation from generated stories
Technical Specifications
Key Features
Intelligent Story Generation
Advanced AI-powered story creation with customizable parameters including age groups, genres, character details, and story direction. Users can specify reading time, add multiple characters with detailed descriptions, and guide the narrative flow.
- Customizable story length (1-30 minutes reading time)
- Multiple genre selection (Adventure, Fantasy, Mystery, etc.)
- Detailed character creation with physical descriptions
- Story direction guidance and plot control
Secure User Authentication
Comprehensive authentication system using Better-Auth with JWT tokens, email verification, password recovery, and secure session management. All user data is protected with industry-standard security practices.
- Email verification and password recovery
- JWT-based session management
- Rate limiting and DDoS protection
- Input sanitization and XSS prevention
Usage Analytics & Limits
Built-in usage tracking system with weekly story generation limits for free users, comprehensive analytics dashboard, and grace period management for premium subscription transitions.
- Weekly usage limits and tracking
- Premium subscription management
- Grace period handling for expired subscriptions
- Detailed analytics dashboard
Premium Subscriptions
Integrated Stripe payment processing for premium subscriptions, subscription management, automated billing, and premium feature unlocking including unlimited story generation.
- Stripe payment integration
- Subscription management portal
- Automated billing and renewals
- Premium feature access control
Story Management & Sharing
Complete story lifecycle management including creation, editing, deletion, favoriting, and public sharing. Users can manage their story library with search and filtering capabilities.
- Personal story library management
- Public story sharing and discovery
- Favorite stories system
- Story editing and deletion
Automated Video Creation
Integration with video generation APIs to automatically create visual content from generated stories, scheduled video processing, and social media integration for content distribution.
- Automatic video generation from stories
- Scheduled video processing
- Social media integration
- Video API service integration
Technical Architecture
Frontend Layer
Backend Layer
External Services
Architecture Highlights
Modular backend structure with separate services for authentication, story generation, payments, video processing, and analytics.
Comprehensive security implementation including Helmet.js for security headers, rate limiting, input sanitization, and XSS protection.
Normalized SQL Server database with Kysely query builder for type-safe database operations and optimized queries.
Built for scale with Azure App Service hosting, automated deployments, and monitoring systems.
Development Challenges & Solutions
AI API Security
Challenge: Securing Azure OpenAI API keys while enabling real-time story generation.
Solution: Implemented server-side API proxy with authentication middleware, ensuring API keys never reach the frontend while maintaining responsive user experience.
Usage Tracking & Limits
Challenge: Implementing fair usage policies with weekly limits and premium tier management.
Solution: Built comprehensive usage tracking system with automated weekly resets, grace period handling, and real-time limit enforcement.
Real-time Story Generation
Challenge: Managing long-running AI requests while maintaining good user experience.
Solution: Implemented loading states, progress indicators, and error handling with timeout management and retry logic.
Payment Integration
Challenge: Complex Stripe subscription lifecycle management with usage-based access control.
Solution: Built robust webhook handling system with subscription state management, grace periods, and automated access control updates.
Project Gallery
Intuitive story creation form with character customization and genre selection
Clean, readable story presentation with sharing and favoriting options
Personal story library with usage tracking and subscription management
Stripe-powered premium subscription interface with feature comparison
Project Resources
This is a commercial project with proprietary technology. For inquiries about similar AI-powered applications or consultation, please get in touch.