{"id":21722427,"url":"https://github.com/timstott/introduction-to-meteor","last_synced_at":"2026-05-08T04:41:21.165Z","repository":{"id":74257655,"uuid":"41624825","full_name":"timstott/introduction-to-meteor","owner":"timstott","description":"Introduction to Meteor JavaScript framework","archived":false,"fork":false,"pushed_at":"2015-09-02T11:16:50.000Z","size":176,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-25T19:07:10.552Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/timstott.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}},"created_at":"2015-08-30T10:38:01.000Z","updated_at":"2025-01-07T03:13:41.000Z","dependencies_parsed_at":"2023-03-09T06:00:18.026Z","dependency_job_id":null,"html_url":"https://github.com/timstott/introduction-to-meteor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timstott%2Fintroduction-to-meteor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timstott%2Fintroduction-to-meteor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timstott%2Fintroduction-to-meteor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timstott%2Fintroduction-to-meteor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timstott","download_url":"https://codeload.github.com/timstott/introduction-to-meteor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244695613,"owners_count":20494846,"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-11-26T02:28:50.410Z","updated_at":"2026-05-08T04:41:16.129Z","avatar_url":"https://github.com/timstott.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction to Meteor\n\nIntroduction to Meteor [slides](https://docs.google.com/presentation/d/1rEkZYE6CuxQmnPCdTq8k-9F_wXo2eEHXbuD627buw-Y) supporting material.\n\n## Workshop Requirements\n\n- Clone this repository\n- Install Meteor\n\n```\ngit clone git@github.com:timstott/introduction-to-meteor.git\ncurl https://install.meteor.com/ | sh\ncd introduction-to-meteor\n```\n\n## Missions\n\nThe workshop is made up a set of missions. They cover specific Meteor\nfunctionalities. They build on each other to go home with a basic application.\n\nMissions are often under 50LOC and kept as atomic as possible.\nEach mission lives on its own branch and is prefixed with `/m\\d\\d/`.\n\nBegin the first mission with `git checkout m00`\n\n### 00 Everything in order?\n\n- Start the application with the `meteor` command and\nbrowse to *http://localhost:3000*.\n- The application is made of 3 files:\n  - *bank.css*, css declarations\n  - *bank.html*, html templates\n  - *bank.js*, application code\n- Observe the `helloWorld` function is computed on the server and browser\nconsoles.\n\n### 01 Database everywhere\n\n- In *bank.js* we create a new collection, seed new records, create\na transactions template to display all transactions.\n- Insert a new record server side and observe the changes in the UI.  \nStart the Meteor shell with `meteor shell` command\n```javascript\nTransactions.insert({date: new Date(), payee: 'Eve', amount: 50})\n```\n- Insert a new record client side and find the record\nserver side  \n```javascript\n// Chrome console\nTransactions.insert({date: new Date(), payee: 'Eve', amount: -50})\n// Copy the id returned from the insert\n```  \n```javascript\n// Meteor shell\nTransactions.findOne('idFromInsert')\n```\n\nBy default Meteor publishes and subscribes to all collections and allows\nunsecure document inserts fromt the client.\n\nIn this mission we also:\n- Defined the `formatTime` Template helper to format dates.\n- Installed the Moment.js Meteor smart package.\n\n### 02 Meteor methods (a.k.a RPC)\n- In *bank.js* we define a Meteor method `transactions/duplicate`. It allows to\ntoggle transactions as duplicates.\n- Toogle the duplicate link and observe the changes in the UI.\n\nThe duplicate link event helper calls the Meteor method which executes both\non the client and the server. Data on the client can be updated immidiatly and\nupdated with data from the server when it returns.\n\n### 03 Structuring our application\n- The code in *bank.js* is splitted into multiple files and directories to\nease edits.\n\nNOTE: no `require` statements were added. Yet everything works ✨.\n\n### 04 Secutiry\n- We remove the `autopublish` package to selectively publish data.\n- On the sever we create a `transactions` publication which the client\nsubscribes to.\n- We remove the `insecure` to prevent document inserts, updates and removals\nfrom the client without defining limitations.\n- We define rules on the `Transactions` collection.\n- Attempt to insert/update a document in the client and observe the console.\n\nNOTE: the duplicate field in the `transations` is not published. Observe the\neffects of latency compensation in the client.\n\n## Credits/Resources\n\n- Meteor [Documentation](http://docs.meteor.com/#/full/)\n- MeteorHacks [Blog](https://meteorhacks.com/)\n- Discover Meteor [Book](https://www.discovermeteor.com/)\n- Sacha Greif Introduction to Meteor [Talk](https://www.youtube.com/watch?v=q9pA2xApdY0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimstott%2Fintroduction-to-meteor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimstott%2Fintroduction-to-meteor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimstott%2Fintroduction-to-meteor/lists"}