{"id":16112374,"url":"https://github.com/eddie4k-code/real-time_event_driven_grammar_checker","last_synced_at":"2026-04-10T02:42:27.760Z","repository":{"id":202836188,"uuid":"707889558","full_name":"Eddie4k-code/real-time_event_driven_grammar_checker","owner":"Eddie4k-code","description":"A PoC demonstrating how kafka and socket.io can be used to create a real-time grammar-checker with event driven architecture.","archived":false,"fork":false,"pushed_at":"2024-04-19T21:07:26.000Z","size":1071,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T06:44:50.124Z","etag":null,"topics":["docker","docker-compose","fastapi","kafka","microservice","microservices","microservices-architecture","python","react","real-time","socket-io","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Eddie4k-code.png","metadata":{"files":{"readme":"ReadME.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-20T22:45:14.000Z","updated_at":"2024-08-10T06:22:00.000Z","dependencies_parsed_at":"2024-10-09T20:09:48.805Z","dependency_job_id":"25989c55-9e57-4cd3-a759-20283b42a0e3","html_url":"https://github.com/Eddie4k-code/real-time_event_driven_grammar_checker","commit_stats":null,"previous_names":["eddie4k-code/grammar_checker_microservice_kafka","eddie4k-code/real-time_event_driven_grammar_checker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Eddie4k-code/real-time_event_driven_grammar_checker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eddie4k-code%2Freal-time_event_driven_grammar_checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eddie4k-code%2Freal-time_event_driven_grammar_checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eddie4k-code%2Freal-time_event_driven_grammar_checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eddie4k-code%2Freal-time_event_driven_grammar_checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Eddie4k-code","download_url":"https://codeload.github.com/Eddie4k-code/real-time_event_driven_grammar_checker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eddie4k-code%2Freal-time_event_driven_grammar_checker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266561432,"owners_count":23948632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","fastapi","kafka","microservice","microservices","microservices-architecture","python","react","real-time","socket-io","typescript"],"created_at":"2024-10-09T20:07:23.566Z","updated_at":"2026-04-10T02:42:27.719Z","avatar_url":"https://github.com/Eddie4k-code.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kafka Microservice Proof of Concept for Grammar Checker\n\n## Overview\n\nThis project is a proof of concept (PoC) demonstrating how Kafka, along with other technologies, can be used to implement a real-time grammar checker as a microservice architecture. The architecture includes a React and TypeScript frontend, a UserInput service, and a Grammar Checker service, all interconnected through Kafka for efficient and scalable message processing.\n\n### Project Components\n\n- **Frontend (React and TypeScript)**: A React and TypeScript application that serves as the user interface. It allows users to input text they want to check for grammar errors.\n\n- **UserInput Service (FastAPI and Python)**: This service receives user input, sends it to a Kafka topic called 'upload-text,' and communicates with the frontend through Socket.IO to provide status updates.\n\n- **GrammarChecker Service (TypeScript)**: Consumes messages from the 'upload-text' Kafka topic, checks the grammar, and publishes the results to a Kafka topic called 'grammar-checked.' The UserInput service subscribes to this topic and sends the results to the frontend via Socket.IO for user feedback.\n\n### Technology Stack\n\n- **React**: Used for the frontend to create a responsive and interactive user interface.\n\n- **Kafka**: A distributed event streaming platform that facilitates message processing between services in real-time.\n\n- **Socket.IO**: Enables bidirectional communication between the frontend and the UserInput service for status updates and results.\n\n- **Docker**: The Kafka cluster is set up using Docker Compose.\n\n## Get Started\n\nThe architecture of this PoC project can be summarized in the following steps:\n\n1. **Kafka Cluster Setup**:\n   - Navigate to the 'kafka_cluster' directory.\n   - Run the following commands to start the Kafka cluster:\n     ```bash\n     cd kafka_cluster\n     docker-compose up --build\n     ```\n   - The Kafka broker will be accessible at `localhost:9092`.\n   - The Kafka Dashboard will be accessible at `localhost:3030`\n\n2. **UserInput Service**:\n   - Navigate to the 'UserInputService' directory.\n   - Install Packages\n     ``` bash\n     pip install -r requirements.txt\n     ```\n   - Start the UserInput service using the following command:\n     ```bash\n     python main.py\n     ```\n\n3. **Grammar Checker Service**:\n   - Navigate to the 'GrammarChecker' directory.\n   - Install Packages\n     ``` bash\n     npm install\n     ```\n   - The Grammar Checker service uses a Grammar API from RapidAPI located at this [link](https://rapidapi.com/grammarbot/api/grammarbot).\n   - Create a .env and set your api key as the value for API_SECRET\n   - Start the Grammar Checker service using the following command:\n     ```bash\n     npm start\n     ```\n\n4. **Frontend**\n   - Navigate to the 'frontend' directory\n   - Install Packages\n     ``` bash\n     npm install\n     ```\n   - Start the frontend service using the following command:\n     ``` bash\n     npm start\n     ```\n\n## Application Flow\n   - Access the React-based frontend to input text for grammar checking at `localhost:3000`.\n   - The UserInput service sends the user's input to the 'upload-text' Kafka topic.\n   - The UserInput service then uses socket.IO to send a live status to the frontend.\n   - The Grammar Checker service consumes the 'upload-text' topic, checks grammar, and publishes the results to the 'grammar-checked' Kafka topic.\n   - The UserInput service consumes the 'grammar-checked' topic and relays the results back to the frontend via Socket.IO.\n\n## Architecture and Diagaram\n![Alt text](grammar-checker-arch.png)\n\n## Conclusion\n\nThis project demonstrates event driven architecture for a grammar checker, emphasizing real-time communication using Kafka and Socket.IO. It showcases the seamless flow of data from user input to grammar checking and back to the user in a distributed and scalable manner.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddie4k-code%2Freal-time_event_driven_grammar_checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feddie4k-code%2Freal-time_event_driven_grammar_checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddie4k-code%2Freal-time_event_driven_grammar_checker/lists"}