{"id":34847579,"url":"https://github.com/novaardiansyah/ocr-server","last_synced_at":"2026-04-24T17:34:20.487Z","repository":{"id":329321320,"uuid":"1119102831","full_name":"novaardiansyah/ocr-server","owner":"novaardiansyah","description":"Tesseract OCR Server","archived":false,"fork":false,"pushed_at":"2025-12-29T07:03:23.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-01T04:29:04.007Z","etag":null,"topics":["express-js","tesseract-ocr","ubuntu"],"latest_commit_sha":null,"homepage":"https://ocr-server.novadev.my.id","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/novaardiansyah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-18T18:43:08.000Z","updated_at":"2025-12-29T07:03:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/novaardiansyah/ocr-server","commit_stats":null,"previous_names":["novaardiansyah/ocr-server"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/novaardiansyah/ocr-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novaardiansyah%2Focr-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novaardiansyah%2Focr-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novaardiansyah%2Focr-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novaardiansyah%2Focr-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/novaardiansyah","download_url":"https://codeload.github.com/novaardiansyah/ocr-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novaardiansyah%2Focr-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32234716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["express-js","tesseract-ocr","ubuntu"],"created_at":"2025-12-25T18:52:11.097Z","updated_at":"2026-04-24T17:34:20.482Z","avatar_url":"https://github.com/novaardiansyah.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tesseract OCR Server\n\nHi Future Developer,\n\nWelcome to the **Tesseract OCR Server**! This project is a simple and efficient OCR (Optical Character Recognition) API server built with Node.js and Express.js, powered by [Tesseract OCR engine](https://github.com/tesseract-ocr/tesseract).\n\nThis server allows you to extract text from images by sending base64-encoded image data through a REST API. It's designed for easy integration with other applications that need OCR capabilities.\n\n## Dazzling Tech Stack! ⚡\n\n- [Express.js](https://expressjs.com/)\n- [Tesseract OCR](https://github.com/tesseract-ocr/tesseract)\n\n## Installation Guide 🛠️\n\n### Prerequisites\n\nBefore running this project, you need to install Tesseract OCR on your system.\n\n#### Ubuntu 22.04\n\n```bash\nsudo apt update\nsudo apt install -y tesseract-ocr tesseract-ocr-eng\n```\n\nVerify the installation:\n\n```bash\ntesseract --version\n```\n\n### Project Setup\n\n1. **Clone the repository**\n\n```bash\ngit clone https://github.com/novaardiansyah/ocr-server.git\ncd ocr-server\n```\n\n2. **Install dependencies**\n\n```bash\nnpm install\n```\n\n3. **Configure environment variables**\n\n```bash\ncp .env.example .env\n```\n\nEdit the `.env` file and set your configuration:\n\n```env\nAPI_KEY=your_secure_api_key_here\nPORT=3000\n```\n\n4. **Run the server**\n\n```bash\nnode index.js\n```\n\nThe server will start on the configured port (default: 3000).\n\n### Running with PM2 (Production)\n\nFor production deployment, you can use PM2 process manager:\n\n```bash\nnpm run pm2:start\n```\n\nOther PM2 commands:\n\n```bash\nnpm run pm2:stop     # Stop the server\nnpm run pm2:restart  # Restart the server\nnpm run pm2:delete   # Delete the PM2 process\n```\n\n## API Documentation 📚\n\n### Health Check\n\nCheck if the server is running.\n\n**Endpoint:** `GET /health`\n\n**Authentication:** Not required\n\n**Response:**\n\n```json\n{\n  \"status\": \"ok\",\n  \"timestamp\": \"2025-12-18T17:49:12.342Z\"\n}\n```\n\n### OCR - Extract Text from Image\n\nExtract text from a base64-encoded image using Tesseract OCR.\n\n**Endpoint:** `POST /ocr`\n\n**Authentication:** Bearer Token required\n\n**Headers:**\n\n```\nAuthorization: Bearer your_api_key_here\nContent-Type: application/json\n```\n\n**Request Body:**\n\n```json\n{\n  \"base64\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/...\",\n  \"lang\": \"eng\"\n}\n```\n\n| Parameter | Type   | Required | Description                                      |\n|-----------|--------|----------|--------------------------------------------------|\n| base64    | string | Yes      | Base64-encoded image data                        |\n| lang      | string | No       | Language code for OCR (default: \"eng\")           |\n\n**Response:**\n\n```json\n{\n  \"text\": \"\u003cyour_result_text\u003e\"\n}\n```\n\n**Error Responses:**\n\n- `400 Bad Request` - Missing base64 parameter\n- `401 Unauthorized` - Missing or invalid authorization header\n- `403 Forbidden` - Invalid API key\n- `500 Internal Server Error` - OCR processing failed\n\n## Sneak Peek 🌟\n\nWant to try the demo? You can test the OCR API at:\n\n**Demo Endpoint:** [https://ocr-server.novadev.my.id](https://ocr-server.novadev.my.id)\n\n- `GET /health`\n- `POST /ocr`\n\nTo get an API key, please reach out through the contact section below. I'll be happy to provide you with access!\n\n## Let's Connect! 📞\n\nNeed to chat? Feel free to drop me a line via [Email](mailto:novaardiansyah78@gmail.com) or hit me up on [WhatsApp](https://wa.me/6289506668480?text=Hi%20Nova,%20I%20have%20a%20question%20about%20your%20project%20on%20GitHub:%20https://github.com/novaardiansyah/ocr-server). I'm just a message away, ready to groove with you! 📩\n\n## Licensing Groove 🕺\n\nExciting news! This project is grooving to the rhythm of the [MIT License](LICENSE).\n\nFeel free to use, modify, and share it with the world. Just remember to keep the original license intact. Let's spread the joy of coding together! 🚀\n\n## Code of Conduct 🤝\n\nWe believe in fostering a welcoming and inclusive environment for everyone. Please be respectful, considerate, and constructive in all interactions. By participating in this project, you agree to uphold our [Code of Conduct](CODE_OF_CONDUCT.md). Let's collaborate and make this community awesome together!\n\n## Project Status 🚀\n\n![stages](https://img.shields.io/badge/stages-production-informational)\n[![information](https://img.shields.io/badge/information-references-informational)](references.json)\n![size](https://img.shields.io/github/repo-size/novaardiansyah/ocr-server?label=size\u0026color=informational)\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![last commit](https://img.shields.io/github/last-commit/novaardiansyah/ocr-server?label=last%20commit\u0026color=informational)](commits/main)\n\n## Thanks to 🙏\n\n- [Tesseract OCR](https://github.com/tesseract-ocr/tesseract) Licensed under the [Apache License 2.0](https://github.com/tesseract-ocr/tesseract?tab=Apache-2.0-1-ov-file)\n\n---\n\n**Happy coding and collaborating!**\n— Nova Ardiansyah\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovaardiansyah%2Focr-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnovaardiansyah%2Focr-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovaardiansyah%2Focr-server/lists"}