Skip to content

SeanOnamade/wordwise

Repository files navigation

WordWise - AI-Powered Writing Assistant

Screenshot 2025-07-28 214057

🎯 Empowering ESL Students & Writers with Intelligent, Educational Feedback

WordWise is a sophisticated web-based writing assistant designed specifically for ESL graduate students, professionals, and content creators. Unlike traditional grammar checkers, WordWise provides educational feedback that helps users learn and improve their writing skills over time.

✨ Key Features

πŸš€ Real-Time Writing Assistance

  • Enterprise-Grade Grammar Checking: Powered by LanguageTool with 90%+ accuracy
  • Visual Highlighting: Color-coded suggestions (red=grammar, orange=style, blue=spelling)
  • Educational Explanations: Learn why changes are suggested, not just what to fix
  • Smart Suggestions: Accept/Reject controls with keyboard shortcuts (Ctrl+. / Ctrl+,)
  • Personalized Learning: AI adapts to your writing patterns and preferences

🧠 AI-Powered Smart Review ✨

Click the ✨ Sparkles button to receive advanced writing analysis powered by OpenAI GPT-4o:

  • Three Core Metrics (0-100 scale):

    • Clarity: How easily your ideas flow and connect
    • Academic Tone: Formality and discipline-appropriate language
    • Sentence Complexity: Variety and sophistication of sentence structures
  • Advanced Issue Detection: AI identifies problems missed by traditional grammar checkers:

    • Awkward phrasing and unclear expressions
    • Misuse of discourse markers and transitions
    • Vague pronoun references and unclear subjects
    • Academic writing convention violations
  • Actionable Suggestions: Up to 5 prioritized recommendations for immediate improvement

πŸ“ Professional Document Management

  • Rich Text Editor: TipTap-based editor with intuitive formatting controls
  • Auto-Save: Documents save automatically with real-time synchronization
  • Cross-Device Access: Work seamlessly across desktop, tablet, and mobile
  • Export Options: Professional PDF and DOCX export with formatting preservation
  • Universal Compatibility: Copy clean HTML directly to Google Docs, Word, Notion

β™Ώ Accessibility & Inclusion

  • WCAG 2.1 AA Compliant: Full keyboard navigation and screen reader support
  • 20+ Keyboard Shortcuts: Power user efficiency with comprehensive shortcuts
  • High Contrast Themes: Optimized for users with visual impairments
  • Educational Focus: Designed for diverse learning needs and abilities

Architecture

WordWise Architecture

WordWise uses a modern, scalable architecture with Next.js frontend, LanguageTool for grammar checking, and Firebase for authentication and data storage.

Prerequisites

  • Node.js 18 or higher
  • Firebase account
  • Git

πŸš€ Quick Start

Option 1: Try the Live Demo

Visit wordwise.vercel.app to start writing immediately - no setup required!

Option 2: Local Development

  1. Clone and Install:

    git clone https://github.com/yourusername/wordwise.git
    cd wordwise
    npm install
  2. Configure Environment: Create .env.local with your configuration:

    # Firebase Client Configuration
    NEXT_PUBLIC_FIREBASE_API_KEY=your-api-key
    NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
    NEXT_PUBLIC_FIREBASE_PROJECT_ID=your-project-id
    NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your-project.appspot.com
    NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=123456789
    NEXT_PUBLIC_FIREBASE_APP_ID=1:123456789:web:abcdef123456
    
    # Firebase Admin (for server-side operations)
    FIREBASE_ADMIN_PROJECT_ID=your-project-id
    FIREBASE_ADMIN_CLIENT_EMAIL=firebase-adminsdk-xxxxx@your-project.iam.gserviceaccount.com
    FIREBASE_ADMIN_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
    
    # OpenAI API for Smart Review (required for AI features)
    OPENAI_API_KEY=your-openai-api-key
    
    # Optional: Custom LanguageTool endpoint
    NEXT_PUBLIC_LT_ENDPOINT=https://api.languagetool.org/v2/check
  3. Set Up Firebase:

    • Create a Firebase project at https://console.firebase.google.com
    • Enable Authentication (Email/Password and Email Link sign-in)
    • Enable Firestore Database with security rules
    • Generate service account key for admin operations
  4. Launch the App:

    npm run dev

    Visit http://localhost:3000 to start writing!

Environment Setup Guide

For detailed setup instructions, see our Comprehensive Documentation

User Personas

WordWise is designed for three primary user types:

πŸ“š Sarah Chen - ESL Graduate Student

  • PhD candidate writing research papers and grant proposals
  • Needs explanations for grammar corrections to improve learning
  • Requires academic writing style guidance

πŸ’Ό Ben Rodriguez - Project Manager

  • Manages international teams, writes business communications
  • Needs quick, professional corrections for emails and proposals
  • Values mobile-friendly interface for on-the-go editing

✍️ Maya Patel - Content Creator with Dyslexia

  • Creates educational content and blog posts
  • Needs accessible tools with visual highlighting
  • Requires keyboard navigation and screen reader support

Keyboard Shortcuts

WordWise supports extensive keyboard shortcuts for power users:

Suggestion Navigation

  • Ctrl/Cmd + . - Navigate to next suggestion
  • Ctrl/Cmd + , - Navigate to previous suggestion
  • A - Accept suggestion (when focused)
  • X - Dismiss suggestion (when focused)

