A Next.js web application that uses LLM (Grok-4-Fast) to automatically correct spelling errors, grammar mistakes, typos, and restore missing words in text.
Deployed on AI Builder: https://auto-corrector.ai-builders.space/
- Smart Text Correction: Corrects spelling, grammar, and typing errors
- Missing Word Restoration: Restores accidentally omitted words
- Example Sentences: Quick-start examples for different error types
- Detailed Explanations: Shows rationale for each correction
- Modern UI: Clean, responsive design built with Tailwind CSS
- Node.js 18+
- npm or yarn
- AI Builders API token
- Clone the repository:
git clone https://github.com/grapeot/auto-corrector.git
cd auto-corrector- Install dependencies:
npm install- Set up environment variables:
cp .env.local.example .env.localEdit .env.local and add your AI Builders API token:
AI_BUILDER_TOKEN=your_token_here
AI_BUILDERS_API_URL=https://space.ai-builders.com/backend/v1/chat/completions
- Run the development server:
npm run dev- Open http://localhost:3000 in your browser.
- Next.js 15: React framework with App Router
- TypeScript: Type-safe development
- Tailwind CSS: Utility-first CSS framework
- Grok-4-Fast: LLM model via AI Builders API
The app uses the V4 auto-corrector prompt which:
- Identifies missing words that were originally present
- Restores ONLY missing words (doesn't add new content)
- Corrects spelling, grammar, and typing errors
- Provides detailed rationale for each correction
The app is deployed on AI Builder platform:
- URL: https://auto-corrector.ai-builders.space/
- Status: Live
- Deployment: Automated via GitHub
The app can be deployed to any platform that supports Docker or Next.js:
- Vercel: Import GitHub repo, add environment variables, deploy
- Railway:
railway upwith environment variables - Render: Connect GitHub repo, use Dockerfile
- Fly.io:
fly launchandfly deploy
See the Dockerfile for containerized deployment.
auto-corrector/
├── app/
│ ├── api/correct/route.ts # API endpoint
│ ├── page.tsx # Main UI
│ └── layout.tsx # App layout
├── Dockerfile # Production Docker image
├── docker-compose.yml # Local development
├── next.config.ts # Next.js configuration
└── package.json # Dependencies
AI_BUILDER_TOKEN: Your AI Builders API token (required)AI_BUILDERS_API_URL: API endpoint (optional, defaults to production URL)
MIT
Contributions are welcome! Please feel free to submit a Pull Request.