{"id":48577937,"url":"https://github.com/chaman2003/printchakra-ai","last_synced_at":"2026-04-08T16:03:51.540Z","repository":{"id":327268298,"uuid":"1095902750","full_name":"chaman2003/Printchakra-AI","owner":"chaman2003","description":"Al-powered document scanning and processing system with real-time desktop-mobile synchronization. Built with Flask (Python) backend, React + TypeScript frontend, OpenCV image enhancement, Tesseract OCR and Socket.IO WebSockets for seamless printing and workflow management.","archived":false,"fork":false,"pushed_at":"2026-03-10T21:31:53.000Z","size":140748,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-11T01:48:23.926Z","etag":null,"topics":["computer-vision","flask","html-css-javascript","ngrok","python","react-js","typescript","websocket"],"latest_commit_sha":null,"homepage":"https://printchakra.vercel.app/","language":"Jupyter Notebook","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/chaman2003.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-13T17:06:35.000Z","updated_at":"2026-03-10T21:30:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/chaman2003/Printchakra-AI","commit_stats":null,"previous_names":["chaman2003/printchakra","chaman2003/printchakra-ai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chaman2003/Printchakra-AI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaman2003%2FPrintchakra-AI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaman2003%2FPrintchakra-AI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaman2003%2FPrintchakra-AI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaman2003%2FPrintchakra-AI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chaman2003","download_url":"https://codeload.github.com/chaman2003/Printchakra-AI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaman2003%2FPrintchakra-AI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31562697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["computer-vision","flask","html-css-javascript","ngrok","python","react-js","typescript","websocket"],"created_at":"2026-04-08T16:03:50.747Z","updated_at":"2026-04-08T16:03:51.527Z","avatar_url":"https://github.com/chaman2003.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"https://capsule-render.vercel.app/api?type=waving\u0026height=220\u0026color=0:0f172a,30:1d4ed8,65:7c3aed,100:06b6d4\u0026text=PrintChakra\u0026fontColor=ffffff\u0026fontAlignY=38\u0026desc=AI-Powered%20Document%20Processing%20%7C%20OCR%20%7C%20Voice%20%7C%20Print%20Automation\u0026descAlignY=58\u0026animation=fadeIn\" alt=\"PrintChakra banner\" /\u003e\n\n\u003cimg src=\"https://readme-typing-svg.herokuapp.com?font=Space+Grotesk\u0026weight=700\u0026size=22\u0026duration=3200\u0026pause=900\u0026color=38BDF8\u0026center=true\u0026vCenter=true\u0026width=900\u0026lines=Windows-first+document+workflow+platform;OCR+%2B+print+management+%2B+phone+capture;Voice+conversation+with+local+and+Groq+fallback\" alt=\"Typing intro\" /\u003e\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n\u003cimg src=\"https://img.shields.io/badge/Backend-Flask%203.0-111827?style=for-the-badge\u0026logo=flask\u0026logoColor=white\" alt=\"Flask badge\" /\u003e\n\u003cimg src=\"https://img.shields.io/badge/Frontend-React%2019-0f172a?style=for-the-badge\u0026logo=react\u0026logoColor=61DAFB\" alt=\"React badge\" /\u003e\n\u003cimg src=\"https://img.shields.io/badge/Language-TypeScript-1e293b?style=for-the-badge\u0026logo=typescript\u0026logoColor=3178C6\" alt=\"TypeScript badge\" /\u003e\n\u003cimg src=\"https://img.shields.io/badge/OCR-PaddleOCR-111827?style=for-the-badge\u0026logoColor=white\" alt=\"PaddleOCR badge\" /\u003e\n\u003cimg src=\"https://img.shields.io/badge/Realtime-Socket.IO-0f172a?style=for-the-badge\u0026logo=socketdotio\u0026logoColor=white\" alt=\"Socket.IO badge\" /\u003e\n\u003cimg src=\"https://img.shields.io/badge/Platform-Windows-1e3a8a?style=for-the-badge\u0026logo=windows\u0026logoColor=white\" alt=\"Windows badge\" /\u003e\n\n\u003cbr /\u003e\n\n\u003cimg src=\"https://img.shields.io/badge/Python-3.10%20Recommended-2563eb?style=flat-square\u0026logo=python\u0026logoColor=white\" alt=\"Python version\" /\u003e\n\u003cimg src=\"https://img.shields.io/badge/Node.js-18%2B-16a34a?style=flat-square\u0026logo=nodedotjs\u0026logoColor=white\" alt=\"Node version\" /\u003e\n\u003cimg src=\"https://img.shields.io/badge/Voice-Groq%20Fallback-7c3aed?style=flat-square\" alt=\"Groq fallback\" /\u003e\n\u003cimg src=\"https://img.shields.io/badge/Status-Active%20Development-06b6d4?style=flat-square\" alt=\"Status\" /\u003e\n\n\u003c/div\u003e\n\n---\n\n## Overview\n\nPrintChakra is a Windows-first document workflow platform built for scanning, OCR, print configuration, phone-assisted capture, and voice-driven interaction. It combines a Flask backend and a React frontend into a single experience for processing documents from intake to output.\n\nIt is designed around practical operations:\n\n- Upload and manage document images and PDFs\n- Clean and enhance scans before OCR or printing\n- Extract text with OCR pipelines\n- Configure print and scan workflows from the browser\n- Capture documents from a phone-oriented flow\n- Use voice sessions for transcription, orchestration, and spoken responses\n- Keep UI state synchronized in real time through Socket.IO\n\n---\n\n## Quick Links\n\n- [Stack](#stack)\n- [Repository Layout](#repository-layout)\n- [Setup](#setup)\n- [Docker](#docker)\n- [Run Locally](#run-locally)\n- [Environment](#environment-configuration)\n- [Features](#feature-highlights)\n- [Architecture](#architecture)\n- [Troubleshooting](#troubleshooting)\n\n---\n\n## Stack\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd valign=\"top\" width=\"50%\"\u003e\n\n### Backend\n\n- Python\n- Flask\n- Flask-SocketIO\n- OpenCV\n- PaddleOCR\n- Tesseract\n- PyMuPDF and PDF tooling\n- pywin32 for Windows printer integration\n- Local Whisper, TTS, and LLM support\n- Groq fallback for chat, STT, and TTS\n\n\u003c/td\u003e\n\u003ctd valign=\"top\" width=\"50%\"\u003e\n\n### Frontend\n\n- React 19\n- TypeScript\n- Chakra UI\n- Framer Motion\n- Axios\n- Socket.IO client\n- React Router\n- Responsive dashboard and landing page\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\n## Feature Highlights\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"33%\" valign=\"top\"\u003e\n\n### OCR Pipeline\n\nAdvanced document cleanup and OCR flow for scanned or photographed pages.\n\n- Image enhancement\n- Text extraction\n- PDF and image handling\n- Notebook-driven pipeline experimentation\n\n\u003c/td\u003e\n\u003ctd width=\"33%\" valign=\"top\"\u003e\n\n### Print Workflow\n\nBrowser-based print setup and orchestration for Windows environments.\n\n- Print configuration UI\n- Queue and device awareness\n- Real-time status updates\n- Workflow-driven execution\n\n\u003c/td\u003e\n\u003ctd width=\"33%\" valign=\"top\"\u003e\n\n### Voice Workflow\n\nVoice session startup, transcription, chat, and speech response.\n\n- Local-first voice stack\n- Groq fallback support\n- Frontend voice UI integration\n- Orchestration-ready responses\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"33%\" valign=\"top\"\u003e\n\n### Phone Capture\n\nA phone-oriented intake flow for documents captured outside the desktop UI.\n\n- Capture handoff\n- Document intake path\n- Processing-ready uploads\n\n\u003c/td\u003e\n\u003ctd width=\"33%\" valign=\"top\"\u003e\n\n### Real-Time Dashboard\n\nLive file browsing, previews, system info, and document actions.\n\n- Socket updates\n- File previews\n- Device panels\n- Workflow access points\n\n\u003c/td\u003e\n\u003ctd width=\"33%\" valign=\"top\"\u003e\n\n### Windows Integration\n\nBuilt around Windows printer and local device workflows.\n\n- pywin32 printing\n- Local file paths\n- Windows-friendly setup\n- Optional HTTPS locally\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\n## Repository Layout\n\n```text\nprintchakra/\n├── README.md\n├── Document_Processing_Pipeline.ipynb\n├── backend/\n│   ├── app.py\n│   ├── requirements.txt\n│   ├── .venv/\n│   ├── app/\n│   │   ├── api/\n│   │   ├── config/\n│   │   ├── core/\n│   │   ├── features/\n│   │   ├── modules/\n│   │   ├── sockets/\n│   │   ├── utils/\n│   │   ├── print_scripts/\n│   │   └── .env\n│   ├── public/\n│   │   └── data/\n│   └── test/\n├── frontend/\n│   ├── package.json\n│   ├── public/\n│   └── src/\n└── phase-2/\n```\n\n### Important Files\n\n- Backend entry point: [backend/app.py](backend/app.py)\n- Backend dependencies: [backend/requirements.txt](backend/requirements.txt)\n- Frontend dependencies: [frontend/package.json](frontend/package.json)\n- Backend environment file used by settings: [backend/app/.env](backend/app/.env)\n- Notebook pipeline: [Document_Processing_Pipeline.ipynb](Document_Processing_Pipeline.ipynb)\n\n---\n\n## Setup\n\n### Requirements\n\n- Windows 10 or 11\n- Python 3.10 recommended\n- Node.js 18+\n- npm\n\n### Backend Setup\n\n```powershell\ncd backend\npython -m venv .venv\n.\\.venv\\Scripts\\Activate.ps1\npip install -r requirements.txt\n```\n\nIf [backend/.venv](backend/.venv) already exists and is working, reuse it.\n\n### Frontend Setup\n\n```powershell\ncd frontend\nnpm install\n```\n\n---\n\n## Docker\n\nPrintChakra now includes a production-oriented Docker setup for the full app:\n\n- Backend container on port 5000\n- Frontend container on port 3000\n- Persistent backend data mounted from [backend/public/data](backend/public/data)\n- Linux-native OCR and PDF runtime packages baked into the backend image\n- Optional host Ollama access through `host.docker.internal`\n\n### Start With Compose\n\n```powershell\ndocker compose up --build\n```\n\n### Container URLs\n\n- Frontend: http://localhost:3000\n- Backend: http://localhost:5000\n\n### Important Docker Notes\n\n- Browser-to-backend routing is controlled by `REACT_APP_API_URL` at frontend build time.\n- The backend image sets `POPPLER_PATH=/usr/bin` and `TESSERACT_CMD=/usr/bin/tesseract`.\n- Ollama is not bundled; by default Compose points the backend to `http://host.docker.internal:11434`.\n- Windows-native printing is not available inside the default Linux container. Linux printing can work if the host exposes CUPS.\n\n---\n\n## Run Locally\n\n### Backend\n\n```powershell\ncd backend\n.\\.venv\\Scripts\\Activate.ps1\npython app.py\n```\n\n### Frontend\n\n```powershell\ncd frontend\nnpm run dev\n```\n\n### Local URLs\n\n- Frontend: http://localhost:3000\n- Backend: http://localhost:5000\n\nIf port 3000 is occupied, the frontend may move to another port such as 3001.\n\n---\n\n## Environment Configuration\n\nThe backend settings currently load environment variables from [backend/app/.env](backend/app/.env).\n\nWhen running with Docker Compose, container environment variables override local file-based defaults.\n\n### Example\n\n```env\nFRONTEND_URL=http://localhost:3000\nBACKEND_PUBLIC_URL=http://localhost:5000\nAPI_CORS_ORIGINS=http://localhost:3000\n\nVOICE_AI_MODEL=smollm2:135m\n\nGROQ_API_KEY=your_key_here\nGROQ_LLM_MODEL=llama-3.1-8b-instant\nGROQ_STT_MODEL=whisper-large-v3-turbo\nGROQ_TTS_ENDPOINT=https://api.groq.com/openai/v1/audio/speech\nGROQ_TTS_MODEL=canopylabs/orpheus-v1-english\n```\n\n### Optional HTTPS\n\nThe backend defaults to HTTP. HTTPS is opt-in.\n\n```env\nUSE_HTTPS=1\nSSL_CERT=certs/cert.pem\nSSL_KEY=certs/key.pem\n```\n\n---\n\n## Architecture\n\n```mermaid\nflowchart TD\n    A[Phone Capture / Dashboard / Voice UI] --\u003e B[React Frontend]\n    B --\u003e C[Axios + Socket.IO]\n    C --\u003e D[Flask Backend]\n    D --\u003e E[Document Processing Modules]\n    D --\u003e F[OCR + Image Enhancement]\n    D --\u003e G[Print and Scan Orchestration]\n    D --\u003e H[Voice Services]\n    H --\u003e I[Local Whisper / Local TTS / Local LLM]\n    H --\u003e J[Groq Fallback]\n    D --\u003e K[Windows Printing + Local File Storage]\n```\n\n---\n\n## Voice Fallback Behavior\n\nPrintChakra uses a local-first voice strategy and can fall back to Groq when local services are unavailable.\n\nConfigured fallback areas:\n\n- LLM chat\n- Speech-to-text\n- Text-to-speech\n\nThe `/voice/status` endpoint reports current readiness for local and fallback providers.\n\n---\n\n## Data and Output Locations\n\nRuntime file storage is served through backend data directories inside the backend tree.\n\nCanonical backend test outputs are kept in:\n\n- [backend/test/test_outputs](backend/test/test_outputs)\n\nRedundant generated output folders outside that canonical path were intentionally cleaned up.\n\n---\n\n## Troubleshooting\n\n### Backend does not start\n\nCheck:\n\n- Python version is compatible\n- The backend virtual environment is activated\n- Port 5000 is not occupied by another process\n- Dependencies from [backend/requirements.txt](backend/requirements.txt) are installed\n\n### Frontend cannot reach backend\n\nCheck:\n\n- Backend is running on port 5000\n- Frontend dev server is running\n- CORS points to the correct frontend origin\n- Backend is not accidentally running under HTTPS while the frontend expects HTTP\n\n### Voice features fail\n\nCheck:\n\n- Local voice dependencies installed correctly\n- Groq settings are present in [backend/app/.env](backend/app/.env) if fallback is expected\n- `/voice/status` reports the providers you expect\n\n### OCR is unavailable or slow\n\nCheck:\n\n- PaddleOCR and image dependencies are installed\n- PDF tooling is available for conversion paths\n- `TESSERACT_CMD` points to a valid binary when running in a container\n- GPU support is optional and CPU fallback may be slower\n\n### Docker printing does not work\n\nCheck:\n\n- The default containers are Linux-based and cannot use Windows `pywin32` printing\n- Linux printing requires host CUPS access and compatible printer visibility\n- For Windows printer integration, run the backend locally on Windows instead of inside Docker\n\n---\n\n## Notebook\n\nThe repository includes a standalone notebook for experimenting with the document pipeline:\n\n- [Document_Processing_Pipeline.ipynb](Document_Processing_Pipeline.ipynb)\n\n---\n\n## Summary\n\nPrintChakra is a document workflow app centered on OCR, print and scan control, voice interaction, and phone-assisted capture. For local development, use Python 3.10, run the backend on port 5000, run the frontend with `npm run dev`, and keep backend environment values in [backend/app/.env](backend/app/.env).\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"https://capsule-render.vercel.app/api?type=waving\u0026section=footer\u0026height=140\u0026color=0:0f172a,35:1d4ed8,70:7c3aed,100:06b6d4\" alt=\"Footer banner\" /\u003e\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaman2003%2Fprintchakra-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaman2003%2Fprintchakra-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaman2003%2Fprintchakra-ai/lists"}