{"id":18053877,"url":"https://github.com/danielstern/navatar","last_synced_at":"2025-04-05T08:21:51.750Z","repository":{"id":69958812,"uuid":"85832881","full_name":"danielstern/navatar","owner":"danielstern","description":"Navatar, the Node.js Avatar Generator","archived":false,"fork":false,"pushed_at":"2017-03-22T23:09:16.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T15:50:56.089Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/danielstern.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":"2017-03-22T13:47:01.000Z","updated_at":"2022-03-18T20:01:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"bfd2d440-8cf6-43d3-a6b7-68880b1b1270","html_url":"https://github.com/danielstern/navatar","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/danielstern%2Fnavatar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielstern%2Fnavatar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielstern%2Fnavatar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielstern%2Fnavatar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielstern","download_url":"https://codeload.github.com/danielstern/navatar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247307330,"owners_count":20917450,"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":[],"created_at":"2024-10-31T00:08:26.965Z","updated_at":"2025-04-05T08:21:51.732Z","avatar_url":"https://github.com/danielstern.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#Navatar, the Node.js Avatar Generator\n## Generate visually-pleasing, unique avatars using Node.js\n\u003cobject data=\"https://navatar-demo.herokuapp.com/avatar/try-it!.svg\"\u003e\u003c/object\u003e\n \n###[Check out the demo!](http://navatar-demo.herokuapp.com/)\n\n### Key Features\n- Easily add randomly generated avatars to your existing Express application using the built-in middleware\n- Generate fast SVG images that look good at any size\n\n### Notes\n- For production performance, it is recommended that you cache generated images as PNGs using your exisitng file server\n- No support for PNG files yet (you can optionally read the SVG from the route and convert into a PNG using `svg2png` - this process works but is slow)\n\n### How it works\nNavatar uses built-in algorithms to create cellular automata, a la Stephen Wolfram's [\"A New Kind of Science\"](http://www.wolframscience.com/nksonline/toc.html), which heavily influenced this project.\nWhen the MiddleWare is invoked, an SVG is randomly generated based on the key provided, and sent to the user.\n\u003c!--\nWhat you end up with is this:\n\u003cobject data=\"https://navatar-demo.herokuapp.com/avatar/larry.svg\"\u003e\u003c/object\u003e\n\u003cobject data=\"https://navatar-demo.herokuapp.com/avatar/curly.svg\"\u003e\u003c/object\u003e\n\u003cobject data=\"https://navatar-demo.herokuapp.com/avatar/moe.svg\"\u003e\u003c/object\u003e--\u003e\n\n### Usage\n- First, install via NPM\n```bash\nnpm install --save navatar\n```\n\n- Then, add as `express` MiddleWare...\n```javascript\nconst { getNavatarMiddleware } = require('navatar');\nconst express = require(`express`);\nconst app = new express();\napp.use('/avatar/:key.svg',getNavatarMiddleware());\napp.listen(666);\n```\n\nNow, your `/avatar` route will serve up SVGs!\n\n### Options\n#### Custom width and height\nPass width and height as query paramaters to modify the size of the generated glyph. (It is recommended to use the same value for width and height.)\n\n```javascript\n//example\nhttp://localhost/avatar/this-rocks.svg?height=150\u0026width=150\n```\n\n### Coming Soon!\n- Support for additional tree-generation algorithms\n- Better color palette support\n- PNG support (one day!)\n\n### License\n[CC BY](https://creativecommons.org/licenses/by/4.0/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielstern%2Fnavatar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielstern%2Fnavatar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielstern%2Fnavatar/lists"}