{"id":32860569,"url":"https://github.com/tuokaikyle/1000-fake-users","last_synced_at":"2026-04-14T10:32:44.661Z","repository":{"id":323147812,"uuid":"1084333033","full_name":"tuokaikyle/1000-fake-users","owner":"tuokaikyle","description":"Put 1000 fake users into a db to test your starting project","archived":false,"fork":false,"pushed_at":"2025-11-08T10:53:50.000Z","size":324,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-08T12:21:30.830Z","etag":null,"topics":["bun","login","login-system","mock-data","mock-data-generator","mongodb","mysql","postgres","postgresql","react","reactjs","register","sqlite","typescript","user","user-name"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/tuokaikyle.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,"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-10-27T14:40:51.000Z","updated_at":"2025-11-08T10:57:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tuokaikyle/1000-fake-users","commit_stats":null,"previous_names":["tuokaikyle/1000-fake-users"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/tuokaikyle/1000-fake-users","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuokaikyle%2F1000-fake-users","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuokaikyle%2F1000-fake-users/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuokaikyle%2F1000-fake-users/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuokaikyle%2F1000-fake-users/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tuokaikyle","download_url":"https://codeload.github.com/tuokaikyle/1000-fake-users/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuokaikyle%2F1000-fake-users/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31793213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"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":["bun","login","login-system","mock-data","mock-data-generator","mongodb","mysql","postgres","postgresql","react","reactjs","register","sqlite","typescript","user","user-name"],"created_at":"2025-11-08T20:00:28.120Z","updated_at":"2026-04-14T10:32:44.656Z","avatar_url":"https://github.com/tuokaikyle.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 1000-fake-users\n\nPut these 1000 or even more fake users into a db to test your starter project.  \nYou can easily add or modify the attributes.  \nUses Faker.js.  \nUses weighted values and normal distribution algorithm to generate realistic data.\n\n## How to run\n\nTo install dependencies:\n\n```bash\nbun install\n```\n\n## 1000-fake-users\n\n```bash\nbun run src/index.ts\n```\n\nGeneric user data without being localized.\n\n| Attributes         | Description                                     |\n| ------------------ | ----------------------------------------------- |\n| \\_id               | uuid                                            |\n| email              | no duplicates, contains first name              |\n| password           | not encrypted                                   |\n| username           | first name only, can tell sex, allow duplidates |\n| sex                | two values, male and female                     |\n| dob                | yyyy-mm-dd, has range, but no normalization     |\n| height             | cm, with normal distribution, related to sex    |\n| weight             | kg, with normal distribution, related to sex    |\n| currentLocation    | countries                                       |\n| fromLocation       | countries                                       |\n| jobTitle           | random                                          |\n| bloodType          | weighted                                        |\n| mbti               | random                                          |\n| relationshipStatus | weighted                                        |\n| zodiacSign         | computed from dob                               |\n\n## 1000-fake-users-usa\n\n```bash\nbun run src/usa.ts\n```\n\nLocalized, different from _1000-fake-users_ in the following:\n\n| Attributes      | Description                                      |\n| --------------- | ------------------------------------------------ |\n| email           | no duplicates, contains first name and last name |\n| firstname       | has firstname, can tell sex                      |\n| lastname        | has lastname                                     |\n| gender          | male, female, other                              |\n| dob             | US styled, has range, but no normalization       |\n| height          | foot, with normal distribution, related to sex   |\n| weight          | pound, with normal distribution, related to sex  |\n| currentLocation | US state names or abroad                         |\n\n## 1000-fake-users-china\n\n```bash\nbun run src/china.ts\n```\n\n经过本地化处理，与 _1000-fake-users_ 的不同处在于：\n\n| Attributes      | Description                          |\n| --------------- | ------------------------------------ |\n| email           | 随机，不包含名字                     |\n| username        | 中文姓和随机数字                     |\n| currentLocation | 省市区，包含港澳台地区，部分海外地区 |\n| fromLocation    | 省市区，包含港澳台地区，部分海外地区 |\n\n## Considerations\n\nWays of creating weighted data:\n\n1. Plain\n\n```\nconst currentLocation = Math.random() \u003e 0.2 ? faker.location.state() : 'Abroad'\n```\n\n2. Create const and type together\n\n```\nexport const relationshipStatusWeighted = [\n\t{ value: 'Single', weight: 80 },\n\t{ value: 'Divorced', weight: 15 },\n\t{ value: 'Widowed', weight: 5 },\n] as const\n\nexport type RelationshipStatus = (typeof relationshipStatusWeighted)[number]['value']\n\nconst relationshipStatus = faker.helpers.weightedArrayElement(relationshipStatusWeighted)\n```\n\n3. faker inside faker\n\n```\nconst sex = faker.person.sexType()\n\nconst gender = faker.helpers.weightedArrayElement([\n  { weight: 90, value: sex },\n  { weight: 10, value: 'other' },\n])\n```\n\n## Todos:\n\n- [x] us, china emails can have duplicates\n- [ ] add empty values\n- [x] 中文用户名方案 - 汉字数字混合？\n- [ ] 海外地区方案 包含所有国家？\n- [ ] re arrange column order\n- [ ] add test\n\n## Change logs\n\nindex - create emails seperately - no duplicates - does not match name\nusa - fn+ln+random - low chance duplicates\nchina\n\nemail  \n一定要唯一\n名字一定能看出性别\n\nemail unique 问题：跟 username 不合拍\nemail unique + username 从 email 中来 问题：username 跟性别不一致\nemail uuid 问题：不完全 unique - 检查\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuokaikyle%2F1000-fake-users","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftuokaikyle%2F1000-fake-users","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuokaikyle%2F1000-fake-users/lists"}