Full Code of scotch-io/meteor-slack for AI

master 51ec9c40c336 cached
29 files
18.0 KB
6.9k tokens
1 requests
Download .txt
Repository: scotch-io/meteor-slack
Branch: master
Commit: 51ec9c40c336
Files: 29
Total size: 18.0 KB

Directory structure:
gitextract_8ntt3t25/

├── .meteor/
│   ├── .finished-upgraders
│   ├── .gitignore
│   ├── .id
│   ├── packages
│   ├── platforms
│   ├── release
│   └── versions
├── README.md
├── client/
│   ├── app.js
│   ├── components/
│   │   ├── channel.html
│   │   ├── footer.html
│   │   ├── header.html
│   │   ├── listings.html
│   │   ├── message.html
│   │   └── messages.html
│   ├── global.css
│   ├── head.html
│   ├── input.js
│   ├── room.html
│   ├── routes.js
│   ├── startup/
│   │   └── subscribe.js
│   └── stubs.js
├── lib/
│   └── collections/
│       ├── channels.js
│       └── messages.js
└── server/
    ├── accounts.js
    ├── mail.js
    ├── methods.js
    ├── publications.js
    └── seeder.js

================================================
FILE CONTENTS
================================================

================================================
FILE: .meteor/.finished-upgraders
================================================
# This file contains information which helps Meteor properly upgrade your
# app when you run 'meteor update'. You should check it into version control
# with your project.

notices-for-0.9.0
notices-for-0.9.1
0.9.4-platform-file
notices-for-facebook-graph-api-2


================================================
FILE: .meteor/.gitignore
================================================
local


================================================
FILE: .meteor/.id
================================================
# This file contains a token that is unique to your project.
# Check it into your repository along with the rest of this directory.
# It can be used for purposes such as:
#   - ensuring you don't accidentally deploy one app on top of another
#   - providing package authors with aggregated statistics

1yevmue1ah7sfon2yoez


================================================
FILE: .meteor/packages
================================================
# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

meteor-platform
anti:fake
dburles:factory
accounts-base
accounts-password
accounts-ui
accounts-github
email
iron:router


================================================
FILE: .meteor/platforms
================================================
server
browser


================================================
FILE: .meteor/release
================================================
METEOR@1.1.0.2


================================================
FILE: .meteor/versions
================================================
accounts-base@1.2.0
accounts-github@1.0.4
accounts-oauth@1.1.5
accounts-password@1.1.1
accounts-ui@1.1.5
accounts-ui-unstyled@1.1.7
anti:fake@0.4.1
autoupdate@1.2.1
base64@1.0.3
binary-heap@1.0.3
blaze@2.1.2
blaze-tools@1.0.3
boilerplate-generator@1.0.3
callback-hook@1.0.3
check@1.0.5
dburles:factory@0.3.10
ddp@1.1.0
deps@1.0.7
ejson@1.0.6
email@1.0.6
fastclick@1.0.3
geojson-utils@1.0.3
github@1.1.3
html-tools@1.0.4
htmljs@1.0.4
http@1.1.0
id-map@1.0.3
iron:controller@1.0.7
iron:core@1.0.7
iron:dynamic-template@1.0.7
iron:layout@1.0.7
iron:location@1.0.7
iron:middleware-stack@1.0.7
iron:router@1.0.7
iron:url@1.0.7
jquery@1.11.3_2
json@1.0.3
launch-screen@1.0.2
less@1.0.14
livedata@1.0.13
localstorage@1.0.3
logging@1.0.7
meteor@1.1.6
meteor-platform@1.2.2
minifiers@1.1.5
minimongo@1.0.8
mobile-status-bar@1.0.3
mongo@1.1.0
npm-bcrypt@0.7.8_2
oauth@1.1.4
oauth2@1.1.3
observe-sequence@1.0.6
ordered-dict@1.0.3
random@1.0.3
reactive-dict@1.1.0
reactive-var@1.0.5
reload@1.1.3
retry@1.0.3
routepolicy@1.0.5
service-configuration@1.0.4
session@1.1.0
sha@1.0.3
spacebars@1.0.6
spacebars-compiler@1.0.6
srp@1.0.3
templating@1.1.1
tracker@1.0.7
ui@1.0.6
underscore@1.0.3
url@1.0.4
webapp@1.2.0
webapp-hashing@1.0.3


