A modern web application built with Next.js that provides AI-powered text summarization and grammar correction capabilities. The application features a beautiful animated background, intuitive UI, and real-time text processing.
- Multiple summarization levels (low, medium, high)
- Real-time text processing
- Customizable summary length
- Intelligent text analysis using Hugging Face API
- Advanced grammar checking
- Instant correction suggestions
- One-click application of corrections
- Detailed grammar improvement recommendations
- Modern, responsive design
- Beautiful animated Three.js background
- Glassmorphism effects
- Dark mode optimized
- Toast notifications for user feedback
-
Frontend:
- Next.js 14
- React
- TypeScript
- Tailwind CSS
- shadcn/ui components
- Three.js for animations
- Zustand for state management
-
Backend:
- Next.js API routes
- Hugging Face API integration
- Error handling middleware
- Response structure validation
- Clone the repository:
git clone https://github.com/yourusername/ai-text-assistant.git
cd ai-text-assistant
- Install dependencies:
npm install
- Create a
.env.local
file with your API keys:
HUGGING_FACE_API_KEY=your_api_key_here
- Run the development server:
npm run dev
- Open http://localhost:3000 in your browser.
src/
├── components/ # React components
│ ├── Background/ # Animated background
│ ├── Header/ # Navigation and settings
│ ├── Summarizer/ # Text processing components
│ └── ui/ # shadcn/ui components
├── hooks/ # Custom React hooks
├── lib/ # Utility functions
├── pages/ # Next.js pages and API routes
├── store/ # Zustand state management
├── styles/ # Global styles
└── types/ # TypeScript declarations
const handleSummarize = async () => {
// Processes text input and returns a concise summary
// Supports different summary levels (low, medium, high)
}
const handleGrammarCheck = async () => {
// Analyzes text for grammar issues
// Returns corrected text with suggestions
}
- Method: POST
- Body:
{ text: string, level: "low" | "medium" | "high" }
- Response:
{ summary: string }
- Method: POST
- Body:
{ text: string }
- Response:
{ correctedText: string }
The application uses Zustand for state management, handling:
- Input text state
- Summary results
- Grammar corrections
- Loading states
- UI preferences
- Support for multiple languages
- Export summaries in different formats
- Advanced text analysis metrics
- User accounts and saved summaries
- API rate limiting and usage tracking
- Batch processing for multiple texts
- Custom summarization templates
- Add more AI models for comparison
- Implement real-time collaboration
- Add document upload support (PDF, DOCX)
- Create browser extension
- Add offline processing capabilities
- Implement advanced formatting options
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Hugging Face for providing the AI models
- shadcn/ui for the beautiful UI components
- Three.js for the 3D animations