Skip to content

Latest commit

 

History

History

README.md

WeWrite Documentation

Quick Start

bun install && bun dev

Tech Stack: Next.js 15, TypeScript, TanStack Query v5, Firebase, Tailwind CSS


Code Documentation

These READMEs live alongside the code they document:

README Contents
/README.md Project overview, setup, tech stack
/app/README.md App directory structure, routes, key files
/app/api/README.md 88 API endpoints by category
/app/services/README.md 70 business logic services

Documentation by Category

Core Architecture

Doc Description
CURRENT_ARCHITECTURE System overview
ENVIRONMENT_QUICK_REFERENCE Dev/preview/prod behavior
PAGE_DATA_AND_VERSIONS Page data structures
USER_DATA_FETCHING_PATTERNS Data fetching patterns

Authentication & Sessions

Doc Description
FIREBASE_REST_API_ARCHITECTURE Start here for auth - Hybrid REST/Admin
AUTHENTICATION_ARCHITECTURE Environment-specific auth
SESSION_MANAGEMENT_ARCHITECTURE Session handling

Payments & Allocations

Doc Description
PAYMENTS_AND_ALLOCATIONS Main payments doc - subscriptions, allocations, payouts
ALLOCATION_SYSTEM Allocation architecture
ALLOCATION_API_REFERENCE API reference
PAYOUT_TROUBLESHOOTING_GUIDE Common issues

Search System

Doc Description
SEARCH_SYSTEM Search architecture
SEARCH_PERFORMANCE_OPTIMIZATIONS Performance tuning
SEARCH_ALGORITHM_CHANGELOG Algorithm changes

UI & Design

Doc Description
HEADER_SYSTEM Header components
BANNER_SYSTEM_GUIDE Notification banners
DESIGN_SYSTEM_ARCHITECTURE Cards, overlays, glassmorphism
THEME_SYSTEM_ARCHITECTURE Theming
COMPLETE_COLOR_SYSTEM Color tokens

Editor

Doc Description
TEXT_SELECTION_AND_ATTRIBUTION Selection & attribution
LINK_SUGGESTION_SYSTEM Link suggestions
DIFF_SYSTEM Diffing system

Features

Doc Description
NOTIFICATION_SYSTEM Notification types
EMAIL_SYSTEM_IMPLEMENTATION Email templates
LEADERBOARD_SYSTEM Leaderboard
RECENT_EDITS_SYSTEM Recent activity

Firebase

Doc Description
FIREBASE_OPTIMIZATION_GUIDE Performance/cost
COLLECTION_NAMING_STANDARDS Data layout

Performance & Logging

Doc Description
PERFORMANCE_OPTIMIZATION_GUIDE Performance
LOGGING_NOISE_REDUCTION Log management
IMMEDIATE_UPDATES Save timing

Deployment

Doc Description
VERCEL_DEPLOYMENT Deployment
CRON_JOB_SETUP Scheduled jobs
STRIPE_WEBHOOK_SETUP Webhooks

Security

Doc Description
USERNAME_SECURITY_GUIDELINES Identity security

Maintenance

Doc Description
DEPENDENCY_MANAGEMENT_STANDARDS Dependencies
LEGACY_CODE_CLEANUP_GUIDE Cleanup patterns
RECENT_CHANGES_SUMMARY Recent changes

Plans & Roadmaps

Doc Description
CSS_REFACTORING CSS system consolidation plan
PRIVATE_PAGES Private pages for subscribers
GROUPS Group collaboration spaces
MULTI_CURRENCY Multi-currency & cryptocurrency support

Legal

Doc Description
Privacy Policy Privacy
Terms of Service Terms

Folder Structure

docs/
├── architecture/    # System architecture
├── auth/            # Authentication & sessions
├── components/      # Component documentation
├── deployment/      # Deployment & ops
├── editor/          # Editor features
├── features/        # Feature systems
├── firebase/        # Firebase patterns
├── legal/           # Legal documents
├── maintenance/     # Code maintenance
├── payments/        # Payments & allocations
├── performance/     # Performance & logging
├── plans/           # Feature roadmaps and plans
├── search/          # Search system
├── security/        # Security
├── seo/             # SEO documentation
└── ui/              # UI & design

Development

bun dev          # Start dev server
bun build        # Production build
bun test         # Run tests
bun test:watch   # Watch mode

License

Proprietary software. All rights reserved.