Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated docs #8

Open
wants to merge 16 commits into
base: docs
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
### node etc ###

.DS_Store
lib/._.DS_Store
server/._.DS_Store
server/db/._.DS_Store

# Logs
logs
Expand Down
File renamed without changes.
15 changes: 9 additions & 6 deletions _PRESS-RELEASE.md → PRESS-RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Project Name #
# Project Alaska #

<!--
> This material was originally posted [here](http://www.quora.com/What-is-Amazons-approach-to-product-development-and-product-management). It is reproduced here for posterities sake.
Expand All @@ -17,19 +17,22 @@ Once the project moves into development, the press release can be used as a touc
-->

## Heading ##
> Name the product in a way the reader (i.e. your target customers) will understand.
> Name pending..

## Sub-Heading ##
> Describe who the market for the product is and what benefit they get. One sentence only underneath the title.
> All your internet news. Here.

## Summary ##
> Give a summary of the product and the benefit. Assume the reader will not read anything else so make this paragraph good.
> Allows the user to aggregate news from a bunch of different sites, including Facebook,
Reddit, news sites, and any blogs they might browse.

## Problem ##
> Describe the problem your product solves.
> Having to open up different sites and tabs in order to access all the newsfeeds and blogs
we subscribe to.

## Solution ##
> Describe how your product elegantly solves the problem.
> Our product aggregates news sites, social media, blogs, etc. so that the user gets snippets
of stories in one centralized hub.

## Quote from You ##
> A quote from a spokesperson in your company.
Expand Down
16 changes: 8 additions & 8 deletions _README.md → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ News aggregator that integrates with Facebook and Tumblr.

## Team

- __Product Owner__: teamMember
- __Scrum Master__: teamMember
- __Development Team Members__: teamMember, teamMember
- __Product Owner__: Sam Puth
- __Scrum Master__: Sean Chen
- __Chief Backend Developer__: Etienne Tripier
- __Chief Frontend Devloper__: Matt Kim

## Table of Contents

Expand All @@ -25,10 +26,9 @@ News aggregator that integrates with Facebook and Tumblr.
## Requirements

- Node 0.10.x
- Redis 2.6.x
- Postgresql 9.1.x
- etc
- etc
- Sqlite3 2.2.x
- Angular 1.2.x
- Jasmine 2.0.x

## Development

Expand All @@ -44,7 +44,7 @@ bower install

### Roadmap

View the project roadmap [here](LINK_TO_PROJECT_ISSUES)
View the project roadmap [here](https://github.com/Northern-Moose/newsaggregator/issues)


## Contributing
Expand Down
10 changes: 5 additions & 5 deletions _STYLE-GUIDE.md → STYLE-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@

When writing any block of code that is logically subordinate to the line immediately before and after it, that block should be indented two spaces more than the surrounding lines

* Do not put any tab characters anywhere in your code. You would do best to stop pressing the tab key entirely.
* Increase the indent level for all blocks by two extra spaces
* Use tabs so long as your Tab key translates to spaces in your text editor
* When a line opens a block, the next line starts 2 spaces further in than the line that opened

```javascript
// good:
if(condition){
if (condition){
action();
}

// bad:
if(condition){
if (condition){
action();
}
```

* When a line closes a block, that line starts at the same level as the line that opened the block
```javascript
// good:
if(condition){
if (condition){
action();
}

// bad:
if(condition){
if (condition){
action();
}
```
Expand Down
29 changes: 0 additions & 29 deletions _.gitignore

This file was deleted.

28 changes: 28 additions & 0 deletions _ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Tools we'll be using:
1. Angular
2. SQLite3 with BookShelf
3. Node/EXPRESS
4. Passport
5. Jasmine for TDD

- Have access to Google, Reddit, RSS feeds, Facebook, Twitter, Hacker News,
Tumblr, Quora(?)

Road Map
1. Set up link models and states in Angular
2. Set up iframe
3. Set up a database for link collection and standardization
4. Set up sharing to Facebook, Twitter, Reddit
5. Set up user login
6. Deploy site
7. (Reach) Set up a contextual filter

Software Architecture Description
1. Multiple cron jobs that are each responsible for grabbing data from each API endpoint
2. Each cron job feeds their data to their respective SQL table that is responsible for
holding the unique story attributes of stories from each site.
3. We'll also have a hub table that grabs the common fields from every individual story
table and standardizes it all.
4. Our Angular frontend app then makes POST requests to the hub table to populate a user's
stories.
5. User login outsourced to Facebook/Google. Users are tracked in a separate SQL table.
147 changes: 147 additions & 0 deletions client/facebook/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
angular.module('PersNewsAgg', ['facebook'])

.config([
'FacebookProvider',
function(FacebookProvider) {
var myAppId = '1477145722542537'; // PersNewsAgg appId from facebook developer website

// You can set appId with setApp method
// FacebookProvider.setAppId('myAppId');

/**
* After setting appId you need to initialize the module
* You can pass the appId on the init method as a shortcut too.
*/

FacebookProvider.init(myAppId);
}
])

.controller('MainController', [
'$scope',
'$timeout',
'Facebook',
function($scope, $timeout, Facebook) {

// Define empty user data
$scope.user = {};

// Defining user logged status
$scope.logged = false;

// Add some flags to display messages upon user status change
$scope.byebye = false;
$scope.salutation = false;

/**
* Watch for Facebook to be ready
* There is also the event that could be used
*/

$scope.$watch(
function() {
return Facebook.isReady();
},
function(newVal) {
if (newVal) {
$scope.facebookReady = true;
}
}
);

/**
* Intent Login function
*/

$scope.IntentLogin = function() {
Facebook.getLoginStatus(function(response) {
if (response.status == 'connected') {
$scope.logged = true;
$scope.me();
} else {
$scope.login();
}
});
};

/**
* Login function
*/

$scope.login = function() {
Facebook.login(function(response) {
if (response.status == 'connected') {
$scope.logged = true;
$scope.me();
}
});
};

/**
* The user's profile information
*/

$scope.me = function() {
Facebook.api('/me', function(response) {
$scope.apply(function() {
$scope.user = response;
});
});
};

/**
* Logout function
*/

$scope.logout = function() {
Facebook.logout(function() {
$scope.$apply(function() {
$scope.user = {};
$scope.logged = false;
});
});
}

/**
* Taking approach of events
*/

$scope.$on('Facebook:statusChange', function(event, data) {
console.log('Status: ', data);
if (data.status == 'connected') {
$scope.$apply(function() {
$scope.salutation = true;
$scope.byebye = false;
});
} else {
$scope.$apply(function() {
$scope.salutation = false;
$scope.byebye = true;
$timeout(function() {
$scope.byebye = false;
}, 2000)
});
}
});
}
])

/**
* For debugging purposes
* Shows objects in a pretty way
*/

.directive('debug', function() {
return {
restrict: 'E',
scope: {
expression: '= val'
},
template: '<pre>{{debug(expression)}}</pre>',
link: function(scope) {
scope.debug = function(exp) {
return angular.toJson(exp, true);
};
}
}
});
12 changes: 12 additions & 0 deletions client/posts/posts.controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
angular.module('posts.directive', [])
.controller('PostsController', function($scope, Posts) {
$scope.data = {};

$scope.getPosts = function() {
Posts.get().success(function(posts) {
$scope.data.posts = posts;
});
};

$scope.getPosts();
});
10 changes: 10 additions & 0 deletions client/posts/posts.dir.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
angular.module('posts.directive', [])
.directive('viewPost', function() {
return {
restrict: 'E',
scope: {
post: '='
},
templateUrl: 'posts.tpl.html'
}
});
8 changes: 8 additions & 0 deletions client/posts/posts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div>
Search: <input ng-model="query">
</div>

<ul class="allPosts">
<view-post post="post" ng-repeat="post in data.posts | orderBy:'createdAt' | filter:query">
</view-post>
</ul>
6 changes: 6 additions & 0 deletions client/posts/posts.tpl.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<li class="post">
<div class="title">{{ post.title }}</div>
<div class="created">{{ post.createdAt }}</div>
<a href="{{ post.url }}">Post Permalink</a>
<div class="content">{{ post.content }}</div>
</li>
Loading