Meteor Kitchen - code generator for Meteor

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

Update

Meteor kitchen now can build React application (from existing input .json file - it’s backward compatible). Not fully implemented yet, but simple applications can be built (like example-minimal, example-subpages and example-accounts).

Work is in progress…

Enjoy! :slight_smile:

3 Likes

Thank you for the amazing code generator. I like it a lot. I have a few questions based on another post of mine:

(I’ve taken a look at the code generated but would love more details than I can see)

  1. I guess by “default” Meteor doesn’t work with a typical RESTful API methodology. Can you explain your thoughts on this? I guess you are generating client side routing (which I assume it typical in a standard Meteor application).

  2. It looks like you have generated client side validations. I guess this goes to my question #1. So if I build in a RESTFul API I should probably either move (or duplicate) that those validations on the server…right?

  3. It looks like your list view (datatable) is hand made (not a package). What are your thoughts on generating in a more robust datatable? For example I like autocomplete on the search.

Again Meteor Kitchen is quite impressive and I’m just trying to wrap my head around what it does and how I typically would have an application.

Thanks in advance!

@afrankel

  1. You can implement RESTful API with Meteor with server side routes. Meteor Kitchen can do that too, see application object’s server_side_routes member and “example-human2machine” using it: https://github.com/perak/kitchen-examples/blob/master/example-human2machine/example-human2machine.json#L96

  2. You can generate SimpleSchema (see application object’s use_collection2 member. It will do server-side validation for you.

  3. “DataView” component is not a “best practice” (one of first components I made for meteor-kitchen while I was still learning Meteor), but good thing with it (compared to packaged component) is that you have code for each dataview and you can customise it manually. However, plan is to refactor old components (also “form” component) and to add React versions too.

I’m currently working on a new (and this time useful) GUI. I will publish sneak-peek video tomorrow, and as soon as I publish new GUI, plan is to continue improving generated code for Blaze and implement missing components for React.

:vulcan:

2 Likes

New GUI - preview video

3 Likes

This looks great. Since you are certainly more familiar with “standards” in Meteor (directory structure, patterns, etc) is there anything in the code you currently generate that you would like to improve on or change? i.e., I see different patterns for folder structure that people suggest and I see different routers used (iron vs flow) in various github projects.

Also is there a project in github that was started with the generator and then built upon to a complete application?

How many meteor projects - that many different directory structures. :slight_smile:

Directory structure that meteor-kitchen generates is my personal preference (and lasts from ancient times when meteor was 0.5 beta), so I suggest you to use Meteor guide: http://guide.meteor.com/structure.html#javascript-structure
if you decide to go with React then consider Mantra specs https://kadirahq.github.io/mantra/

One more thing: no matter how you organize your directories, it will work - you just need to take attention to file loading order.

I am freelancer and I was working on many projects - in every project directory structure was different. It’s OK, principle is the same. Problem is routine - e.g. you are trying to find router.js here, but it is somewhere else… eats some time.

P.S. I got plans to add “generator hooks” to meteor-kitchen, so it will execute external .js file for each action it perfoms giving you chance to override default actions. For example “onDirectoryStructure” event will be executed in moment when kitchen wants to create directories giving you chance to override defaults, so it will be much more “customisable”. But, that will be after I publish latest GUI and implement all react components…

warning! important reading here:

1 Like

Hey! can you tell us when new Meteor Kitchen will be announced? I see that you haven’t given any updates on whats going on since the last month. I am eager to meet new version.

@bookbipii sorry, I’m busy with my regular job and private things, so my wishes to launch new gui from june 1st didn’t work. My next “wish” is from aug 1st (and that’s also my birthday :slight_smile: ).

But, kitchen is not sleeping, I added some important features into CLI (wil be published in next few days) like: it detects manualy edited files on next run so it asks do yo you want to overwrite (with plan to add option to merge), removes garbage files e.g. if you delete or rename some page, new CLI removes that files (old CLI just leaves “garbage”). And more…

Also, a lot of features are added into new GUI since I recorded video. And I am talking with company who will possibly offer hosting for apps generated in the cloud (similar to now dead “meteorpad”).

You can expect really cool tool for rapid building meteor apps in the cloud, so stay tuned! :sunny:

2 Likes

@perak any clues on how to make meteor kitchen do server-side rendering like https://github.com/arunoda/hello-react-meteor or https://github.com/kadira-samples/meteor-data-and-react ?

I’m playing around with A-Frame (Virtual Reality) and decided to add support into Meteor Kitchen.

Just uploaded latest Meteor Kitchen v0.9.70 and it can produce minimal Meteor application with React + FlowRouter + A-Frame.

Example app is 26 lines of code: https://github.com/perak/kitchen-examples/blob/master/example-aframe-iss/example-aframe-iss.json

And here is live example: http://example-aframe-iss.meteorfarm.com/

(International Space Station mini tour).

I know it’s not beautiful and not very useful but it’s VR app with 26 LOC :slight_smile:

1 Like

New GUI is now online https://www.meteorkitchen.com

Not fully finished yet, but today I simply decided to put it online - it’s less or more stable now.

It’s my side / hobby project and I’m moving slowly - I hope Meteor will survive until I add all planned features :smiley:

Enjoy!
:slight_smile:

3 Likes

will do! great job @perak ! can it use react router?

When I started adding “generate react code” feature there was no react router yet (or I didn’t know for it), so it is using FlowRouter. sometimes technology borns and dies before I finish implementing it :smile: But definitely react router is must have, so it’s on my roadmap. I cannot promise when.

2 Likes

Hi perak, your Kitchen tool is fantastic!
I am well on my way to planning out the feature list for our web application and once published will be regularly donating to you for your efforts.
I do need to ask you for guidance/clarification on two points that are puzzling me, I have tried various methods before asking you, but i’m not getting anywhere with it :slight_smile:
I welcome you to look at my repository “fireball” in my Kitchen account “magoomby”:

  1. In databases, the ‘events’ collection, I have the fields ‘disciplines’ and ‘state’, each of which is populated by referencing the ‘lookup’ collection by key. I have a query called ‘lookup_single’ that is used by both fields and I use Kitchen’s ‘lookup query params’ to specify 'keys':'discipline' and 'keys':'states' . PROBLEM: when I build the app, both of the fields are populated with disciplines… it’s using the first query for both SELECT fields. What am I doing wrong?
  2. With these same SELECT fields, I wanted to utilise the display helper to resolve the value back into the title of the selected items. PROBLEM: When I enter in a helper name for one of the fields in the collection… none of the ‘helper’ code blocks that I put the function in resolve/found. Where do I put a helper function for a collection field display helper?

I appreciate your time and am looking forward to contributing donations, help or code where possible.
Sean.

Hi @magoomby

Sorry for late answer… best way to ask questions like this is to create issue here: https://github.com/perak/kitchen-site/issues

It’s hard to answer/solve issue this way. Please give me example code (example .json input file, or give me link to the project if you are using kitchen GUI), so I can build the app and check your input file/generated output.

Thanks.