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! π
- Current Architecture - β ESSENTIAL - Complete system overview and architecture principles
- Payment System Guide - β ESSENTIAL - Complete USD payment system documentation
- Performance Optimization Guide - β ESSENTIAL - Optimization strategies (90% cost reduction achieved)
- Design System - β ESSENTIAL - FloatingCard component system and glassmorphism guidelines
- OKLCH Color System - β ESSENTIAL - Modern OKLCH color space for better accessibility and perceptual uniformity
- Environment Quick Reference - Development environment setup
- Subscription Quick Reference - Subscription system overview
- Stripe Dashboard Quick Reference - Stripe dashboard navigation
- USERNAME_SECURITY_GUIDELINES - π CRITICAL: Prevent email exposure vulnerabilities
- PAGE_DATA_AND_VERSIONS - ποΈ AUTHORITATIVE: Page data structure and version system
- AUTHENTICATION_ARCHITECTURE - Environment-specific authentication rules
- USER_DATA_FETCHING_PATTERNS - Standardized patterns for secure user data handling
- Subscription System - Subscription management and Stripe integration
- Simplified Payout System - Current payout architecture
- Platform Fee Management System - Fee configuration and management
- USD System Overview - Overview of the USD-based system
- Allocation System - USD allocation system
- Storage Balance Guide - Storage balance functionality
- Payout System Index - Payout system documentation index
- Payout Testing Infrastructure - Comprehensive payout testing
- Payment Flow Testing Guide - Payment system testing procedures
- Payout Troubleshooting Guide - Payout system troubleshooting
- Subscription Troubleshooting - Common payment issues and solutions
- Payment Failure Tracking - Payment error tracking
- Webhook Setup Guide - Stripe webhook configuration
- Financial Data Architecture - Separated financial contexts architecture
- Content Display Architecture - Content rendering and display
- Environment Architecture - Development vs production environments
- Session Management Architecture - Session handling and device management
- Header System - Navigation header architecture
- Theme System Architecture - Theme and styling system
- Save System Reliability Architecture - Save system design
- Simplified Activity System - Activity tracking using recent pages
- Branch Aware Development - Development workflow and environment switching
- Development Auth Guide - Development authentication setup
- Production Deployment Guide - Deployment procedures and best practices
- Collection Naming Standards - Database collection naming
- Dependency Management Standards - Package management standards
- Border Styling Guidelines - UI styling standards
- DOM Element Identifiers - DOM element naming conventions
- Native App Migration Plan - PWA-to-native migration strategy and notification system architecture
- Editor Viewer Separation - Editor/viewer architecture
- Line Based Editor - Editor implementation details
- Recent Edits System - Recent edits functionality
- Search System - Search implementation and features
- Writing Suggestions System - Writing suggestion features
- Link Suggestion System - Link suggestion functionality
Note: As of August 2025, duplicate title prevention has been removed to allow for a more forgiving approach. Future implementations will include merging of detected duplicates or construction of timelines of ordered duplicates.
- Banner System Guide - β ESSENTIAL - Priority-based banner system with admin testing (email verification, PWA installation)
- Settings Navigation System - Settings page navigation
- Page Data & Versions - Authoritative page data structure and version system
- Firebase Cost Optimization Summary - Cost optimization results and strategies
- Database Schema Optimization Guide - Database optimization techniques
- Search Performance Optimizations - Search system optimization
- Navigation Caching Optimization - Navigation performance optimization
- Username Issue Analysis and Solution - Username-related issues
- Production Error Analysis - Production error patterns
- Critical Production Fixes - Critical issue resolutions
- Legacy Code Cleanup Guide - ESSENTIAL: Identifying and removing deprecated patterns
- Auth Cleanup Guide - Authentication cleanup procedures
- Archive - β REFERENCE - Completed migrations, optimization summaries, and historical documentation
- USD Migration Guide - β COMPLETED - USD system migration documentation
- Deprecated API Endpoints -
β οΈ REFERENCE - Deprecated API documentation - Deprecated Components -
β οΈ REFERENCE - Deprecated component documentation - Deprecated UI Patterns -
β οΈ REFERENCE - Deprecated UI pattern documentation
- βοΈ 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