Search projects, hackathons, sponsors and tech

    ← All projects

    StoryVerse

    An AI-powered creative collaboration game called "StoryVerse" that combines social elements, creative writing, and AI image generation.

    About

    The problem it solves StoryVerse makes storytelling more accessible, social, and rewarding while providing structured motivation for regular creative practice. It transforms what is traditionally a solitary activity into an engaging, community-driven experience.

    How it's made

    Challenges we ran into During development of StoryVerse, I encountered several significant challenges: Telegram WebApp Authentication Flow: One of the most complex issues was properly validating the Telegram WebApp's initData hash. The documentation wasn't entirely clear about the parameter ordering for hash validation. I resolved this by implementing a custom sorting function for the parameters and using crypto.createHmac() with proper parameter encoding. Image Generation Rate Limits: The DALL-E API calls for story illustrations were hitting rate limits during high user activity. I solved this by implementing a queue system using Bull.js that spaces out the requests and retries failed generations, plus added client-side caching of generated images to reduce API calls. MongoDB Atomic Operations: Handling concurrent story contributions while maintaining consistency was tricky. Users could sometimes overwrite each others' votes or contributions. I fixed this by using MongoDB's $push and $inc operators within atomic transactions, ensuring data consistency even during high concurrency. Real-time Updates: Initially, there were race conditions when multiple users were voting or contributing simultaneously. The solution was implementing a WebSocket layer with Socket.io for real-time updates, combined with optimistic UI updates and proper state reconciliation. Memory Leaks: The notification service was accumulating event listeners over time as users joined and left stories. I resolved this by implementing proper cleanup of WebSocket connections and event listeners when users disconnect, plus added monitoring to catch memory issues early.