{"id":25655013,"url":"https://github.com/namangupta123/gramify_server","last_synced_at":"2025-10-16T17:53:53.696Z","repository":{"id":278947836,"uuid":"937243990","full_name":"Namangupta123/Gramify_server","owner":"Namangupta123","description":"Server for Gramify.","archived":false,"fork":false,"pushed_at":"2025-02-22T17:54:30.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-22T18:34:49.139Z","etag":null,"topics":["backend-api","expressjs","framework","helper","langchain-js","mistral","node-js","nodemon","server","service"],"latest_commit_sha":null,"homepage":"https://gramify-server.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Namangupta123.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-02-22T17:15:15.000Z","updated_at":"2025-02-22T17:57:46.000Z","dependencies_parsed_at":"2025-02-22T18:34:52.516Z","dependency_job_id":"48eda272-573c-439c-a261-1fee78f3e192","html_url":"https://github.com/Namangupta123/Gramify_server","commit_stats":null,"previous_names":["namangupta123/gramify_server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namangupta123%2FGramify_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namangupta123%2FGramify_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namangupta123%2FGramify_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namangupta123%2FGramify_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Namangupta123","download_url":"https://codeload.github.com/Namangupta123/Gramify_server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240379428,"owners_count":19792131,"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","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":["backend-api","expressjs","framework","helper","langchain-js","mistral","node-js","nodemon","server","service"],"created_at":"2025-02-23T21:19:00.434Z","updated_at":"2025-10-16T17:53:53.615Z","avatar_url":"https://github.com/Namangupta123.png","language":"JavaScript","readme":"## Description\nThe `server.js` file contains the backend logic for a grammar correction assistant API using the MistralAI model. It utilizes Express for handling HTTP requests and responses.\n\n### Setup\n1. Install dependencies by running `npm install`.\n2. Create a `.env` file and add your Mistral API key as `MISTRAL_API_KEY=your_api_key_here`.\n3. Start the server by running `node server.js`.\n\n### API Endpoints\n- `POST /fix-grammer`: \n  - Description: Corrects grammar mistakes in the provided text.\n  - Request Body: \n    ```\n    {\n        \"text\": \"Text to be corrected\"\n    }\n    ```\n  - Response:\n    ```\n    {\n        \"correctedText\": \"Corrected text\"\n    }\n    ```\n- `GET /`:\n  - Description: Returns a status message indicating the server is running.\n\n### Error Handling\n- If no text is provided in the request body for `/fix-grammer`, a `400` status with an error message will be returned.\n- If there is an internal server error, a `500` status with an error message will be returned.\n\n### Dependencies\n- Express\n- Cors\n- Dotenv\n- @langchain/mistralai\n- @langchain/core/prompts\n\n### Environment Variables\n- `MISTRAL_API_KEY`: API key for the MistralAI model.\n\n### Usage\nYou can send a POST request to `/fix-grammer` with a JSON body containing the text to be corrected.\n\n### Contributions\n\nWe welcome contributions to improve this grammar correction assistant API. Feel free to submit pull requests with enhancements, bug fixes, or new features.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamangupta123%2Fgramify_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnamangupta123%2Fgramify_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamangupta123%2Fgramify_server/lists"}