{"_id":"10tcl","_rev":"24-8edcba1db9c14d02b314669bfffeaa56","name":"10tcl","description":"CRUD over express and mongodb","dist-tags":{"latest":"0.0.10"},"versions":{"0.0.1":{"name":"10tcl","description":"CRUD over express and mongodb","version":"0.0.1","author":{"name":"Fernando Becker","email":"fernandobbecker@gmail.com"},"dependencies":{"express":"3.0","mongoskin":"0.3.6","mustache":"*","jade":"*","sugar":"1.3.0"},"keywords":["10tcl","tentacle","web","app","crud"],"repository":{"type":"git","url":"git://github.com/superpeixeboi/10tcl.git"},"main":"index","engines":{"node":"*"},"_id":"10tcl@0.0.1","dist":{"shasum":"17eb35d7273abcdbb5dc8d3b714e2569d1ce7027","tarball":"https://registry.npmjs.org/10tcl/-/10tcl-0.0.1.tgz","integrity":"sha512-wDWgTuWHK9Ld3w/d7qi1svgzAPypnMtc/2UOwFAN3I9uDnPuGIF3dCfFUJM4l8kOnzoNIrYfFyscXxat3sWg8Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGMsL90W9KSRqwklAP7yS4bjJvG7yjIO+nMcrHa1OZmaAiEA9W+ACzm2QveMKgW33eP41MIX8EkylthtE7c+Q5zCyfo="}]},"maintainers":[{"name":"fernandobecker","email":"fernandobbecker@gmail.com"}],"deprecated":"bad ideas, bad implementation, shutting this down, starting a new one"},"0.0.2":{"name":"10tcl","description":"CRUD over express and mongodb","version":"0.0.2","author":{"name":"Fernando Becker","email":"fernandobbecker@gmail.com"},"dependencies":{"express":"3.0.x","mongoskin":"0.3.x","mustache":"*","jade":"*","sugar":"1.3.x"},"keywords":["10tcl","tentacle","web","app","crud"],"repository":{"type":"git","url":"git://github.com/superpeixeboi/10tcl.git"},"main":"index","engines":{"node":"*"},"_id":"10tcl@0.0.2","dist":{"shasum":"f9acc4ed98c1a6e967a46cf54bebbecbab4c9412","tarball":"https://registry.npmjs.org/10tcl/-/10tcl-0.0.2.tgz","integrity":"sha512-wc7bw+19ATdCv6WO6QGm3+Zlb/grzeNzR73Dnr3dOdNPexJGrluTdqCdLOeBkuBHDdU7lteWkJtjxUzFbk9NUw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0z0LJB2hCxWbwIfkOfJ9mPKUL52dhpZS/vCQA4QQumwIhALxXxsTIf3M+tWW3uhL8USsHTR5A0OM09soQ+zXxqWB2"}]},"maintainers":[{"name":"fernandobecker","email":"fernandobbecker@gmail.com"}],"deprecated":"bad ideas, bad implementation, shutting this down, starting a new one"},"0.0.3":{"name":"10tcl","description":"CRUD over express and mongodb","version":"0.0.3","author":{"name":"Fernando Becker","email":"fernandobbecker@gmail.com"},"dependencies":{"express":"3.0.x","mongoskin":"0.3.x","mustache":"*","jade":"*","sugar":"1.3.x","less":"*","less-middleware":"*"},"keywords":["10tcl","tentacle","web","app","crud"],"repository":{"type":"git","url":"git://github.com/superpeixeboi/10tcl.git"},"main":"index","engines":{"node":"*"},"_id":"10tcl@0.0.3","dist":{"shasum":"43e47f83f95b92d3233ba421903a050696f89a22","tarball":"https://registry.npmjs.org/10tcl/-/10tcl-0.0.3.tgz","integrity":"sha512-qkerkG3XdqJS7kP5zBuZVYESOkAKVKPJ0DaOsZoSI5VJ2elSBzCfacnS6CsMJ1JgznBQP+UCl5dqueXkq0vKzA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZtStV2wcjRGuUkQeY9SIGvvcrtWdhhx8Jnf3igOr0XgIgEvS0JVT1yHMaJcxviRFhVmx0XmQT6brvL5OuRXHib/4="}]},"maintainers":[{"name":"fernandobecker","email":"fernandobbecker@gmail.com"}],"deprecated":"bad ideas, bad implementation, shutting this down, starting a new one"},"0.0.4":{"name":"10tcl","description":"CRUD over express and mongodb","version":"0.0.4","author":{"name":"Fernando Becker","email":"fernandobbecker@gmail.com"},"dependencies":{"express":"3.0.x","mongoskin":"0.3.x","mustache":"*","jade":"*","sugar":"1.3.x","less":"*","less-middleware":"*"},"keywords":["10tcl","tentacle","web","app","crud"],"repository":{"type":"git","url":"git://github.com/superpeixeboi/10tcl.git"},"main":"index","engines":{"node":"*"},"_id":"10tcl@0.0.4","dist":{"shasum":"4e4b549a8bde59f35b8502de54a6790c767e75b4","tarball":"https://registry.npmjs.org/10tcl/-/10tcl-0.0.4.tgz","integrity":"sha512-Vb3+voe4dIcbaI3iCU9PfP2k4nBZXzD6jEQD4fdDvxZos7qYBTlSSmoJOlC+JNAbfwg/S/Dd+YgagO8hbBRx4Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUuPCCqIgKAG72dOtfzUAoX2vO93f+IgXQ6BztbBjnGQIhAP8LFrMfjT+Y8kH/YEoRpZzDa03aYiflgVV4vhJnNhfe"}]},"maintainers":[{"name":"fernandobecker","email":"fernandobbecker@gmail.com"}],"deprecated":"bad ideas, bad implementation, shutting this down, starting a new one"},"0.0.5":{"name":"10tcl","description":"CRUD over express and mongodb","version":"0.0.5","author":{"name":"Fernando Becker","email":"fernandobbecker@gmail.com"},"dependencies":{"express":"3.0.x","mongoskin":"0.3.x","mustache":"*","jade":"*","sugar":"1.3.x","less":"*","less-middleware":"*"},"keywords":["10tcl","tentacle","web","app","crud"],"repository":{"type":"git","url":"git://github.com/superpeixeboi/10tcl.git"},"main":"index","engines":{"node":"*"},"_id":"10tcl@0.0.5","dist":{"shasum":"ae2af1cab7366a5005a59be4b907ac3abdaedcb5","tarball":"https://registry.npmjs.org/10tcl/-/10tcl-0.0.5.tgz","integrity":"sha512-QE456B+wFQHZ4LUy/PnPLK0SL07As/qwBkl+/i3HTRG3xwS0+8RoRnd6RWQP3REHYJRqXk6GAAX7ozM/TWfSvA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHlH5Iymft9Lt422quFx0f8DKsaav7MbLiZFehvxfL+jAiEAtmLdyDdmumMgD7tNa/PNJxU9qCpKcT0fvJq9rqaLFAI="}]},"maintainers":[{"name":"fernandobecker","email":"fernandobbecker@gmail.com"}],"deprecated":"bad ideas, bad implementation, shutting this down, starting a new one"},"0.0.6":{"name":"10tcl","description":"CRUD over express and mongodb","version":"0.0.6","author":{"name":"Fernando Becker","email":"fernandobbecker@gmail.com"},"dependencies":{"express":"3.0.x","mongoskin":"0.3.x","mustache":"*","jade":"*","sugar":"1.3.x","validator":"0.4.x","less":"*","less-middleware":"*"},"keywords":["10tcl","tentacle","web","app","crud"],"repository":{"type":"git","url":"git://github.com/superpeixeboi/10tcl.git"},"main":"index","engines":{"node":"*"},"_id":"10tcl@0.0.6","dist":{"shasum":"f72c0841a1dc54400f8923ad9921ee27773a5737","tarball":"https://registry.npmjs.org/10tcl/-/10tcl-0.0.6.tgz","integrity":"sha512-9UJSFk7bu3QCQulzf1z7ZgiOXDEOW2N5YyTvXtqWce01J43b/5IC+eZt3rz4xWKreiB5Te7hhgP9DiFvE7etaA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2eYU/mtK2LOe+mDzFSyWRo9emOoj1nOLmzUNXPR75AQIgfHxh088EYjAHCxarBSwqEUFF1qeq1YjpX3dZXrQ/uLo="}]},"maintainers":[{"name":"fernandobecker","email":"fernandobbecker@gmail.com"}],"deprecated":"bad ideas, bad implementation, shutting this down, starting a new one"},"0.0.7":{"name":"10tcl","description":"CRUD over express and mongodb","version":"0.0.7","author":{"name":"Fernando Becker","email":"fernandobbecker@gmail.com"},"dependencies":{"express":"3.0.x","mongoskin":"0.3.x","mustache":"*","jade":"*","sugar":"1.3.x","validator":"0.4.x","less":"*","less-middleware":"*"},"keywords":["10tcl","tentacle","web","app","crud"],"repository":{"type":"git","url":"git://github.com/superpeixeboi/10tcl.git"},"main":"index","engines":{"node":"*"},"_id":"10tcl@0.0.7","dist":{"shasum":"afcc2aff3fb1a965f40a3858a1812d33fe15b6c5","tarball":"https://registry.npmjs.org/10tcl/-/10tcl-0.0.7.tgz","integrity":"sha512-SChL7AXNMPvhggEFh2HPTSxKbwZb5PgtbDDqi9rjQwsofe1UMbcZae2mHUzr4FAh/MYhRjHAWC21ZaemucYEjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDVZx5cOXtQcVH0TWFzRW3nTaSPDsfV/epi29VQFM8ZEAiEA1mbvt83++e6Fx5PhovME4kayUQWqF9Q6mpSTupavCyk="}]},"maintainers":[{"name":"fernandobecker","email":"fernandobbecker@gmail.com"}],"deprecated":"bad ideas, bad implementation, shutting this down, starting a new one"},"0.0.8":{"name":"10tcl","description":"CRUD over express and mongodb","version":"0.0.8","author":{"name":"Fernando Becker","email":"fernandobbecker@gmail.com"},"dependencies":{"express":"3.0.x","mongoskin":"0.3.x","mustache":"*","jade":"*","sugar":"1.3.x","validator":"0.4.x","less":"*","less-middleware":"*"},"keywords":["10tcl","tentacle","web","app","crud"],"repository":{"type":"git","url":"git://github.com/superpeixeboi/10tcl.git"},"main":"index","engines":{"node":"*"},"_id":"10tcl@0.0.8","dist":{"shasum":"b948abe9ff0ec82ebf68c9769f01593bda7c903f","tarball":"https://registry.npmjs.org/10tcl/-/10tcl-0.0.8.tgz","integrity":"sha512-P/al58jECXN4ZHcI7lN0BPfAViVF1JakYHOYF7pYPKgk+bmbRtTGp/DAkPTNcEJve/OINUO2xO/x0iPesOUr8A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC887HVnDmqmGlfX7r/DWISlO4cfT/Xh7OcVPwZMSg1MQIhAKAEidSl+XoJUQetdJfWFCUR2jt4u7Wtwl4PCWVxPuZ2"}]},"maintainers":[{"name":"fernandobecker","email":"fernandobbecker@gmail.com"}],"deprecated":"bad ideas, bad implementation, shutting this down, starting a new one"},"0.0.9":{"name":"10tcl","description":"CRUD over express and mongodb","version":"0.0.9","author":{"name":"Fernando Becker","email":"fernandobbecker@gmail.com"},"dependencies":{"express":"3.0.x","mongoskin":"0.3.x","mustache":"*","jade":"*","sugar":"1.3.x","validator":"0.4.x","less":"*","less-middleware":"*"},"keywords":["10tcl","tentacle","web","app","crud"],"repository":{"type":"git","url":"git://github.com/superpeixeboi/10tcl.git"},"main":"index","engines":{"node":"*"},"_id":"10tcl@0.0.9","dist":{"shasum":"f669efc5a228773fe67effc81e06b5e31b4303a8","tarball":"https://registry.npmjs.org/10tcl/-/10tcl-0.0.9.tgz","integrity":"sha512-Uti3hgJ+P++1xcr2OtefOwUHfq7jl/KK5QrIKK/xoqBEOWEhpv6tePB6J2dY+1jMxTnnrtEi/LaABIh2N7QL6w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGNZS3u/7kCRiCKo3j3zgqH0sf4lGD6mWh5maaflnkZnAiA1aqFIBV1xs2cqSq4qvWB+9Mw5wDQKQjz+DlXQ2ULbTQ=="}]},"maintainers":[{"name":"fernandobecker","email":"fernandobbecker@gmail.com"}],"deprecated":"bad ideas, bad implementation, shutting this down, starting a new one"},"0.0.10":{"name":"10tcl","description":"CRUD over express and mongodb","version":"0.0.10","author":{"name":"Fernando Becker","email":"fernandobbecker@gmail.com"},"dependencies":{"express":"3.0.x","mongoskin":"0.3.x","mustache":"*","jade":"*","sugar":"1.3.x","validator":"0.4.x","less":"*","less-middleware":"*"},"keywords":["10tcl","tentacle","web","app","crud"],"repository":{"type":"git","url":"git://github.com/superpeixeboi/10tcl.git"},"main":"index","engines":{"node":"*"},"_id":"10tcl@0.0.10","dist":{"shasum":"322c5c2f751b82ae760f84818efa8d68dc6e5ed1","tarball":"https://registry.npmjs.org/10tcl/-/10tcl-0.0.10.tgz","integrity":"sha512-UsqyvUwepYdreEOPahmnuFwyiLyWmQNgybIR2NDUrXzLodcoy6dfrzMx8Utzm9ryo5sVnmT858unZP1QZs2K1g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDUGf3br3c62BpdvLLSBqKrLRrA58luKNAwLTPzpGzpQIhANrZPYNRXUlJGxpW+EYdk0Pg24qgqMv2wevYEOGIcacu"}]},"maintainers":[{"name":"fernandobecker","email":"fernandobbecker@gmail.com"}],"deprecated":"bad ideas, bad implementation, shutting this down, starting a new one"}},"readme":"## What is it?\n\n10tcl is a CRUD plugin that will add default routes to your express app, that read and store data in your mongodb.\n\n## How is it?\n\nIt works! ...mostly.\nRight now I could not recommend it. Give it a few months before serious usage.\nIt has some limitations and misconceptions, and it is not getting better soon.\n\n## Install\n\n    $ npm install 10tcl\n\n## Config\n\nA config file must contain:\n    \n    module.exports = {\n        // used as title for your pages\n        brand: 'Day of the Tentacle IS HERE!',\n        // used to assemble the connection string to your mongodb instance\n        db: { \n            usr: 'Purple',\n            pwd: 'Tentacle',\n            srv: 'ds044356.mongolab.com:49842',\n            db:  'day_of_the_tentacle',\n            par: 'auto_reconnect'\n        },\n        // static admin user to allow first login\n        admin: { usr: 'admin', pwd: 'ElGranSecreto', name: 'Admin', role: 'admin'}\n        // __dirname of your root\n        root: root, \n        // if not informed it defaults to 'root/models', 'root/controllers' and 'root/views'\n        pathToCtrls: '/app/controllers',\n        pathToModels: '/app/models',\n        pathToViews: '/app/views',\n        pathToValidator: 'app/models/validator'\n    }\n    \n## Use\n\n    // __dirname will be the root to locate folders indicated in pathTo... properties\n    var app = require('10tcl').attack(__dirname, '/config/yourConfigFile')\n    app.listen(yourPortHere)\n\n10tcl attack results in an express app configured with routes based on your models and controllers.\n\n### Database\n\napp.db contains a connection to your database.\nIt was done by using Mongoskin and the credentials on the config object.\n\n### Controllers\n\nEvery .js file under your controllers folder was required, receiving (app, base, config).\n\nAn example of controller file would be:\n\n    module.exports = function(app, base, config){\n\n        function hello(req, res){\n            res.send('hello world')\n        }\n\n        app.get('/hello', base.auth, hello )\n\n        // will be used to create a menu\n        return {name: 'hello', label: 'Hello World'}\n\n    }\n\n### Models\n\nEvery .js file under your models folder was required as well, no arguments.\nEach binded to app.db by the model.name property, so now app.db[modelNameHere] points to a collection capable of restfull crud.\n\nAn example of model would be:\n\n    module.exports = {\n        // model and db collection name\n        name: 'victims',\n        // Title for pages and menu\n        label: 'Victims',\n        // used with mustache to format list and drop down descriptions \n        format: 'Victim {{name}} {{lastName}}',\n        // fields to format and forms (see next topic)\n        fields: [\n            { name: 'name', label: 'Nome', type: 'string', checks: ['hasValue'] },\n            { name: 'lastName', label: 'Sobrenome', type: 'string' }\n        ],\n        // create route '<your-site>.com/victims' pointing to 10tcl CRUD\n        routeTo10tcl: true,\n        // read the entire collection into the app, changes it before persisting\n        keepInCache: true,\n        // restrict access to users with one of these roles\n        onlyFor: ['admin'],\n        // used if you run 'node myApp.js mock'\n        mock: [\n            {name: 'Mussum', _id: '508e0077d42bd6182f000001'},\n            {name: 'Zacarias', _id: '508e0077d42bd6182f000002'},\n            {name: 'Dedé', lastname: 'Santana', _id: '508e0077d42bd6182f000003'},\n            {name: 'Didi', lastname: 'Mocó', _id: '508e0077d42bd6182f000004'}\n        ]\n    }\n\n### Field types\n\n10tcl understands: string, number, email, tel, date, html, text, reference (type: 'reference', to: 'criminal')\nEach will result in a different html element and layout.\nA field type different from the above will result in a regular input field.\n\n### Validation\n\n10tcl modelValidator provides type associated checks, that are automatically executed on POST/PUT transactions.\nOther than that, a field can contain a property checks: ['hasValue', ...]\nEach string in checks array will trigger the correspondent function of the modelValidator.\nDefining pathToValidator, you can implement your own validator that will be required instead of the 10tcl one.\n\n### Users\n\nUser and Profile are pre-loaded models that provide access control.\nThe config property \"admin\" provides a proto user for the first login.\n\n### i18n\n\nNop... sorry.\nAnd I'm outputting static texts in PT-BR.\nNot happy with any package I've tried.\nWant to keep texts in a cached db for online editing and translation.\n\n### CRUD\n\nThe views are made with bootstrap, jquery, and some home-made binding (Angular was just making me angry).\nIn mobile they are much simpler, made with jquerymobile and jquery.\nThe decision between mobile and desktop is made by reading request headers.","maintainers":[{"name":"fernandobecker","email":"fernandobbecker@gmail.com"}],"time":{"modified":"2022-06-12T14:05:30.455Z","created":"2012-11-27T16:37:47.769Z","0.0.1":"2012-11-27T16:37:50.354Z","0.0.2":"2012-11-29T19:28:42.792Z","0.0.3":"2012-11-29T20:01:33.274Z","0.0.4":"2012-11-29T20:48:22.004Z","0.0.5":"2012-12-02T00:47:08.316Z","0.0.6":"2012-12-05T03:12:47.863Z","0.0.7":"2012-12-05T21:25:06.925Z","0.0.8":"2012-12-10T04:42:51.623Z","0.0.9":"2012-12-14T01:28:16.292Z","0.0.10":"2013-02-13T12:42:39.137Z"},"author":{"name":"Fernando Becker","email":"fernandobbecker@gmail.com"},"repository":{"type":"git","url":"git://github.com/superpeixeboi/10tcl.git"},"keywords":["10tcl","tentacle","web","app","crud"],"readmeFilename":""}