{"id":21269034,"url":"https://github.com/sloanelybutsurely/typeid-elixir","last_synced_at":"2025-04-05T02:02:53.568Z","repository":{"id":177729682,"uuid":"660334790","full_name":"sloanelybutsurely/typeid-elixir","owner":"sloanelybutsurely","description":"Elixir implementation of TypeIDs: type-safe, K-sortable, and globally unique identifiers inspired by Stripe IDs","archived":false,"fork":false,"pushed_at":"2024-11-13T14:20:35.000Z","size":65,"stargazers_count":65,"open_issues_count":6,"forks_count":10,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T01:02:30.094Z","etag":null,"topics":["base32","crockford-base32","database","ecto","elixir","primary-key","typeid","uuid","uuid7","uuidv7"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/sloanelybutsurely.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-06-29T19:21:15.000Z","updated_at":"2025-03-03T07:51:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"fa32be36-65c3-4029-ac4b-764a7c1a8bc7","html_url":"https://github.com/sloanelybutsurely/typeid-elixir","commit_stats":null,"previous_names":["sloanelybutsurely/typeid-elixir"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloanelybutsurely%2Ftypeid-elixir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloanelybutsurely%2Ftypeid-elixir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloanelybutsurely%2Ftypeid-elixir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloanelybutsurely%2Ftypeid-elixir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sloanelybutsurely","download_url":"https://codeload.github.com/sloanelybutsurely/typeid-elixir/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276159,"owners_count":20912288,"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":["base32","crockford-base32","database","ecto","elixir","primary-key","typeid","uuid","uuid7","uuidv7"],"created_at":"2024-11-21T08:07:05.936Z","updated_at":"2025-04-05T02:02:53.526Z","avatar_url":"https://github.com/sloanelybutsurely.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TypeID Elixir\n\n[![CI](https://github.com/sloanelybutsurely/typeid-elixir/actions/workflows/ci.yaml/badge.svg)](https://github.com/sloanelybutsurely/typeid-elixir/actions/workflows/ci.yaml) [![Hex.pm](https://img.shields.io/hexpm/v/typeid_elixir.svg)](https://hex.pm/packages/typeid_elixir) [![Documentation](https://img.shields.io/badge/documentation-gray)](https://hexdocs.pm/typeid_elixir)\n\n### A type-safe, K-sortable, globally unique identifier inspired by Stripe IDs\n\n[TypeIDs](https://github.com/jetpack-io/typeid) are a modern, type-safe, globally unique identifier based on the upcoming UUIDv7 standard. They provide a ton of nice properties that make them a great choice as the primary identifiers for your data in a database, APIs, and distributed systems. Read more about TypeIDs in their spec.\n\n## Installation\n\nThe package can be installed from [hex](https://hex.pm/packages/typeid_elixir) by adding `typeid_elixir` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:typeid_elixir, \"~\u003e 1.0\"}\n  ]\nend\n```\n\n## Spec\n\nThe original TypeID spec is defined [here](https://github.com/jetpack-io/typeid).\n\n## Usage with Ecto\n\n`TypeID` implements the `Ecto.ParameterizedType` behaviour so you can use\nTypeIDs as fields in your Ecto schemas.\n\n```elixir\ndefmodule MyApp.Accounts.User do\n  use Ecto.Schema\n\n  @primary_key {:id, TypeID, autogenerate: true, prefix: \"acct\", type: :uuid}\n  @foreign_key_type TypeID\n\n  # ...\nend\n```\n\n### Underlying types\n\n`TypeID`s can be stored as either `:string` or `:uuid`. `:string` will store\nthe entire TypeID including the prefix. `:uuid` stores only the UUID portion\nand requires a `:uuid` or `:uuid` column.\n\n#### Default type\n\nThe type used can be set globally in the application config.\n\n```elixir\nconfig :typeid_elixir,\n  default_type: :uuid\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsloanelybutsurely%2Ftypeid-elixir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsloanelybutsurely%2Ftypeid-elixir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsloanelybutsurely%2Ftypeid-elixir/lists"}