{"id":13548891,"url":"https://github.com/node4good/formage","last_synced_at":"2025-04-05T16:03:19.798Z","repository":{"id":6387397,"uuid":"7625072","full_name":"node4good/formage","owner":"node4good","description":"Bootstraped Admin GUI addon for mongoose, jugglingdb, or just as a form generator","archived":false,"fork":false,"pushed_at":"2023-09-06T12:10:57.000Z","size":6472,"stargazers_count":185,"open_issues_count":48,"forks_count":51,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-29T05:35:26.583Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"formage.io","language":"JavaScript","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/node4good.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}},"created_at":"2013-01-15T13:15:42.000Z","updated_at":"2024-09-23T10:32:52.000Z","dependencies_parsed_at":"2024-01-19T06:55:57.151Z","dependency_job_id":"f83f5804-ca36-4cd1-bee4-baf28780a865","html_url":"https://github.com/node4good/formage","commit_stats":{"total_commits":1067,"total_committers":21,"mean_commits":50.80952380952381,"dds":"0.23617619493908149","last_synced_commit":"9a6f4b6478402050940262507034b4545a2b4bbf"},"previous_names":["empeeric/formage-admin"],"tags_count":223,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node4good%2Fformage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node4good%2Fformage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node4good%2Fformage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node4good%2Fformage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/node4good","download_url":"https://codeload.github.com/node4good/formage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247361593,"owners_count":20926641,"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-08-01T12:01:15.698Z","updated_at":"2025-04-05T16:03:19.762Z","avatar_url":"https://github.com/node4good.png","language":"JavaScript","readme":"# \u003cimg src=\"http://i.imgur.com/9vVHCPY.png\" align=\"top\" /\u003e Formage \n\n[Bootstraped](http://twitter.github.com/bootstrap/) Admin GUI addon for [Mongoose](http://mongoosejs.com/), [JugglingDB](https://github.com/1602/jugglingdb), or just as a form generator.\nOriginally forked from [mongoose-admin](https://github.com/marccampbell/mongoose-admin).\n\n[![Build Status](https://travis-ci.org/node4good/formage.png?branch=master \"Build Status\")](https://travis-ci.org/node4good/formage) \n\n[![NPM](https://nodei.co/npm-dl/formage.png)](https://nodei.co/npm/formage/)\n\n## Example Usage\n```js\nvar express = require('express'),\n    app = express();\n\nrequire('formage').init(app, express, models);\n```\n\nLook at the `\\example` directory.\n\n### Options\n```js\n// Site-wide options, and their default values\nrequire('formage').init(app, express, models, {\n    title: 'Admin',\n    root: '/admin',\n    default_section: 'main',\n    username: 'admin',\n    password: 'admin',\n    admin_users_gui: true\n});\n```\n\n#### Model options\n```js\nvar model = new mongoose.model('songs', schema);\n\n// external files specific to this model\nmodel.header_lines = [\n   '\u003cscript src=\"/js/songs.js\"\u003e\u003c/script\u003e',\n   '\u003cstyle href=\"/css/songs.css\"\u003e\u003c/style\u003e'\n];\n\nmodel.formage = {\n    // one-document models\n    is_single: true,\n\n    // labels\n    label: 'My Songs',\n    singular: 'Song',\n\n    filters: ['artist', 'year'],\n\n    // additional actions on this model\n    actions: [\n       {\n          id: 'release',\n          label: 'Release',\n          func: function (user, ids, callback) {\n             console.log('You just released songs ' + ids);\n             callback();\n          }\n       }\n    ],\n\n    // list of fields to be displayed by formage for this model\n    list: ['number', 'title', 'album', 'artist', 'year'],\n    \n    // order documents, save order in this field (type: Number)\n    sortable: 'order',\n\n    // list of order fields\n    order_by: ['-year', 'album', 'number'],\n\n    // list of fields that must be populated\n    // (see http://mongoosejs.com/docs/api.html#document_Document-populate)\n    list_populate: ['album'],\n\n    // list of fields on which full-text search is available\n    search: ['title', 'album', 'artist']\n};\n```\n\n#### Fields\nFormage comes with the following built-in fields,\nbut [custom fields](https://github.com/Empeeric/formage/wiki/Custom-Fields) can be written if needed.\n- String\n- Boolean\n- Number\n- Date\n- Time\n- Enum ([select2](http://ivaynberg.github.io/select2/))\n- Ref ([select2](http://ivaynberg.github.io/select2/))\n- Text (`\u003ctextarea\u003e`)\n- HTML ([ckeditor](http://ckeditor.com/))\n- FilePicker ([File Picker](https://www.inkfilepicker.com/))\n- Picture ([File Picker](https://www.inkfilepicker.com/))\n- GeoPoint ([Google Maps](https://maps.google.com/))\n\nYou can pass options to the underlying fields and widgets:\n```js\nvar schema = new mongoose.Schema({\n    artist: { type: String, label: 'Who made it?' },\n    location: { type: Schema.Types.GeoPoint, widget_options: { lang: 'nl' }}\n});\n```\n(The map widget lang setting is a two-letter [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code.)\n\n#### Hmm\n- [Extend formage with your custom field](https://github.com/Empeeric/formage/wiki/Custom-Fields)\n- [Embed a formage form outside of the admin](https://github.com/Empeeric/formage/wiki/Outing-Formage-Form)\n\nLicense\n-------\nMIT\n\nSponsor\n--------\n\u003ca id=\"stormlogo\" href=\"http://www.jetbrains.com/webstorm/\" alt=\"Smart IDE for web development with HTML Editor, CSS \u0026amp; JavaScript support\" title=\"Smart IDE for web development with HTML Editor, CSS \u0026amp; JavaScript support\"\u003e\n  ![](http://i.imgur.com/ynQ6c.png)\n\u003c/a\u003e\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode4good%2Fformage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnode4good%2Fformage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode4good%2Fformage/lists"}