WordWise is a sophisticated text editor designed specifically for academic and professional writing. It combines advanced grammar checking, style analysis, and writing assistance features to help users create polished, well-structured documents.
Visit the live application: WordWise Editor
- Real-time Grammar & Spell Checking: Powered by LanguageTool API
- Personalized Onboarding Experience: 6-step setup to customize writing preferences
- Style Profiles: Academic, Business, Creative, Technical, Email, and Social Media writing modes
- Smart Corrections: AI-powered grammar checking that learns from your writing patterns
- Style Suggestions & Readability Analysis: Flesch-Kincaid scoring and writing insights
- Clean, Responsive Text Editor: Built with Slate.js for rich text editing
- User Authentication: Supabase Auth with Google sign-in support
- Document Management: Create, save, edit, and delete documents
- Ignored Words: Personal dictionary for technical terms and proper nouns
- Dark/Light Theme: Toggle between themes
- Auto-save: Documents automatically saved every few seconds
- Grammarly-like Experience: Inline suggestions with hover explanations
- Writing Analytics: Track your progress and improvement over time
- React 18 with TypeScript
- Vite for fast development and building
- Redux Toolkit for state management
- Tailwind CSS for styling
- Slate.js for rich text editing
- Supabase JS for authentication and database
- Axios for API requests
- Node.js with Express and TypeScript
- Supabase JS for authentication and database
- PostgreSQL via Supabase for document storage
- LanguageTool API integration
- Rate limiting and security middleware
- Node.js 18+ installed
- Supabase project set up
- LanguageTool API access (free tier available)
- Clone the repository
git clone <repository-url>
cd WordWise- Install dependencies
npm run install:all- Set up environment variables
Frontend (.env)
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
VITE_API_BASE_URL=http://localhost:5000/api
VITE_LANGUAGETOOL_API_URL=https://api.languagetool.org/v2Backend (.env)
PORT=5000
NODE_ENV=development
FRONTEND_URL=http://localhost:3000
SUPABASE_URL=your_supabase_project_url
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
LANGUAGETOOL_API_URL=https://api.languagetool.org/v2- Start the development servers
npm run devThis will start both frontend (http://localhost:3000) and backend (http://localhost:5000) concurrently.
-
Create a Supabase project at https://supabase.com
-
Enable Authentication with Email/Password and Google providers:
- Go to Authentication > Settings
- Enable Email provider
- Enable Google provider (configure OAuth)
-
Create the documents table in your database:
-- Create documents table
create table documents (
id uuid default gen_random_uuid() primary key,
title text not null,
content text not null,
user_id uuid references auth.users(id) on delete cascade not null,
created_at timestamp with time zone default timezone('utc'::text, now()) not null,
updated_at timestamp with time zone default timezone('utc'::text, now()) not null,
word_count integer default 0,
character_count integer default 0
);
-- Enable Row Level Security (RLS)
alter table documents enable row level security;
-- Create policy for users to only access their own documents
create policy "Users can only access their own documents" on documents
for all using (auth.uid() = user_id);
-- Create index for better performance
create index documents_user_id_idx on documents(user_id);
create index documents_updated_at_idx on documents(updated_at desc);-
Configure Row Level Security (RLS) policies:
- The policies above ensure users can only access their own documents
- RLS is automatically enforced for all database operations
-
Get your API keys:
- Go to Project Settings > API
- Copy your Project URL and anon public key for the frontend
- Copy your service_role secret key for the backend
WordWise/
βββ frontend/ # React frontend
β βββ src/
β β βββ components/ # Reusable components
β β βββ pages/ # Page components
β β βββ store/ # Redux store and slices
β β βββ services/ # API services
β β βββ config/ # Configuration files
β β βββ App.tsx # Main app component
β βββ package.json
βββ backend/ # Express backend
β βββ src/
β β βββ routes/ # API routes
β β βββ middleware/ # Custom middleware
β β βββ server.ts # Main server file
β βββ package.json
βββ package.json # Root package.json
npm run dev- Start both frontend and backend in development modenpm run build- Build both frontend and backend for productionnpm run install:all- Install dependencies for all packages
npm run dev- Start Vite development servernpm run build- Build for productionnpm run preview- Preview production build
npm run dev- Start with nodemon for developmentnpm run build- Compile TypeScript to JavaScriptnpm start- Start production server
POST /api/auth/verify- Verify Supabase access tokenGET /api/auth/profile- Get user profileDELETE /api/auth/account- Delete user account
GET /api/documents- Get all user documentsGET /api/documents/:id- Get specific documentPOST /api/documents- Create new documentPUT /api/documents/:id- Update documentDELETE /api/documents/:id- Delete document
POST /api/language/check- Check grammar and spellingPOST /api/language/readability- Analyze text readability
- Built with Slate.js for rich text editing
- Real-time grammar and spell checking
- Inline suggestion highlights
- Auto-save functionality
- Grammar error detection with red underlines
- Spelling error detection with orange underlines
- Style suggestions with blue underlines
- Hover tooltips with explanations and replacements
- Supabase PostgreSQL integration
- User-specific document access with RLS
- Real-time synchronization
- Auto-save with conflict resolution
- Supabase Authentication with JWT token verification
- Row Level Security (RLS) for data isolation
- Rate limiting on API endpoints
- CORS protection
- Request validation and sanitization
- User-specific data access controls
- Build the frontend:
cd frontend && npm run build - Deploy the
distfolder - Set environment variables in your hosting platform
- Build the backend:
cd backend && npm run build - Deploy with start command:
npm start - Set environment variables in your hosting platform
- Supabase handles hosting and scaling automatically
- Enable backups in your Supabase dashboard
- Monitor usage and performance via Supabase dashboard
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- LanguageTool for grammar checking API
- Supabase for authentication and database
- Slate.js for the rich text editor
- Tailwind CSS for styling
If you have any questions or need help setting up the project, please open an issue or contact the development team.
Happy Writing with WordWise! βοΈ