A social wiki where every page you write is a fundraiser.
WeWrite transforms knowledge sharing into a collaborative economy where writers earn direct USD payments from their contributions and readers support creators with transparent monthly funding.
- π Bento - All our links in one place
- πΈ Instagram - Behind the scenes and updates
- π₯ YouTube - Tutorials and feature demos
- π¦ Twitter - Real-time updates and community
- π¬ Discord - Join our community discussions
- π Collaborative Writing - Create and edit pages together
- π° Direct USD Payments - Support creators with transparent monthly funding
- π Smart Linking - Connect ideas across the platform
- π Beautiful Interface - Clean, modern design with dark mode
- π Secure & Private - Your data is protected and encrypted
WeWrite is built with Next.js and uses modern web technologies for optimal performance.
- Node.js 18+
- pnpm (preferred package manager)
# Install pnpm if you don't have it
npm install -g pnpm
# Clone the repository
git clone https://github.com/WeWriteApp/WeWrite.git
cd WeWrite
# Install dependencies
pnpm install
# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your configuration
# Run the development server
pnpm dev
Open http://localhost:3000 to see WeWrite in action! π
π COMPLETE DOCUMENTATION INDEX - ποΈ NAVIGATION HUB: Complete guide to all WeWrite documentation
- SAVE_SYSTEM_RELIABILITY_ARCHITECTURE - π 2025: Critical save system fixes, caching overhaul, and PWA update system
- RECENT_CHANGES_SUMMARY - π 2025: Quick overview of major changes and what patterns to avoid
- EMERGENCY_COST_OPTIMIZATION_SUMMARY - π¨ CRITICAL: Firebase cost optimization and real-time listener cleanup
- USERNAME_SECURITY_GUIDELINES - π CRITICAL: Prevent email exposure vulnerabilities
- VERSION_SYSTEM - ESSENTIAL: Unified version system for page edit tracking
- AUTHENTICATION_ARCHITECTURE - Environment-specific authentication rules
- USER_DATA_FETCHING_PATTERNS - Standardized patterns for secure user data handling
WeWrite uses Stripe's Storage Balance system combined with the innovative "Use It or Lose It" model for perfect fund separation and enhanced auditability.
- Payments Balance = Platform Revenue (yours to keep)
- Storage Balance = Creator Obligations (escrowed by Stripe)
- "Use It or Lose It" = Unallocated funds become platform revenue
- β Perfect Fund Separation in Stripe dashboard
- β Stripe-Managed Auditability for regulatory compliance
- β Enhanced Creator Trust through visible escrow
- β Automated Monthly Payouts from Storage Balance
- β Maintained Innovation with "use it or lose it" engagement
- STORAGE_BALANCE_GUIDE - π CURRENT: Complete Storage Balance system guide
- STRIPE_DASHBOARD_QUICK_REFERENCE - π CURRENT: Quick reference for Stripe dashboard
- PAYOUT_SYSTEM_DOCUMENTATION - Complete payout system documentation
- USD_MIGRATION_GUIDE - USD migration guide and architecture
- SUBSCRIPTION_SYSTEM - Complete subscription architecture and implementation
- PAYMENT_FLOW_TESTING_GUIDE - Comprehensive payment testing procedures
- ENHANCED_PAYMENT_ERROR_MESSAGING - User-friendly payment error handling
- PAYMENT_FAILURE_TRACKING - Payment failure audit and tracking system
- SUBSCRIPTION_TROUBLESHOOTING - Common payment issues and solutions
- PLATFORM_FEE_MANAGEMENT_SYSTEM - Platform fee configuration and management
- EMBEDDED_BANK_ACCOUNT_MANAGEMENT - Bank account setup and management
- PAYOUT_TROUBLESHOOTING_GUIDE - Payout system troubleshooting
- WEBHOOK_SETUP_GUIDE - Stripe webhook configuration
- CONTENT_DISPLAY_ARCHITECTURE - π 2025: Unified content display system architecture
- CONTENT_DISPLAY_MIGRATION_GUIDE - π 2025: Migration guide for content display refactoring
- CONTENT_DISPLAY_REFACTORING_SUMMARY - π 2025: Complete refactoring summary and benefits
- ENVIRONMENT_ARCHITECTURE - Multi-environment setup and configuration
- ENVIRONMENT_QUICK_REFERENCE - Quick environment configuration reference
- FIREBASE_MIGRATION_ARCHITECTURE - Firebase project migration architecture
- SIMPLIFIED_ACTIVITY_SYSTEM - Activity tracking using recent pages
- SESSION_MANAGEMENT_ARCHITECTURE - Session management and authentication
- DEPENDENCY_MANAGEMENT_STANDARDS - Package management standards
- ARCHITECTURE_SIMPLIFICATION - System architecture improvements
- SETTINGS_NAVIGATION_SYSTEM - User settings navigation and organization
- SETTINGS_PAYMENT_REORGANIZATION - Payment settings UI improvements
- BORDER_STYLING_GUIDELINES - UI border styling standards
- DOM_ELEMENT_IDENTIFIERS - Standardized DOM element identification
- LINE_BASED_EDITOR - Rich text editor implementation
- LINK_CURSOR_BEHAVIOR - Link interaction and cursor behavior
- SEARCH_SYSTEM - Search functionality and implementation
- EMERGENCY_COST_OPTIMIZATION_SUMMARY - π¨ CRITICAL: Firebase cost optimization and real-time listener cleanup
- PERFORMANCE_OPTIMIZATION_SUMMARY - System performance improvements
- DATABASE_SCHEMA_OPTIMIZATION_GUIDE - Database optimization strategies
- FIREBASE_INDEX_OPTIMIZATION - Firestore index optimization
- LEGACY_CODE_CLEANUP_GUIDE - ESSENTIAL: Identifying and removing deprecated patterns
- DEPRECATED_UI_PATTERNS - π 2025: UI patterns that must be removed during cleanup
- AUTH_CLEANUP_GUIDE - Authentication system cleanup procedures
- DEVELOPMENT_AUTH_GUIDE - Development authentication setup
- PRODUCTION_DEPLOYMENT_GUIDE - Production deployment procedures
- AUTOMATED_ROUTE_TESTING - Automated testing procedures
- ADMIN_ACCOUNT_SETUP - Admin account configuration
- SUBSCRIPTION_QUICK_REFERENCE - Quick reference for subscription system
- βοΈ Next.js 14 - React framework with App Router
- π₯ Firebase - Backend-as-a-Service platform
- π¨ Tailwind CSS - Utility-first CSS framework
- π Slate.js - Customizable rich text editor framework
- π³ Stripe - Payment processing and subscriptions
- ποΈ Firestore - NoSQL document database for pages, users, and versions
- π Authentication - Email/password authentication with session management
- βοΈ Functions - Serverless functions for webhooks and background processing
- π Storage - File storage for images and attachments
- π¦ pnpm - Fast, disk space efficient package manager
- π Vercel - Deployment platform with automatic CI/CD
- π LogRocket - Session replay and error tracking
- π TypeScript - Type-safe JavaScript development
- π Dark Mode - System-aware theme switching
- π± Responsive Design - Mobile-first responsive interface
- π Smart Linking - Automatic page linking and backlinks
- π° USD Creator Support - Direct USD payments to creators with transparent monthly funding
- π Security - Comprehensive security measures and data protection
WeWrite/
βββ app/ # Next.js App Router
β βββ api/ # API routes and endpoints
β βββ auth/ # Authentication pages
β βββ components/ # Reusable UI components
β βββ contexts/ # React contexts for global state
β βββ hooks/ # Custom React hooks
β βββ lib/ # Utility libraries and helpers
β βββ providers/ # Context providers
β βββ settings/ # User settings pages
β βββ utils/ # Utility functions
βββ docs/ # Technical documentation
βββ public/ # Static assets
βββ functions/ # Firebase Cloud Functions
app/
- Next.js 14 App Router with file-based routingapp/components/
- Reusable UI components organized by featureapp/api/
- API routes for backend functionalitydocs/
- Comprehensive technical documentationfunctions/
- Firebase Cloud Functions for webhooks and background tasks
WeWrite uses Vercel for automatic deployment:
- Production: Deploys from
main
branch to wewrite.app - Preview: Deploys from
dev
branch for testing - Environment Variables: Configured in Vercel dashboard
WeWrite uses branch-aware environment detection for local development:
- Main branch (
main
): Uses production collections - connects to real data - Dev branch (
dev
): Uses dev collections (DEV_*
prefix) - isolated test data - Other branches: Uses dev collections (safe default) - isolated test data
This ensures you can test against production data when needed (main branch) while keeping development work safely isolated (dev branch).
# Build for production
pnpm build
# Deploy to Vercel
pnpm deploy
For detailed deployment procedures, see PRODUCTION_DEPLOYMENT_GUIDE.
We welcome contributions! Please see our contributing guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Follow our coding standards (see documentation)
- Write tests for new functionality
- Submit a pull request
- Security First: Follow USERNAME_SECURITY_GUIDELINES
- Clean Code: Use LEGACY_CODE_CLEANUP_GUIDE
- Testing: Write comprehensive tests for all features
- Documentation: Update docs for any new features or changes
This project is licensed under the MIT License - see the LICENSE file for details.
- π§ Email: support@wewrite.app
- π¬ Discord: Join our community
- π Issues: GitHub Issues
- π Documentation: docs/ directory
Made with β€οΈ by the WeWrite team