================================================
FILE: README.md
================================================
# Slack Clone Built in Meteor.js

Code for the scotch.io tutorial by Daniel (danyll.com)

![](https://cask.scotch.io/2015/05/slack-clone-in-meteor-getting-started.png)


================================================
FILE: client/app.js
================================================
Template.messages.helpers({
  messages: Messages.find({})
});

Accounts.ui.config({
    passwordSignupFields: 'USERNAME_AND_EMAIL'
});

Template.registerHelper('currentChannel', function () {
	return Session.get('channel');
});

Template.registerHelper("timestampToTime", function (timestamp) {
	var date = new Date(timestamp);
	var hours = date.getHours();
	var minutes = "0" + date.getMinutes();
	var seconds = "0" + date.getSeconds();
	return hours + ':' + minutes.substr(minutes.length-2) + ':' + seconds.substr(seconds.length-2);
});

Template.registerHelper("usernameFromId", function (userId) {
	var user = Meteor.users.findOne({_id: userId});
	if (typeof user === "undefined") {
		return "Anonymous";
	}
	if (typeof user.services.github !== "undefined") {
		return user.services.github.username;
	}
	return user.username;
});

Template.listings.helpers({
	channels: function () {
		return Channels.find();
	}
});

Template.channel.helpers({
	active: function () {
		if (Session.get('channel') === this.name) {
			return "active";
		} else {
			return "";
		}
	}
});

================================================
FILE: client/components/channel.html
================================================
<template name="channel">
	<li class="channel {{active}}">
		<a class="channel_name" href="/{{name}}">
			<span class="unread">
				0
			</span>
			<span>
				<span class="prefix">#</span>
				<span class="channel-name">{{name}}</span>
			</span>
		</a>
	</li>
</template>

================================================
FILE: client/components/footer.html
================================================
<template name="footer">
	<div class="footer">
		<div class="user-menu">
			<span class="user-menu_profile-pic"></span>
			<span class="user-menu_username">scotch</span>
			<img class="connection_icon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAABmFBMVEUAAAD////////////////////////////////////2+/LR5bKw1Hmfy1KUxz2VyD2izVKz1nnS5rP////A3JuOw0qKwkCNxD+QxT6Sxj6Txz6SxUnC3Jv1+fGXx2GDvkCGwECIwUCLwj+PxD6PxT+JwUCFwECZyGD2+vGSxWF9vEGAvkGDv0CMwz+Wx2GPw2F4ukJ7u0J+vUGBvkGHwUB8u0KSxGG31pp0uEN3uUJ5u0KFv0CCv0B6u0K415p5uU1yt0N/vUF1uEN8u0zG3bFttURwtkR5ukLH3rGWxnlqtERutUR2uUOZx3l6uVZos0VvtkRxt0Nzt0N8ulVisUVlskVns0VzuENmskVfsEVps0VztlZer0VhsEVjsUVstER1t1aOwXhcrkZdr0VgsEaQwnm/2a9YrUZbrka/2rDz+PFhr09XrEZksE6pzplUq0ZVrEZarUaqzpl0tWJRq0dWrEZ1tmJztWJOqUdSq0dxtGJMqEdNqUdQqkdytWKmzJhXrFBKqEdZrU+716+GvXhjr1dIp0hkr1dYtVOVAAAAFHRSTlMAV8/v/wCH+x/n////////////9kvBHZAAAAG7SURBVHgBvdOxjtNAEIDhGe/MZO3sxVaiIJkiSNdQUPJOeQlqXoCCIg/EU9BQHRKg5CT7ErzrHTa+aBOqaxC/tdLK+2kbj+H/hoWhlCmQr0HeyYxyM8mvkWHKoAfBS6cBWEeYugAzf4QGp1SV8DvU/ZjBdN7iud6hdnOTdl+TuALyrUPEwfdu3nc1ipr9AwdIFZPysJylRDfa6cZL2rfgMd9QjO8R0Y+/u7sa4LHZz4wN/MXEyw1hbK1VZdV7PZ1OyufzktsxXADCW5EkXq06Paan02Uoo3kHmAEzJ8HBN6v5qlkqaxTmCdAzQK8Noi6rXwCrJyutepUMAARnXS++3cvm2xvftR0PzAyQAXtwdNChifvFHppBdR003IDCIg6JDOse4DX8WIdo1TwfpaUgqWC9c4eqqg5HF20QZdAMmDlasdHWkrKR03J0A4iIXRTrpba29laiY8YMyOyMKYkXroyROZZuwVTyztAFJPmZKBGq+FxFVBr5BHr7ubd3GICfAM+88qDHHYe/BmbbIAaGKU/Fz10emDxyHxBhgJTg+DGP3O3QbltMBkd92F2H9sWxB772wo9z2z8FfwDHWbdKLDfq1AAAAABJRU5ErkJggg==">
			<span class="connection_status">online</span>
		</div>
		<div class="input-box">
			<input type="text" class="input-box_text">
		</div>
	</div>
</template>

================================================
FILE: client/components/header.html
================================================
<template name="header">
	<div class="header">
		<div class="team-menu">scotch</div>
		<div class="channel-menu">
			<span class="channel-menu_name">
				<span class="channel-menu_prefix">#</span>
				{{currentChannel}}
			</span>
		</div>
	</div>
</template>

================================================
FILE: client/components/listings.html
================================================
<template name="listings">
	<div class="listings">
		<div class="listings_channels">
			<h2 class="listings_header">Channels</h2>
			<ul class="channel_list">
				{{#each channels}}
					{{> channel name=name}}
				{{/each}}
			</ul>
			
		</div>
		<div class="listings_direct-messages"></div>
		<p class="disclaimer">This demo is not created by, affiliated with, or supported by Slack Technologies, Inc.</p>
	</div>
</template>

================================================
FILE: client/components/message.html
================================================
<template name="message">
	<div class="message">
		<a href="" class="message_profile-pic"></a>
		<a href="" class="message_username">{{usernameFromId user}}</a>
		<span class="message_timestamp">{{timestampToTime timestamp}}</span>
		<span class="message_star"></span>
		<span class="message_content">{{text}}</span>
	</div>
</template>

================================================
FILE: client/components/messages.html
================================================
<template name="messages">
	<div class="message-history">
		{{#if Template.subscriptionsReady}}
			{{#each messages}}
				{{> message text=text timestamp=timestamp user=user }}
			{{/each}}
		{{else}}
			Loading…
		{{/if}}
	</div>
</template>

================================================
FILE: client/global.css
================================================
/* line 5, ../../../../../../var/lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  font-size: 100%;
  vertical-align: baseline;
}

/* line 22, ../../../../../../var/lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
html {
  line-height: 1;
}

/* line 24, ../../../../../../var/lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
ol, ul {
  list-style: none;
}

/* line 26, ../../../../../../var/lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* line 28, ../../../../../../var/lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
caption, th, td {
  text-align: left;
  font-weight: normal;
  vertical-align: middle;
}

/* line 30, ../../../../../../var/lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
q, blockquote {
  quotes: none;
}
/* line 103, ../../../../../../var/lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
q:before, q:after, blockquote:before, blockquote:after {
  content: "";
  content: none;
}

/* line 32, ../../../../../../var/lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
a img {
  border: none;
}

/* line 116, ../../../../../../var/lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary {
  display: block;
}

/* line 6, ../tests/sass/_layout.scss */
* {
  box-sizing: border-box;
}

/* line 10, ../tests/sass/_layout.scss */
html {
  position: relative;
  height: 100%;
  font-size: 16px;
  font-family: 'Lato', sans-serif;
}

/* line 16, ../tests/sass/_layout.scss */
body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding-top: 53px;
  padding-bottom: 64px;
}

/* line 23, ../tests/sass/_layout.scss */
.header {
  position: fixed;
  top: 0;
  left: 0;
  height: 53px;
  width: 100%;
}

/* line 31, ../tests/sass/_layout.scss */
.main {
  height: 100%;
}

/* line 35, ../tests/sass/_layout.scss */
.footer {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 64px;
  width: 100%;
}

/* line 1, ../tests/sass/components/_header.scss */
.team-menu {
  position: relative;
  width: 220px;
  height: 53px;
  line-height: 53px;
  font-weight: 900;
  padding: 0 1rem;
  color: #ffffff;
  background: #3e313c;
  border-bottom: 2px solid #372c36;
  float: left;
  cursor: pointer;
}

/* line 19, ../tests/sass/components/_header.scss */
.channel-menu_name {
  display: inline-block;
  padding: 0 .5rem 0 1.5rem;
  color: #555459;
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 53px;
  cursor: pointer;
}

/* line 29, ../tests/sass/components/_header.scss */
.channel-menu_prefix {
  color: #9e9ea6;
  padding-right: .1rem;
  font-weight: 500;
}

/* line 1, ../tests/sass/components/_main.scss */
.listings {
  height: 100%;
  width: 220px;
  float: left;
  color: #ab9ba9;
  background-color: #4d394b;
  overflow-y: auto;
  overflow-x: hidden;
}

/* line 11, ../tests/sass/components/_main.scss */
.message-history {
  margin-left: 220px;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  padding: 0 18px 1rem 1.5rem;
}

/* line 4, ../tests/sass/components/_listings.scss */
.listings_channels {
  margin: 1rem 0 2rem;
}

/* line 8, ../tests/sass/components/_listings.scss */
.listings_header {
  text-align: left;
  font-size: .8rem;
  line-height: 1.25rem;
  margin: 0 1rem .1rem;
  text-transform: uppercase;
  font-weight: 700;
  color: #ab9ba9;
  width: 165px;
  position: relative;
}

/* line 20, ../tests/sass/components/_listings.scss */
.channel_list {
  list-style-type: none;
  text-align: left;
  color: #ab9ba9;
}

/* line 26, ../tests/sass/components/_listings.scss */
.channel {
  height: 24px;
  line-height: 24px;
  -moz-border-radius-topright: 0.25rem;
  -webkit-border-top-right-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
  -moz-border-radius-bottomright: 0.25rem;
  -webkit-border-bottom-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
  margin-right: 17px;
  color: #ffffff;
  padding-left: 1rem;
}

/* line 35, ../tests/sass/components/_listings.scss */
.unread {
  color: #ffffff;
  background: #eb4d5c;
  border-radius: 9px;
  padding: 2px 9px;
  font-size: .8rem;
  line-height: 14px;
  font-weight: 700;
  vertical-align: baseline;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  float: right;
  margin-right: 3px;
  margin-top: 3px;
}

/* line 51, ../tests/sass/components/_listings.scss */
.channel.active {
  background: #4c9689;
}

/* line 55, ../tests/sass/components/_listings.scss */
.channel_prefix {
  color: #b2d5c9;
}

/* line 59, ../tests/sass/components/_listings.scss */
.disclaimer {
  font-size: 0.8rem;
  padding-left: 1rem;
  margin-right: 17px;
}

/* line 4, ../tests/sass/components/_message.scss */
.message {
  position: relative;
  margin-top: .5rem;
  padding: .25rem 2rem .1rem 3rem;
  min-height: 36px;
}

/* line 11, ../tests/sass/components/_message.scss */
.message_profile-pic {
  position: absolute;
  left: 0;
  display: block;
  -moz-border-radius: 0.2rem;
  -webkit-border-radius: 0.2rem;
  border-radius: 0.2rem;
  width: 36px;
  height: 36px;
  background-image: url("http://i.imgur.com/LikUNLc.png");
  background-size: cover;
}

/* line 22, ../tests/sass/components/_message.scss */
.message_username {
  font-weight: 900;
  padding-right: .25rem;
  color: #3d3c40 !important;
  margin-left: 0;
  font-style: normal;
  text-decoration: none;
}

/* line 31, ../tests/sass/components/_message.scss */
.message_timestamp {
  text-align: left;
  display: inline;
  position: relative;
  top: 0;
  left: 0;
  color: #babbbf;
  font-size: 12px;
  line-height: 1.2rem;
  width: 36px;
  margin-right: 0;
  margin-left: 0;
}

/* line 45, ../tests/sass/components/_message.scss */
.message_content {
  color: #8b898f;
  font-style: italic;
  display: block;
  min-height: 1rem;
}

/* line 4, ../tests/sass/components/_user-menu.scss */
.user-menu {
  float: left;
  width: 220px;
  height: 100%;
  cursor: pointer;
  background: #3e313c;
  border-top: 2px solid #372c36;
  padding: 7px 0 9px 8px;
  height: 4rem;
  position: fixed;
  bottom: 0;
  left: 0;
}

/* line 18, ../tests/sass/components/_user-menu.scss */
.user-menu_profile-pic {
  display: inline-block;
  float: left;
  -moz-border-radius: 0.2rem;
  -webkit-border-radius: 0.2rem;
  border-radius: 0.2rem;
  width: 48px;
  height: 48px;
  background-image: url("http://i.imgur.com/LikUNLc.png");
  background-size: cover;
  margin-right: 8px;
}

/* line 29, ../tests/sass/components/_user-menu.scss */
.user-menu_username {
  display: block;
  color: #ffffff;
  font-weight: 900;
  line-height: 1.5rem;
  margin-top: .2rem;
  max-width: 120px;
}

/* line 38, ../tests/sass/components/_user-menu.scss */
.connection_icon {
  width: 12px;
  height: 12px;
}

/* line 43, ../tests/sass/components/_user-menu.scss */
.connection_status {
  color: #ab9ba9;
}

/* line 1, ../tests/sass/components/_input-box.scss */
.input-box {
  height: 100%;
  margin-left: 220px;
}

/* line 6, ../tests/sass/components/_input-box.scss */
.input-box_text {
  font-size: .95rem;
  width: 90%;
  margin-left: 2%;
  margin-bottom: auto;
  line-height: 1.2rem;
  border: 2px solid #e0e0e0;
  -moz-border-radius: 0.2rem;
  -webkit-border-radius: 0.2rem;
  border-radius: 0.2rem;
  -moz-background-clip: padding-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  color: #3d3c40;
  -webkit-appearance: none;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
  outline: 0;
  bottom: 0;
  min-height: 41px !important;
  padding: 9px 5px 9px 8px;
}


.channel_name {
  text-decoration: none;
  color: inherit;
}

================================================
FILE: client/head.html
================================================
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title></title>
	<link href='http://fonts.googleapis.com/css?family=Lato:400,700,900' rel='stylesheet' type='text/css'>
</head>

================================================
FILE: client/input.js
================================================
Template.footer.events({
  'keypress input': function(e) {
    var inputVal = $('.input-box_text').val();
    if(!!inputVal) {
      var charCode = (typeof e.which == "number") ? e.which : e.keyCode;
      if (charCode == 13) {
        e.stopPropagation();
        Meteor.call('newMessage', {
          text: $('.input-box_text').val(),
          channel: Session.get('channel')
        });
        $('.input-box_text').val("");
        return false;
      }    
    }
  }
});

================================================
FILE: client/room.html
================================================
<template name="app">
	{{> header}}
	<div class="main">
		{{> loginButtons}}
		{{> listings}}
		{{> yield}}
	</div>
	{{> footer}}
</template>

================================================
FILE: client/routes.js
================================================
Router.configure({
  layoutTemplate: 'app'
});

Router.route('/:channel', function () {
	Session.set('channel', this.params.channel);
	this.render('messages');
});

Router.route('/', function () {
	this.redirect('/general');
});

================================================
FILE: client/startup/subscribe.js
================================================
Meteor.subscribe('channels');
Meteor.subscribe('allUsernames');

Template.messages.onCreated(function() {
  var self = this;
  self.autorun(function() {
    self.subscribe('messages', Session.get('channel'), function () {
    	self.autorun(function() {
			Messages.find({channel: Session.get('channel')}).count();
			Meteor.setTimeout(function () {
				$('.message-history').scrollTop(Number.MAX_VALUE);
			}, 100);
		});
    });
  });
});

================================================
FILE: client/stubs.js
================================================
Meteor.methods({
  newMessage: function (message) {
  	message.timestamp = Date.now();
    message.user = Meteor.userId();
    Messages.insert(message);
  }
})

================================================
FILE: lib/collections/channels.js
================================================
Channels = new Mongo.Collection("channels");

================================================
FILE: lib/collections/messages.js
================================================
Messages = new Mongo.Collection("messages");

================================================
FILE: server/accounts.js
================================================
Accounts.config({
	sendVerificationEmail: true
});

================================================
FILE: server/mail.js
================================================
Meteor.startup(function () {
  smtp = {
    username: 'dan@danyll.com',
    password: 'y3Z8TQxpxCiYsJJsCwyV0A',
    server:   'smtp.mandrillapp.com',
    port: 587
  };

  process.env.MAIL_URL = 'smtp://' + encodeURIComponent(smtp.username) + ':' + encodeURIComponent(smtp.password) + '@' + encodeURIComponent(smtp.server) + ':' + smtp.port;
});

================================================
FILE: server/methods.js
================================================
Meteor.methods({
  newMessage: function (message) {
  	message.timestamp = Date.now();
    message.user = Meteor.userId();
    Messages.insert(message);
  }
})

================================================
FILE: server/publications.js
================================================
Meteor.publish('messages', function (channel) {
	return Messages.find({channel: channel});
});

Meteor.publish('channels', function () {
	return Channels.find();
});

Meteor.publish("allUsernames", function () {
  return Meteor.users.find({}, {fields: {
  	"username": 1,
  	"services.github.username": 1
  }});
});

================================================
FILE: server/seeder.js
================================================
Meteor.startup(function() {

  Meteor.users.remove({});
  Accounts.createUser({
    username: "scotchio",
    email: "scotch@example.com",
    password: "dummypassword"
  });

  Factory.define('message', Messages, {
    text: function() {
    	return Fake.sentence();
    },
    user: Meteor.users.findOne()._id,
    timestamp: Date.now(),
    channel: 'general'
  });

  // Add this if you want to remove all messages before seeding
  Messages.remove({});

  if (Messages.find({}).count() === 0) {
    _(10).times(function(n) {
      Factory.create('message');
    });
  }

  Channels.remove({});
  Channels.insert({
    name: "general"
  });
  Channels.insert({
    name: "random"
  });
});
Download .txt
gitextract_8ntt3t25/

├── .meteor/
│   ├── .finished-upgraders
│   ├── .gitignore
│   ├── .id
│   ├── packages
│   ├── platforms
│   ├── release
│   └── versions
├── README.md
├── client/
│   ├── app.js
│   ├── components/
│   │   ├── channel.html
│   │   ├── footer.html
│   │   ├── header.html
│   │   ├── listings.html
│   │   ├── message.html
│   │   └── messages.html
│   ├── global.css
│   ├── head.html
│   ├── input.js
│   ├── room.html
│   ├── routes.js
│   ├── startup/
│   │   └── subscribe.js
│   └── stubs.js
├── lib/
│   └── collections/
│       ├── channels.js
│       └── messages.js
└── server/
    ├── accounts.js
    ├── mail.js
    ├── methods.js
    ├── publications.js
    └── seeder.js
Condensed preview — 29 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (21K chars).
[
  {
    "path": ".meteor/.finished-upgraders",
    "chars": 262,
    "preview": "# This file contains information which helps Meteor properly upgrade your\n# app when you run 'meteor update'. You should"
  },
  {
    "path": ".meteor/.gitignore",
    "chars": 6,
    "preview": "local\n"
  },
  {
    "path": ".meteor/.id",
    "chars": 323,
    "preview": "# This file contains a token that is unique to your project.\n# Check it into your repository along with the rest of this"
  },
  {
    "path": ".meteor/packages",
    "chars": 357,
    "preview": "# Meteor packages used by this project, one per line.\n# Check this file (and the other files in this directory) into you"
  },
  {
    "path": ".meteor/platforms",
    "chars": 15,
    "preview": "server\nbrowser\n"
  },
  {
    "path": ".meteor/release",
    "chars": 15,
    "preview": "METEOR@1.1.0.2\n"
  },
  {
    "path": ".meteor/versions",
    "chars": 1218,
    "preview": "accounts-base@1.2.0\naccounts-github@1.0.4\naccounts-oauth@1.1.5\naccounts-password@1.1.1\naccounts-ui@1.1.5\naccounts-ui-uns"
  },
  {
    "path": "README.md",
    "chars": 168,
    "preview": "# Slack Clone Built in Meteor.js\n\nCode for the scotch.io tutorial by Daniel (danyll.com)\n\n![](https://cask.scotch.io/201"
  },
  {
    "path": "client/app.js",
    "chars": 1073,
    "preview": "Template.messages.helpers({\n  messages: Messages.find({})\n});\n\nAccounts.ui.config({\n    passwordSignupFields: 'USERNAME_"
  },
  {
    "path": "client/components/channel.html",
    "chars": 272,
    "preview": "<template name=\"channel\">\n\t<li class=\"channel {{active}}\">\n\t\t<a class=\"channel_name\" href=\"/{{name}}\">\n\t\t\t<span class=\"u"
  },
  {
    "path": "client/components/footer.html",
    "chars": 1662,
    "preview": "<template name=\"footer\">\n\t<div class=\"footer\">\n\t\t<div class=\"user-menu\">\n\t\t\t<span class=\"user-menu_profile-pic\"></span>\n"
  },
  {
    "path": "client/components/header.html",
    "chars": 259,
    "preview": "<template name=\"header\">\n\t<div class=\"header\">\n\t\t<div class=\"team-menu\">scotch</div>\n\t\t<div class=\"channel-menu\">\n\t\t\t<sp"
  },
  {
    "path": "client/components/listings.html",
    "chars": 428,
    "preview": "<template name=\"listings\">\n\t<div class=\"listings\">\n\t\t<div class=\"listings_channels\">\n\t\t\t<h2 class=\"listings_header\">Chan"
  },
  {
    "path": "client/components/message.html",
    "chars": 336,
    "preview": "<template name=\"message\">\n\t<div class=\"message\">\n\t\t<a href=\"\" class=\"message_profile-pic\"></a>\n\t\t<a href=\"\" class=\"messa"
  },
  {
    "path": "client/components/messages.html",
    "chars": 242,
    "preview": "<template name=\"messages\">\n\t<div class=\"message-history\">\n\t\t{{#if Template.subscriptionsReady}}\n\t\t\t{{#each messages}}\n\t\t"
  },
  {
    "path": "client/global.css",
    "chars": 8458,
    "preview": "/* line 5, ../../../../../../var/lib/gems/1.9.1/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */\nhtm"
  },
  {
    "path": "client/head.html",
    "chars": 214,
    "preview": "<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n\t<title></title>\n\t<link href='http"
  },
  {
    "path": "client/input.js",
    "chars": 476,
    "preview": "Template.footer.events({\n  'keypress input': function(e) {\n    var inputVal = $('.input-box_text').val();\n    if(!!input"
  },
  {
    "path": "client/room.html",
    "chars": 141,
    "preview": "<template name=\"app\">\n\t{{> header}}\n\t<div class=\"main\">\n\t\t{{> loginButtons}}\n\t\t{{> listings}}\n\t\t{{> yield}}\n\t</div>\n\t{{>"
  },
  {
    "path": "client/routes.js",
    "chars": 228,
    "preview": "Router.configure({\n  layoutTemplate: 'app'\n});\n\nRouter.route('/:channel', function () {\n\tSession.set('channel', this.par"
  },
  {
    "path": "client/startup/subscribe.js",
    "chars": 439,
    "preview": "Meteor.subscribe('channels');\nMeteor.subscribe('allUsernames');\n\nTemplate.messages.onCreated(function() {\n  var self = t"
  },
  {
    "path": "client/stubs.js",
    "chars": 159,
    "preview": "Meteor.methods({\n  newMessage: function (message) {\n  \tmessage.timestamp = Date.now();\n    message.user = Meteor.userId("
  },
  {
    "path": "lib/collections/channels.js",
    "chars": 44,
    "preview": "Channels = new Mongo.Collection(\"channels\");"
  },
  {
    "path": "lib/collections/messages.js",
    "chars": 44,
    "preview": "Messages = new Mongo.Collection(\"messages\");"
  },
  {
    "path": "server/accounts.js",
    "chars": 50,
    "preview": "Accounts.config({\n\tsendVerificationEmail: true\n});"
  },
  {
    "path": "server/mail.js",
    "chars": 345,
    "preview": "Meteor.startup(function () {\n  smtp = {\n    username: 'dan@danyll.com',\n    password: 'y3Z8TQxpxCiYsJJsCwyV0A',\n    serv"
  },
  {
    "path": "server/methods.js",
    "chars": 159,
    "preview": "Meteor.methods({\n  newMessage: function (message) {\n  \tmessage.timestamp = Date.now();\n    message.user = Meteor.userId("
  },
  {
    "path": "server/publications.js",
    "chars": 315,
    "preview": "Meteor.publish('messages', function (channel) {\n\treturn Messages.find({channel: channel});\n});\n\nMeteor.publish('channels"
  },
  {
    "path": "server/seeder.js",
    "chars": 692,
    "preview": "Meteor.startup(function() {\n\n  Meteor.users.remove({});\n  Accounts.createUser({\n    username: \"scotchio\",\n    email: \"sc"
  }
]

About this extraction

This page contains the full source code of the scotch-io/meteor-slack GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 29 files (18.0 KB), approximately 6.9k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!