{"id":24888618,"url":"https://github.com/ankkho/zxcvbn-api","last_synced_at":"2026-04-08T18:31:36.888Z","repository":{"id":275243774,"uuid":"925523868","full_name":"ankkho/zxcvbn-api","owner":"ankkho","description":"zxcvbn-ts as API server","archived":false,"fork":false,"pushed_at":"2025-02-01T04:34:49.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T11:43:58.991Z","etag":null,"topics":["api-server","docker","docker-image","password","password-strength","password-strength-checker","typescript","zxcvbn","zxcvbn-ts"],"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/ankkho.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":"2025-02-01T04:19:48.000Z","updated_at":"2025-02-01T04:36:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"22532d05-39e6-46b6-b9fb-3c85a74d4797","html_url":"https://github.com/ankkho/zxcvbn-api","commit_stats":null,"previous_names":["ankkho/zxcvbn-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ankkho/zxcvbn-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankkho%2Fzxcvbn-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankkho%2Fzxcvbn-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankkho%2Fzxcvbn-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankkho%2Fzxcvbn-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ankkho","download_url":"https://codeload.github.com/ankkho/zxcvbn-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankkho%2Fzxcvbn-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31568593,"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":["api-server","docker","docker-image","password","password-strength","password-strength-checker","typescript","zxcvbn","zxcvbn-ts"],"created_at":"2025-02-01T16:14:11.739Z","updated_at":"2026-04-08T18:31:36.878Z","avatar_url":"https://github.com/ankkho.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zxcvbn-api: Password Strength Estimator API Service\n\n**Overview:**\n\n`zxcvbn-api` is a Dockerized API service that exposes the functionality of the [zxcvbn-ts](https://zxcvbn-ts.github.io/zxcvbn/) password strength estimator. Built with Node.js and TypeScript, this service allows developers to integrate robust password strength estimation into their applications without directly embedding the zxcvbn-ts library.\n\n**Features:**\n\n- **Password Strength Estimation:** Evaluates password strength based on common patterns, dictionary words, and other heuristics.\n- **API Endpoint:** Provides a RESTful API endpoint to assess password strength.\n- **Dockerized Service:** Simplifies deployment and scalability by containerizing the application.\n\n**Getting Started:**\n\n1. **Clone the Repository:**\n\n   Begin by cloning the `zxcvbn-api` repository to your local machine:\n\n   ```sh\n   git clone git@github.com:ankkho/zxcvbn-api.git\n   ```\n\n2. **Navigate to the Project Directory:**\n\n   Change into the project directory:\n\n   ```sh\n   cd zxcvbn-api\n   ```\n\n3. **Install Dependencies:**\n\n   Install the necessary Node.js dependencies:\n\n   ```sh\n   npm install\n   ```\n\n4. **Build the Docker Image:**\n\n   Build the Docker image with the tag `zxcvbn-api`:\n\n   ```sh\n   docker build -t zxcvbn-api .\n   ```\n\n5. **Run the Docker Container:**\n\n   Start the Docker container, exposing port 3000:\n\n   ```sh\n   docker run -p 3000:3000 zxcvbn-api\n   ```\n\n   The API service will be accessible at `http://localhost:3000`.\n\n**Usage:**\n\nTo assess the strength of a password, send a POST request to the `/password-strength` endpoint with a JSON payload containing the password:\n\n```json\n{\n  \"password\": \"your_password_here\"\n}\n```\n\nThe API will respond with a JSON object containing the password strength score and feedback.\n\n**Example Request:**\n\n```sh\ncurl -X POST http://localhost:3000/password-strength \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"password\": \"P@ssw0rd\"}'\n```\n\n**Example Response:**\n\n```json\n{\n  \"calcTime\": 13,\n  \"password\": \"P@ssw0rd\",\n  \"guesses\": 17,\n  \"guessesLog10\": 1.2304489213782739,\n  \"sequence\": [\n    {\n      \"pattern\": \"dictionary\",\n      \"i\": 0,\n      \"j\": 7,\n      \"token\": \"P@ssw0rd\",\n      \"matchedWord\": \"password\",\n      \"rank\": 2,\n      \"dictionaryName\": \"passwords\",\n      \"reversed\": false,\n      \"l33t\": true,\n      \"subs\": [\n        {\n          \"letter\": \"a\",\n          \"substitution\": \"@\"\n        },\n        {\n          \"letter\": \"o\",\n          \"substitution\": \"0\"\n        }\n      ],\n      \"subDisplay\": \"@ -\u003e a, 0 -\u003e o\",\n      \"baseGuesses\": 2,\n      \"uppercaseVariations\": 2,\n      \"l33tVariations\": 4,\n      \"guesses\": 16,\n      \"guessesLog10\": 1.2041199826559246\n    }\n  ],\n  \"crackTimesSeconds\": {\n    \"onlineThrottling100PerHour\": 612,\n    \"onlineNoThrottling10PerSecond\": 1.7,\n    \"offlineSlowHashing1e4PerSecond\": 0.0017,\n    \"offlineFastHashing1e10PerSecond\": 1.7e-9\n  },\n  \"crackTimesDisplay\": {\n    \"onlineThrottling100PerHour\": \"10 minutes\",\n    \"onlineNoThrottling10PerSecond\": \"2 seconds\",\n    \"offlineSlowHashing1e4PerSecond\": \"less than a second\",\n    \"offlineFastHashing1e10PerSecond\": \"less than a second\"\n  },\n  \"score\": 0,\n  \"feedback\": {\n    \"warning\": \"This is similar to a commonly used password.\",\n    \"suggestions\": [\n      \"Add more words that are less common.\",\n      \"Capitalize more than the first letter.\",\n      \"Avoid predictable letter substitutions like '@' for 'a'.\"\n    ]\n  }\n}\n```\n\n**Contributing:**\n\nContributions are welcome! Please fork the repository, make your changes, and submit a pull request.\n\n**License:**\n\nThis project is licensed under the MIT License.\n\n**References:**\n\n- [zxcvbn-ts GitHub Repository](https://github.com/zxcvbn-ts/zxcvbn)\n- [zxcvbn-ts Documentation](https://zxcvbn-ts.github.io/zxcvbn/)\n\nBy utilizing `zxcvbn-api`, developers can seamlessly integrate advanced password strength estimation into their applications, enhancing security and user experience.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankkho%2Fzxcvbn-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fankkho%2Fzxcvbn-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankkho%2Fzxcvbn-api/lists"}