{"id":19964110,"url":"https://github.com/pilotpirxie/devcaptcha","last_synced_at":"2025-10-07T11:05:07.582Z","repository":{"id":54310091,"uuid":"260191595","full_name":"pilotpirxie/devcaptcha","owner":"pilotpirxie","description":"🤖 Open source captcha made with React, Node and TypeScript for DEV.to community ","archived":false,"fork":false,"pushed_at":"2021-02-25T00:45:08.000Z","size":14161,"stargazers_count":26,"open_issues_count":1,"forks_count":6,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-07T22:41:38.069Z","etag":null,"topics":["captcha","captcha-alternative","hip","mechanism","puzzle","react","security","solve","typescript","typescript-library"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pilotpirxie.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}},"created_at":"2020-04-30T11:20:18.000Z","updated_at":"2025-03-05T07:15:04.000Z","dependencies_parsed_at":"2022-08-13T11:40:37.115Z","dependency_job_id":null,"html_url":"https://github.com/pilotpirxie/devcaptcha","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilotpirxie%2Fdevcaptcha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilotpirxie%2Fdevcaptcha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilotpirxie%2Fdevcaptcha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilotpirxie%2Fdevcaptcha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pilotpirxie","download_url":"https://codeload.github.com/pilotpirxie/devcaptcha/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252269026,"owners_count":21721239,"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":["captcha","captcha-alternative","hip","mechanism","puzzle","react","security","solve","typescript","typescript-library"],"created_at":"2024-11-13T02:19:20.225Z","updated_at":"2025-10-07T11:05:02.557Z","avatar_url":"https://github.com/pilotpirxie.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# devcaptcha\nOpen source captcha made with React, Node and TypeScript for DEV.to community \n\n### Features\n* Fast and efficient, uses Redis as temp storage,\n* Implements leading zero challenge,\n* Requires image recognition to find coordinates on a background,\n* Customizable, you can easily tailor to your needs,\n* Simple integration in just few minutes,\n* Written with Typescript, React, Node and Express,\n\n![Screenshot 1](img/s1.png)\n\n![Screenshot 2](img/s2.png)\n\n![Screenshot 3](img/s3.png)\n\n### Getting started\n```bash\ngit clone https://github.com/pilotpirxie/devcaptcha.git\ncd devcaptcha/devcaptcha-server\nyarn install\nyarn start\n```\n\n## Integration\n\nCaptcha should be configured equally on the client and backend side to works correctly.\n\n\n```js\nconst devcaptcha = new DevCaptcha({\n  appendSelector: '#captcha',\n  promptText: 'Move the puzzle to the correct position to solve captcha',\n  lockedText: 'Locked',\n  savingText: 'Wait',\n  privacyUrl: 'https://example.com',\n  termsUrl: 'https://example.com',\n  baseUrl: 'http://localhost:8081',\n  puzzleAlpha: 0.9,\n  canvasContainerId: 'devcaptcha-container',\n  leadingZerosLength: 3,\n  workerPath: './worker.js'\n});\n```\n\n### Client Config Definition:\n```\nexport type CaptchaConfig = {\n  appendSelector: string, // place to append\n  promptText: string, // text on the top of captcha\n  lockedText: string, // text after locking\n  savingText: string, // text while solving leading zero challenge\n  privacyUrl: string, // url to your privacy policy\n  termsUrl: string, // url to your terms of service\n  baseUrl: string, // base url of devcaptcha server\n  puzzleAlpha: number, // transparency of puzzle\n  canvasContainerId: string, // id for a div with canvas\n  leadingZerosLength: number, // required number of zeros at the front\n  workerPath: string, // path to worker.js file\n}\n```\n\n### Server Config\n```json\n{\n  \"port\": 8081,\n  \"timeout\": 8000,\n  \"apiKey\": \"WmC8xsPD8jhufzndFF3RykNez5QtjXuZ\",\n  \"maxDistance\": 32,\n  \"leadingZerosLength\": 3,\n  \"challengeCount\": 50,\n  \"challengeLength\": 256,\n  \"backgroundPuzzlePath\": \"/public/puzzle/1.png\",\n  \"clientPuzzlePath\": \"/public/puzzle/2.png\",\n  \"backgroundImagesPath\": \"/public/backgrounds/optimized\",\n  \"backgroundQuality\": 25,\n  \"puzzleWidth\": 64,\n  \"puzzleHeight\": 64,\n  \"maxTTL\": 30,\n  \"forceCleanOpimizedImageCache\": false\n}\n```\n\n### Server Config Definition\n```\ntype ServerConfig = {\n  port: number, // port to run server\n  timeout: number, // maximum time to respond\n  apiKey:  string, // secret api key for verifying response\n  maxDistance: number, // maximum distance between client and server puzzles\n  leadingZerosLength: number, // required number of zeros at the front\n  challengeCount: number, // number of string in leading zero challenge \n  challengeLength: number, // length of single string\n  backgroundPuzzlePath: string, // path to the puzzle for composition with a background\n  clientPuzzlePath: string, // path to the puzzle for client side\n  backgroundImagesPath: string, // path to directory with background images\n  puzzleWidth: number, // puzzle width\n  puzzleHeight: number, // puzzle height\n  maxTTL: number, // time to store user data in redis\n  backgroundQuality: number, // quality of output background\n  forceCleanOpimizedImageCache: boolean // run optimization on each startup\n}\n```\n\n### Blog series\n![DevCaptcha](https://i.imgur.com/9EhWrPx.png)\n\n[Part 1 - Architecture](https://dev.to/meatboy/create-your-own-captcha-with-react-node-part-1-architecture-1ho7)\n\n[Part 2 - Environment](https://dev.to/meatboy/create-your-own-captcha-part-2-setup-typescript-webpack-and-react-254b)\n\n[Part 3 - React and PIXI.js](https://dev.to/meatboy/create-your-own-captcha-part-3-canvas-13i8)\n\n[Part 4 - Verify Algorithms and Image Manipulation](https://dev.to/meatboy/create-your-own-captcha-part-4-algorithm-node-typescript-react-53j3)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpilotpirxie%2Fdevcaptcha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpilotpirxie%2Fdevcaptcha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpilotpirxie%2Fdevcaptcha/lists"}