{"id":19746888,"url":"https://github.com/finitereality/xinji","last_synced_at":"2026-05-13T18:14:38.670Z","repository":{"id":135891410,"uuid":"348575417","full_name":"FiniteReality/xinji","owner":"FiniteReality","description":"A scheming schema definition language","archived":false,"fork":false,"pushed_at":"2021-03-27T11:59:13.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-10T20:53:03.546Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/FiniteReality.png","metadata":{"files":{"readme":"docs/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}},"created_at":"2021-03-17T04:07:20.000Z","updated_at":"2021-03-26T05:54:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"e97f9502-3ef6-4d50-9d48-1384b04a5f29","html_url":"https://github.com/FiniteReality/xinji","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/FiniteReality%2Fxinji","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FiniteReality%2Fxinji/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FiniteReality%2Fxinji/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FiniteReality%2Fxinji/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FiniteReality","download_url":"https://codeload.github.com/FiniteReality/xinji/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241078412,"owners_count":19905852,"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-11-12T02:16:09.222Z","updated_at":"2026-05-13T18:14:33.637Z","avatar_url":"https://github.com/FiniteReality.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 心计 - A scheming schema definition language #\n\n心计 (Xīnjì, pronounced /ɕīntɕìː/, or if you can't read IPA, \"shinji\" is close\nenough) is a schema definition language designed to be used as the\nsingle-source-of-truth of types used in a microservices application involving\nmultiple applications.\n\n## How does it work? ##\n\n心计 lets you define types using Lua code, which means you're free to use all of\nthe Lua facilities to augment your schema, as a form of metaprogramming. As an\nexample:\n\n```lua\nprimitive \"bool\"\nprimitive \"float\"\nprimitive \"string\"\n\nprimitive \"uint8\"\nprimitive \"uint64\"\n\n-- an optional value\nfunction optional(valueType)\n    local result = union {\n        kind = { \"union\", \"optional\" }\n        valueType,\n        null\n    }\n    return result\nend\n\nclass \"item\" {\n    uint64 \"id\",\n    string \"name\",\n    enum(uint8) \"category\" {\n        \"armor\",\n        \"weapon\",\n        \"ammo\",\n        \"consumable\",\n    }\n}\n\nclass \"player\" {\n    uint64 \"id\",\n    string \"name\",\n    tuple(float, float, float) \"position\",\n    array(3 * 9, optional(item)) \"inventory\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinitereality%2Fxinji","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffinitereality%2Fxinji","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinitereality%2Fxinji/lists"}