Writer's Rhythm: Your AI-Powered Writing Companion

The Spark: My Inspiration

As a writer, I've always struggled with consistency and finding fresh inspiration. The blank page can be daunting, and tracking progress often feels like a chore. I envisioned a tool that wouldn't just log my words, but actively support my creative process, help me build strong writing habits, and provide intelligent insights. This led to the idea of Writer's Rhythm – an application designed to transform the writing journey by combining habit tracking, project management, and AI-powered assistance into one seamless experience. I wanted to create something that felt like a supportive co-pilot, not just a word processor.

Building the Rhythm: How I Built It

Writer's Rhythm is a full-stack web application built with a modern and scalable technology stack:

Frontend: Developed with React and TypeScript, leveraging Vite for a fast development experience. Tailwind CSS was used for rapid and responsive UI development, ensuring a clean and intuitive user interface. Lucide React provides the iconography, maintaining a consistent and professional aesthetic. Backend & Database: Supabase serves as the robust backend, providing a PostgreSQL database, secure Authentication, and Storage for user-uploaded content like profile photos. Supabase's Edge Functions were crucial for handling secure Stripe payment processing for subscriptions. AI Integration (Simulated): The core AI functionalities, such as writing suggestions and personalized prompts, are implemented within the aiService.ts module. This simulates real-time AI analysis of user content to offer grammar, style, structure, and creativity suggestions, as well as generating prompts based on inferred writing style and themes.

Key Features Implemented:

User Authentication: Secure sign-up and sign-in. Dashboard: Overview of writing streaks, daily/weekly word count goals, and progress tracking. Project Management: Organize writing into projects, with nested chapters, notes, and version history (snapshots). Writing Editor: A focused writing environment with word count, time tracking, and typewriter sound effects. AI Assistant: Real-time writing suggestions (grammar, style, creativity) directly within the editor. Writing Prompts: A library of general prompts and AI-generated personalized prompts based on user writing analysis. Analytics: Visualizations of writing patterns and progress over time using Recharts. Subscription Management: A freemium model with Stripe integration for upgrading to Pro features. Lessons in Ink: What I Learned This project was an incredible learning experience, pushing my boundaries in several areas:

Deep Dive into Supabase: I gained extensive experience with Supabase's ecosystem, from designing complex database schemas with relationships (e.g., projects, project_chapters, writing_sessions, writing_snapshots) to implementing robust Row Level Security (RLS) policies for data privacy. Advanced React State Management: Managing intricate application state across numerous components, including user authentication, theme preferences, subscription status, and dynamic project data, solidified my understanding of React Context and hooks. Stripe Integration: Implementing a secure payment flow with Stripe, including handling checkout sessions and webhooks for subscription lifecycle management, was a significant challenge and a valuable skill acquired.

Simulating AI Logic: Designing and implementing the client-side AI logic within aiService.ts to provide intelligent suggestions and personalized prompts, even without a direct LLM API integration, taught me how to structure and think about AI-driven features. UI/UX Design Principles: Focusing on a clean, distraction-free writing experience and intuitive navigation reinforced the importance of thoughtful UI/UX design. Navigating the Blank Page: Challenges Faced Building Writer's Rhythm came with its share of challenges:

Complex Database Relationships: Designing and managing the interconnectedness of projects, chapters, writing sessions, and snapshots required careful planning to ensure data integrity and efficient querying. Real-time AI Simulation: Crafting a convincing AI assistant that provides relevant suggestions based on text content and cursor position, all simulated client-side, was tricky. Balancing responsiveness with meaningful suggestions was key. Subscription Logic: Integrating Stripe and handling the various states of a user's subscription (active, inactive, expired) and feature gating required meticulous attention to detail in both the frontend and Supabase Edge Functions. Performance Optimization: Ensuring the application remained fast and responsive, especially when fetching and processing large amounts of writing session data for analytics, required optimizing database queries and component rendering.

Built With

Share this project:

Updates