Write smart. Write fast. Go global.
A comprehensive AI-powered writing platform designed for collaborative storytelling with advanced editing features, multi-language adaptation, and role-based access control.
- Content Review: Intelligent analysis and feedback on your writing
- Writing Enhancement: AI suggestions for tone consistency, character development, and plot progression
- Story Explorer: Complete overview of characters, arcs, locations, and story elements
- AI Copilot: Real-time writing assistance to overcome writer's block
- Metadata Sync: Automatic story detail updates for better AI assistance
- 10+ Language Adaptation: Seamlessly adapt stories to different languages
- Localization Features: Perfect local adaptations (e.g., "Ram" in India becomes "StepanΓ©" in France)
- Language Version Management: Switch between different language versions effortlessly
- Google Sheets Integration: Sync localization data for streamlined translation workflows
- Real-time Collaboration: Build your dream team of writers, editors, and friends
- Role-Based Access Control (RBAC):
- Admin: Full project management capabilities
- Lead: Advanced editing and team management
- Writer: Content creation and editing
- Reader: View-only access
- Project Management: Comprehensive member and permission management
- Comments & Notes: Collaborative feedback and annotation system
- Dual View Mode: Toggle between writing and preview modes
- Rich Text Editing: Powered by Plate.js with extensive formatting options
- Version Control: Track changes and manage different episode versions
- Auto-save: Never lose your work with automatic saving
- Drag & Drop: Intuitive content organization
- Episode Organization: Structured approach to story episodes and chapters
- Status Tracking: Monitor progress across different stages
- Series Showcase: Display successful stories with play counts
- Import/Export: Flexible content management options
- Analytics Dashboard: Track writing productivity and team performance
- Next.js 15 - React framework with App Router
- React 18 - Modern React with concurrent features
- Plate.js 49.1.5 - Rich text editor framework
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first CSS framework
- Framer Motion - Smooth animations and transitions
- Radix UI - Accessible component primitives
- Zustand - Lightweight state management
- TanStack Query - Server state management
- IndexedDB - Client-side data persistence
- Next Auth - Authentication system
- Socket.io - Real-time communication
- RESTful APIs - Backend service integration
- ESLint & Prettier - Code formatting and linting
- Husky - Git hooks for code quality
- Commitlint - Conventional commit messages
- TypeScript - Static type checking
src/
βββ app/ # Next.js App Router pages
β βββ admin/ # Admin panel routes
β βββ auth/ # Authentication pages
β βββ projects/ # Project management
β βββ api/ # API routes
βββ components/ # Reusable UI components
β βββ ui/ # Base UI components
β βββ plate-ui/ # Editor-specific components
β βββ aural-ui/ # Custom design system
βββ page-builders/ # Page-specific components
β βββ landing/ # Landing page sections
β βββ episodes/ # Episode management
β βββ admin/ # Admin functionality
β βββ plate-editor/ # Rich text editor
βββ hooks/ # Custom React hooks
βββ lib/ # Utility functions
βββ store/ # State management
βββ types/ # TypeScript definitions
βββ constants/ # Application constants
βββ providers/ # Context providers
- Node.js 22+
- pnpm
-
Clone the repository
git clone <repository-url> cd co-writing
-
Install dependencies
pnpm install
-
Set up environment variables
cp .env.example .env.local # Configure your environment variables -
Run the development server
pnpm dev
-
Open your browser Navigate to http://localhost:3000
pnpm dev # Start development server
pnpm build # Build for production
pnpm start # Start production server
pnpm lint # Run ESLint
pnpm lint:fix # Fix ESLint issues
pnpm format # Check Prettier formatting
pnpm format:fix # Fix Prettier formatting
pnpm commit # Interactive commit with commitizenCreate a .env file in the root directory with the following variables:
# Google OAuth Configuration
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
# NextAuth Configuration
NEXTAUTH_URL=http://localhost:3000/
NEXTAUTH_SECRET=your-nextauth-secret
# Application URLs
NEXT_PUBLIC_BASE_URL=http://localhost:3000/
# Backend API Configuration
NEXT_PUBLIC_BACKEND_URL=https://copilot-prod.pocketfm.com
NEXT_PUBLIC_SOCKET_URL=https://copilot-socket.pocketfm.com
NEXT_PUBLIC_PROMOS_BACKEND_URL=https://pocketfm-copilot-promo-api.pocketfm.com
# API Keys
NEXT_PUBLIC_BACKEND_API_KEY=your-backend-api-key
NEXT_PUBLIC_LASERTOOLS_API_KEY=your-lasertools-api-key
ELEVENLABS_API_KEY=your-elevenlabs-api-key
# Development Tools
REACT_EDITOR=atom
# Optional: Sentry Configuration (for error tracking)
# NEXT_PUBLIC_SENTRY_DSN_URL=your-sentry-dsn-url
# SENTRY_AUTH_TOKEN=your-sentry-auth-token
β οΈ Important: Never commit your actual.envfile to version control. Create a.env.examplefile with placeholder values for team members.
The platform supports multiple backend environments:
- Production:
copilot-prod.pocketfm.com- Main production environment - Socket Server:
copilot-socket.pocketfm.com- Real-time communication - Promo API:
pocketfm-copilot-promo-api.pocketfm.com- Promotional content management - Development: Cloudflare tunnels for local development
- Google OAuth: User authentication and authorization
- Google Sheets: Localization data synchronization
- Google Drive: File storage and management
- ElevenLabs: AI voice generation for audio content
- Sentry: Error tracking and monitoring (optional)
- Themes: Customize themes in
src/styles/globals.css - Constants: Modify application constants in
src/constants/ - Components: Extend UI components in
src/components/
The platform includes a sophisticated AI chatbot that provides:
- Real-time writing suggestions
- Character development advice
- Plot consistency checks
- Dialogue enhancement
- Scene structure recommendations
- Create your story in the original language
- Use AI-powered translation suggestions
- Localize content for specific regions
- Manage multiple language versions
- Sync changes across all versions
- Multiple users can edit simultaneously
- Track individual contributions
- Comment and suggestion system
- Version history and conflict resolution
- Role-based permissions
The platform implements comprehensive RBAC:
- Project-level permissions
- Language-specific access control
- Feature-based restrictions
- Secure authentication
- Data protection
The platform has been used to create successful series with millions of plays:
- "My Vampire System" - 9.1M plays
- "Saving Nora" - 7.7M plays
- "The Billionaire's Accidental Bride" - 8.1M plays
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project follows Conventional Commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation updatesstyle:- Code style changesrefactor:- Code refactoringtest:- Test additions/updateschore:- Maintenance tasks
This project is proprietary software. All rights reserved.
For support and questions:
- Create an issue in this repository
- Contact the development team
- Check the documentation
Built with β€οΈ for writers who want to create amazing stories