This project is the start of the implementation of a spelling and grammar checker component using ReactJS and Ollama as the API. The project aims to mimic the web service functionality that Grammarly provides.
This project is structured into different folders where each folder has a specific purpose:
src/component/
: This folder contains theControlledEditableDiv.tsx
which is a primary component for the grammar and spell check.src/services/
: This folder containsGrammarAndSpellingCheck.tsx
, a service file where the spell and grammar check logic is implemented using Ollama APIs.src/view/
: This folder holds theProject.tsx
file, a UI representation of the project.src/
: This folder containsmain.tsx
andApp.tsx
, the entry point of the application and the main App component respectively.
In order to run this project locally, you need to have Node.js installed along with npm (Node Package Manager).
Once those are set up, you can clone this repository using the following command in your Terminal:
git clone <repository_link>
cd <project_directory>
npm install
npm run dev
Contributions are welcome. Please feel free to fork, clone, and submit your pull requests.
- EditableDiv:
- Handles rendering and user input.
- Manages focus, keydown, and paste events.
- ControlledEditableDiv:
- Wraps EditableDiv and sanitizes input before passing it to onChange.
- Input:
- Integrates with React Hook Form using useController.
- Updates EditableDiv content based on updatedContent.
- Project:
- Manages form state and handles submission.
- Handles API call for spelling check and updates form fields accordingly.
This project is licensed under the MIT license.