Text Formatting

  • Ctrl/Cmd + B - Bold
  • Ctrl/Cmd + I - Italic
  • Ctrl/Cmd + U - Underline
  • Ctrl/Cmd + Shift + X - Strikethrough
  • Ctrl/Cmd + Shift + H - Highlight

Document Structure

  • Ctrl/Cmd + Alt + 1/2/3 - Heading levels
  • Ctrl/Cmd + Shift + 8 - Bullet list
  • Ctrl/Cmd + Shift + 7 - Numbered list

Alignment

  • Ctrl/Cmd + Shift + L - Align left
  • Ctrl/Cmd + Shift + E - Center align
  • Ctrl/Cmd + Shift + R - Align right
  • Ctrl/Cmd + Shift + J - Justify

Success Criteria

WordWise meets the following quality benchmarks:

  • Suggestion Accuracy: β‰₯90% of LanguageTool suggestions are contextually appropriate
  • Response Time: < 2000ms for grammar checking requests
  • Document Capacity: Supports up to 5,000 words without performance degradation
  • Accessibility: WCAG 2.1 AA compliance with screen reader support
  • Uptime: 99.9% availability on Vercel infrastructure

Stretch Goals

  • Multilingual Support: Spanish language toggle for broader accessibility
  • Collaborative Editing: Real-time multi-user document editing
  • Advanced AI Integration: GPT-4 powered style suggestions for academic and business writing

Testing & Quality Assurance

Manual Testing Checklist

βœ… Performance Tests

  • Paste 5,000-word text – editor remains responsive (no freeze)
  • /api/generate response time < 2000ms (check Network tab)
  • Keyboard shortcuts respond within 100ms

βœ… Grammar & Suggestions

  • Text highlights appear as colored underlines
  • Accept button removes highlight instantly
  • Dismiss button hides suggestion permanently
  • Ctrl+. and Ctrl+, navigate between suggestions

βœ… Data Persistence

  • Refresh page – document reloads from Firestore
  • Autosave indicator shows "Saving..." then "Last saved"
  • Cross-device sync works within 5 seconds

βœ… Export & Integration

  • Export PDF downloads and opens correctly
  • Share to Google Docs copies clean HTML
  • Exported documents maintain formatting

βœ… Accessibility

  • Tab navigation reaches all interactive elements
  • Screen readers announce button purposes
  • Keyboard shortcuts work without mouse

Project Structure

src/
β”œβ”€β”€ app/                 # Next.js 13 app router pages
β”œβ”€β”€ components/          # React components
β”œβ”€β”€ lib/                 # Utility functions and Firebase config
β”œβ”€β”€ store/              # Zustand store
└── types/              # TypeScript type definitions

πŸ”— API Routes

Route Method Purpose Response Time
/api/saveDoc POST Save document to Firestore < 200ms
/api/generate POST Get grammar suggestions from LanguageTool < 2000ms
/api/smart-review POST AI-powered writing analysis with OpenAI GPT-4o < 20000ms
/api/decision POST Record user decisions for personalization < 200ms
/api/export GET Export to PDF/DOCX formats < 5000ms
/api/lt-self-test GET LanguageTool health check < 1000ms

πŸ“š Documentation

Development Scripts

# Development
npm run dev          # Start dev server
npm run build        # Build for production (includes diagram generation)
npm run start        # Start production server

# Quality Assurance  
npm run lint         # ESLint code checking
npm run typecheck    # TypeScript type checking
npm run test         # Run Jest test suite
npm run test:watch   # Watch mode for tests

# Utilities
npm run diagram      # Generate architecture diagram

Deployment

Vercel (Recommended)

  1. Connect Repository:

    npm install -g vercel
    vercel --prod
  2. Environment Variables: Add all Firebase config variables in Vercel Dashboard β†’ Settings β†’ Environment Variables

  3. Custom Domain (Optional):

    • Add domain in Vercel Dashboard
    • Update Firebase Auth authorized domains

Docker Deployment

# Build and run with Docker
docker build -t wordwise .
docker run -p 3000:3000 wordwise

Firebase Hosting

npm run build
firebase deploy --only hosting

🌟 Why WordWise? Why Now?

The convergence of several technological and social trends makes this the perfect time for WordWise:

🌍 Global Remote Work: 1.5+ billion people now work remotely, requiring clear written communication across languages and cultures

πŸ€– AI Democratization: Large language models have made sophisticated writing assistance accessible to individual developers, not just big tech companies

πŸ“± Web-First Tools: Browser-based applications now rival desktop software in performance while offering better collaboration and accessibility

πŸŽ“ ESL Education Boom: Online education growth has created demand for personalized, AI-powered learning tools that adapt to individual needs

β™Ώ Accessibility Awareness: Growing recognition of the need for inclusive design in software tools

πŸ’° Cost Pressures: Students and professionals seek affordable alternatives to expensive premium tools

🎯 Project Status

βœ… PRODUCTION READY - All 6 core user stories fully implemented and tested

  • Smart Review AI feature powered by OpenAI GPT-4o
  • Complete accessibility implementation (WCAG 2.1 AA)
  • Professional export capabilities (PDF/DOCX)
  • Real-time collaboration and sync
  • Comprehensive documentation and testing

Contributing

We welcome contributions! Please see our contribution guidelines for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Run tests: npm run test && npm run lint && npm run typecheck
  4. Commit your changes (git commit -m 'Add some amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with ❀️ for writers worldwide | Live Demo | Documentation | Report Issues

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors