Meteor Kitchen - code generator for Meteor

Invitation for everyone: I wish if one “bad-ass” frontend designer can contribute - help me to design new kitchen-GUI!

(P.S. I cannot pay nothing in this moment… but you’ll get a lot of glory! :)).

3 Likes

News related to human2machine: program translates everyday English language to input file for meteor-kitchen and builds Meteor App or Android .apk online. Application is here: http://generator-human2machine.meteor.com

(build & download .apk takes 5 minutes sometimes on my $5 VPS, so be patient while building .apk... message is shown).

Enjoy! :smile:

Good luck @perak! The current one is also quite good. If you can improve it, that’s great!
The best thing is the json format config file. If somebody once finds the favourite structure for starting an application’s development, it’s 2 secs to create another skeleton, which is based on your favourite conf. And you can store your typical parts in separate files so you can just copy paste together a more complex app. Good idea with good execution :smile:

If the generator were in js, I guess you could find contributors here more easily.

Hi bvinel,
I m trying to set multilanguage in my project and struggling to have user to choose their prefered language,hope you have time to help out.
thks in advance
robert

@bobchatelain try to remove leading dot from .userLanguage

I did and worked perfectly. tks young man

hi perak,

I ,ve been looking to delete some users via admin panel ,no success,I might have screwed something,I ll appreciate any reply.thks and keep up the good work!
“click #delete-button”: function(e, t) {
e.preventDefault();
var me = this;
bootbox.dialog({
message: “Delete? Are you sure?”,
title: “Delete”,
animate: false,
buttons: {
success: {
label: “Yes”,
className: “btn-success”,
callback: function() {
Users.remove({ _id: me._id });
}
},
danger: {
label: “No”,
className: “btn-default”
}
}
});
return false;

@bobchatelain that doesn’t not work because is unsafe.

You can delete user only from server.

So, you should create deleteUser method, and from client call("deleteUser", userId).
In a method, check if user who called method is admin var caller = Users.findOne({ _id: this.userId }); if(caller.roles.indexOf("admin") < 0) throw new Meteor.Error(....

1 Like

Hi! Perak,

thanks for your hard work!

I have been playing around with Meteor Kitchen and frankly for beginner like me it is God sent to me.

I have an assignment that I am pretty much don’t know what to do, i.e. there’s a method that i have created and with to call the method when a button is clicked. The method essentially pull records from SQL server to mongo when user click a button. The SQL code is completed as meteor method.

how to achieve this within meteor kitchen itself? Or rather, how to tie the method to a button via meteor kitchen?

Hi @chiacy

Depending on how you defined a button. Is it one of automatically generated buttons in “dataview” or “form” components or you added custom html into page/component?

However, here is two ways:

  1. you can use custom_component - just add it into any of your pages or other components into components array:
{
    "name": "my_cool_button",
    "type": "custom_component",
    "html": "<template name=\"TEMPLATE_NAME\"><button class=\"my-cool-button\">Click me!</button></template>",
    "js": "Template.TEMPLATE_NAME.events({ \"click .my-cool-button\": function(e, t) { /* Do whatever you want here */ } });",
    "dest_selector": ""
}

Note: you can use “dest_delector” to define where to put this button inside parent’s DOM

  1. If you already have button defined in your page, you can set page’s events_code :
"events_code": "\"click .my-cool-button\": function(e, t) { /* do whatever you want here */ }"

That’s it - please let me know did you succeed.

Hi! Petar,

Thanks for the tips. I shall try and revert.

Thanks

Good news everyone: adding support for React into meteor-kitchen. Almost there! See screenshot and cheer for me! :wink:

5 Likes

Just to share excitement with you: first Meteor + React “hello word” application generated with “kitchen” is online! :slight_smile:

http://generator-react.meteor.com

New version of “Meteor Kitchen” capable of generating React code is not uploaded yet - still working on it…

Nobody excited? (only me? :smiley: )

3 Likes

I am trying something like:

a set of records in data_view component
where some records are editable and some are not

I am not sure if Meteor Kitchen can handle this?

Anyone who can enlighten me?

thanks in advance

@chiacy kitchen cannot generate dataview with inline editing. Data view is read-only and you can insert/edit data only by using forms. If you want inline editing, you’ll need to add that manually after you generate the app, or, you can create “custom_component”.

(the only exception here is “checkbox” - it appears in dataview and can be clicked, but that makes the things inconsistent, so maybe I’ll remove that functionality in the future). I need to crete new dataview component anyway - current one is little bit outdated (no “paged loading”, no multiselect, there is only " table" view style etc.)

Thanks Petar for prompt reply

Hi! Petar,

Sorry to trouble you again.

This time is tree component

I am trying to use an existing collection where fields include date, reference, job, amount where date is when the job is rendered, job is the name of given job, and amount is the fee.

How can I put up tree component by date, i.e. Date as folder and the rest of fields, or atleast one of the fields as item?

I cannot figure out whether collection needs to redesign, which is a big job, or I can keep existing collection schema, then what should I tell on item_name_field and item_type_field respectively

Thanks

Hi! Perak,

i was trying the query filter but not avail.

						"query_name": "jobs_list",
						"query_params": [
							{ "name": "date_from", "value": "2016-02-23" },
						],

in jobs_list query:

			"filter": {"service_date": { "$gt": ":date_from" }},

wonder what went wrong

Hi Perak!

Good Cool stuff !
I am still playing with examples, impressive.

Human2Machine is cool!

I tried Materialize example - beautiful on web.
Tried on Android Device - some tags show up on button - (Your site does say that its work in progress)

Like it very much!
Schh

1 Like