{"id":22678427,"url":"https://github.com/web2solutions/unicron-famd","last_synced_at":"2026-02-20T17:31:43.737Z","repository":{"id":149299692,"uuid":"85856469","full_name":"web2solutions/Unicron-FAMD","owner":"web2solutions","description":"Unicron FAMDS - Framework Agnostic Metadata standard for Data Schema","archived":false,"fork":false,"pushed_at":"2017-03-31T07:47:16.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-30T10:35:16.256Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"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/web2solutions.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-22T17:23:15.000Z","updated_at":"2017-03-23T21:46:47.000Z","dependencies_parsed_at":"2023-05-07T05:36:18.353Z","dependency_job_id":null,"html_url":"https://github.com/web2solutions/Unicron-FAMD","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/web2solutions/Unicron-FAMD","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web2solutions%2FUnicron-FAMD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web2solutions%2FUnicron-FAMD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web2solutions%2FUnicron-FAMD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web2solutions%2FUnicron-FAMD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/web2solutions","download_url":"https://codeload.github.com/web2solutions/Unicron-FAMD/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web2solutions%2FUnicron-FAMD/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29658373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T16:33:43.953Z","status":"ssl_error","status_checked_at":"2026-02-20T16:33:43.598Z","response_time":59,"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":[],"created_at":"2024-12-09T18:15:18.810Z","updated_at":"2026-02-20T17:31:43.720Z","avatar_url":"https://github.com/web2solutions.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"Unicron FAMDS  --- DRAFT\n================\n\nUnicron-FAMDS is a data definition schema which attempts to standardize data schema to be used in Front and Back end sofwate development.\n\nFAMDS stands for Framework Agnostic Medatadata standard for Data Schemas\n\nSee also:\n\n- [decepticons](https://github.com/web2solutions/decepticons)\n- [SDK](https://github.com/dhtmlx/unicron-sdk) to begin creating an application\n\n### Scenario\n\nDuring the process to create web-like softwares from the scratch, it is very commom the fact of `repeating yourself` when implementing models, data validation, REST and CRUD interfaces both on client and server side.\n\nOnce modern software development approaches encourage decoupled and interoperable software layers/services, it is trivial to find entire teams performing repetitive tasks on different layers which defines things like data access, data manipulation, data input/output, form interfaces, data validation, etc.\n\n\n### Problems\n\n#### Repetitive writing of very similar layer code, for the same application, which performs the same/similar task, for different environments (browser and server).\n\n- ***Data Models***\n\nExample:\n\n1 - writing Backbone code for models on client side\n2 - writing Mongoose code for models on server side\n\n- ***Data validation***\n\nExample:\n\n1 - Writing data validation logic for a REST end point which receives data submmited through a web form\n\n2 - writing the logic which will be used on client side, to validate the data input when submmiting the form.\n\n- ***User Interfaces***\n\nDefine similar component settings for different data components.\n\nFor example:\n\nLets suppose you are developing a CRUD interface for the `Customers` collection in your application.\nAt least in one moment, you will be repeating yourself in terms of writing similar codes when:\n\n1 - writing the fields properties and rules of a form, `to insert and update` data into the collection\n\n2 - define the columns properties and rules of a grid, `to list` data from the collection\n\n_Why I'm repeating myself if I'm writing settings code for different components?_\n\n*Because both components settings are based on the same data schema. Even if you don't have any kind of document or standard explicity defining that data schema.*\n\n#### Significant lost time and effort repeating tasks while starting every new application from the scratch\n\nAs you know, all above steps, but not least, are part of several softwares development life cycle. There is no way, you need to put your hands on and write from the scratch very similar code when building new applications.\n\nIf you build a `To Do` application, you will need to define models, data validation, form interfaces, REST interfaces, etc. \n\nAnd, if you build a `CRM` application, you will also need to define the same things as in the first case. The difference here, which is not relevant, is the complex/size of each application.\n\n### Solutions\n\nOur main problem consist in `to repeat yourself` in the software development life cycle. And the main solution, in resume, would be something which could implement `DRY` on the side of the software development life cycle.\n\nCertainly there are several software development methodologies and paradigms that can be used to achieve this.\n\nBut we would like to introduce the `metaprogramming` as base for our proposed solution.\n\n#### The FAMDS\n\nThe Framework Agnostic Medatadata standard for Data Schemas is not more than JSON structures which would define the entire application data model.\n\nA FAMDS metadata structure shall to be/contain:\n\n- Framework agnostic. It is a generic standard and shall to be useful to be used in any application development life cycle. It does not matter if you use any third party framework.\n- It define Data Collections\n- It defines Data models\n - It define model properties\n  - It defines property type\n  - It defines property validation\n- Provide model versioning\n\n\nLet's check the FAMD for a Petstore:\n\n```javascript\n{\n    \"title\": \"FAMD Sample App\",\n    \"description\": \"This is a sample Petstore.\",\n    \"termsOfService\": \"http://fake.io/terms\",\n    \"contact\": {\n        \"name\": \"Support Channel\",\n        \"url\": \"http://www.fake.io/contact\",\n        \"email\": \"me@fake.io\"\n    },\n    \"license\": {\n        \"name\": \"Apache 2.0\",\n        \"url\": \"http://www.apache.org/licenses/LICENSE-2.0.html\"\n    },\n    \"version\": \"0.0.1\",\n    \"collections\": {\n        \"pets\": {\n            \"title\": \"Pets\",\n            \"description\": \"Pets collection from the system\",\n            \"model\": {\n                \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n                \"title\": \"Pet\",\n                \"description\": \"Pet from the system\",\n                \"type\": \"object\",\n                \"pet\": {\n                    \"properties\": {\n                        \"name\": {\n                            \"title\": \"Name\",\n                            \"description\": \"The pet name\",\n                            \"type\": \"string\",\n                            \"default\": null,\n                            \"unique\": false,\n                            \"maxLength\": 255,\n                            \"minLength\": 4,\n                            \"maxItems\": 0,\n                            \"minItems\": 0,\n                            \"max\": 0,\n                            \"min\": 0,\n                            \"validate\": {\n                                \"required\": true,\n                                \"rules\": \"NotEmpty\"\n                            },\n                            \"ui\": {\n                                \"noteShow\": false,\n                                \"noteText\": \"the pet name\",\n                                \"mask\": \"\",\n                                \"form\": {\n                                    \"inputLabel\": \"Name\",\n                                    \"inputType\": \"input\"\n                                },\n                                \"grid\": {\n                                    \"columnHeader\": \"Name\",\n                                    \"columnAlign\": \"left\",\n                                    \"columnType\": \"readonly\",\n                                    \"columnWidth\": \"120px\"\n                                }\n                            }\n                        },\n                        \"status\": {\n                            \"title\": \"Active\",\n                            \"description\": \"The pet status in the system\",\n                            \"type\": \"string\",\n                            \"default\": null,\n                            \"unique\": false,\n                            \"maxLength\": 0,\n                            \"minLength\": 4,\n                            \"maxItems\": 0,\n                            \"minItems\": 0,\n                            \"max\": 0,\n                            \"min\": 0,\n                            \"validate\": {\n                                \"required\": true,\n                                \"rules\": \"NotEmpty\"\n                            },\n                            \"ui\": {\n                                \"noteShow\": false,\n                                \"noteText\": \"The pet status in the system\",\n                                \"mask\": \"\",\n                                \"form\": {\n                                    \"inputLabel\": \"Status\",\n                                    \"inputType\": \"checkbox\"\n                                },\n                                \"grid\": {\n                                    \"columnHeader\": \"Status\",\n                                    \"columnAlign\": \"center\",\n                                    \"columnType\": \"readonly\",\n                                    \"columnWidth\": \"120px\"\n                                }\n                            }\n                        }\n                    },\n                    \"relations\": {\n                        \"belongsTo\": {\n                            \"owner\": {\n                                \"localField\": \"owner\",\n                                \"localKey\": \"ownerId\"\n                            }\n                        }\n                    }\n                }\n            }\n        },\n        \"owners\": {\n            \"title\": \"Pets Owner\",\n            \"description\": \"Pets Owner collection from the system\",\n            \"model\": {\n                \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n                \"title\": \"Pet owner\",\n                \"description\": \"Pet owner from the system\",\n                \"type\": \"object\",\n                \"owner\": {\n                    \"properties\": {\n                        \"name\": {\n                            \"title\": \"Name\",\n                            \"description\": \"The pet's owner name\",\n                            \"type\": \"string\",\n                            \"default\": null,\n                            \"unique\": false,\n                            \"maxLength\": 255,\n                            \"minLength\": 4,\n                            \"maxItems\": 0,\n                            \"minItems\": 0,\n                            \"max\": 0,\n                            \"min\": 0,\n                            \"validate\": {\n                                \"required\": true,\n                                \"rules\": \"NotEmpty\"\n                            },\n                            \"ui\": {\n                                \"noteShow\": false,\n                                \"noteText\": \"the pet's owner name\",\n                                \"mask\": \"\",\n                                \"form\": {\n                                    \"inputLabel\": \"Name\",\n                                    \"inputType\": \"input\"\n                                },\n                                \"grid\": {\n                                    \"columnHeader\": \"Name\",\n                                    \"columnAlign\": \"left\",\n                                    \"columnType\": \"readonly\",\n                                    \"columnWidth\": \"120px\"\n                                }\n                            }\n                        },\n                        \"status\": {\n                            \"title\": \"Active\",\n                            \"description\": \"The owner status in the system\",\n                            \"type\": \"string\",\n                            \"default\": null,\n                            \"unique\": false,\n                            \"maxLength\": 0,\n                            \"minLength\": 4,\n                            \"maxItems\": 0,\n                            \"minItems\": 0,\n                            \"max\": 0,\n                            \"min\": 0,\n                            \"validate\": {\n                                \"required\": true,\n                                \"rules\": \"NotEmpty\"\n                            },\n                            \"ui\": {\n                                \"noteShow\": false,\n                                \"noteText\": \"The owner status in the system\",\n                                \"mask\": \"\",\n                                \"form\": {\n                                    \"inputLabel\": \"Status\",\n                                    \"inputType\": \"checkbox\"\n                                },\n                                \"grid\": {\n                                    \"columnHeader\": \"Status\",\n                                    \"columnAlign\": \"center\",\n                                    \"columnType\": \"readonly\",\n                                    \"columnWidth\": \"120px\"\n                                }\n                            }\n                        }\n                    },\n                    \"relations\": {\n                        \"hasMany\": {\n                            \"pet\": {\n                                \"localField\": \"pets\",\n                                \"foreignKey\": \"ownerId\"\n                            }\n                        }\n                    }\n                }\n            }\n        }\n    }\n}\n\n```\n\n##### Data types\n\n##### Commom data types\n\n| Common Name | type    | format    | Comments                                         |\n|-------------|---------|-----------|--------------------------------------------------|\n| integer     | integer | int32     | signed 32 bits                                   |\n| long        | integer | int64     | signed 64 bits                                   |\n| float       | number  | float     |                                                  |\n| double      | number  | double    |                                                  |\n| string      | string  |           |                                                  |\n| byte        | string  | byte      | base64 encoded characters                        |\n| binary      | string  | binary    | any sequence of octets                           |\n| boolean     | boolean |           |                                                  |\n| date        | string  | date      | As defined by full-date - RFC3339                |\n| dateTime    | string  | date-time | As defined by date-time - RFC3339                |\n| password    | string  | password  | Used to hint UIs the input needs to be obscured. |\n\n\n##### Commom Validation rules\n\n| Name                | Comments                                                 |\n|---------------------|----------------------------------------------------------|\n| empty               | must be empty; will be ignored if property is required   |\n| notEmpty            | must contain at least one symbol;                        |\n| validAplhaNumeric   |                                                          |\n| validBoolean        | can contain one of 4 values: 'true', 'false', 0 or 1;    |\n| validCurrency       |                                                          |\n| validDate           | (value from 0000-00-00 to 9999-12-31);                   |\n| validDatetime       | (value from 0000-00-00 00:00:00 to 9999:12:31 59:59:59); |\n| validEmail          |                                                          |\n| validInteger        |                                                          |\n| validIPv4           | (value from 0.0.0.0 to 255.255.255.255);                 |\n| validNumeric        |                                                          |\n| validSIN            | (Social Insurance Number);                               |\n| validSSN            | (Social Security Number);                                |\n| validTime           | (value from 00:00:00 to 59:59:59);                       |\n| validFloat          |                                                          |\n| validCreditCard     |                                                          |\n| validExpirationDate | (Credit card expiration date - MM/YY);                   |\n\n\n#### Automated software development tools\n\n\n##### RAD, CASE \u0026 Scaffold - Generate normalized code instead writing\n\n- Data models logic - client side and server side\n- Validation logic - client and server side\n- Data access rules - client and server side\n- Component settings\n- CRUD interfaces\n- REST end points\n- Swagger\n- Framework-agnostic, datastore-agnostic JavaScript ORM\n\t\n\n\n\n##### Visual FAMD editor\n\n![Automated software development diagram](http://i.imgur.com/HINi6PD.jpg)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb2solutions%2Funicron-famd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb2solutions%2Funicron-famd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb2solutions%2Funicron-famd/lists"}