Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jmromer/squawker

Twitter, for the loud.
https://github.com/jmromer/squawker

elasticsearch es6 javascript rails react rspec ruby

Last synced: 21 days ago
JSON representation

Twitter, for the loud.

Awesome Lists containing this project

README

        

squawker
========

[![Build Status Badge][]][Build Status]

[Build Status Badge]: https://travis-ci.org/jkrmr/squawker.svg?branch=master
[Build Status]: https://travis-ci.org/jkrmr/squawker

Features
--------

### Squawks

All posts are automatically upcased by a `before_action` in the `Squawk` model.
Case-sensitive hyperlinks are left unmodified.

### Follow model

Track the squawks of people you find interesting (enraging?)

### Activity Feed

Fetches squawks for a given user, as well as those from the user's 'followees'
(users the given user is following)

### Forgotten Password

Uses ActionMailer and SendGrid to send the user a password-reset link

### "Remember me" option

On sign-in, elect to install a permanent cookie rather than a temporary one

### Character countdown

Shows remaining number of available characters (maximum: 160 --- 20 more than
Twitter! Get at me, VCs.)

### Test suite

Test suite written in RSpec.

(Warning: In an extremely RSpec-y way that I've come to loathe.)

### Search

Full-text search implemented using ElasticSearch

### Infinite Scrolling

Implemented using vanilla ES6

```js
// app/views/static_pages/home.haml L17-L25 (180c2747)

let scrollManager = new ScrollManager({ window: window })
let feedFetcher = new FeedFetcher({ endpoint: "/activity-feed" })

feedFetcher.fetchInitialPages({ scrollManager: scrollManager })

window.document.addEventListener("scroll", () => {
if (!scrollManager.isAtBottom()) { return }
feedFetcher.fetchNextPage()
})
```


app/views/static_pages/home.haml#L17-L25 (180c2747)

### At-mention completion

Inspired by GitHub's at-mention suggestions, start typing `@` (where
`identifier` is a handle or any portion of a full name), and a dropdown with
fuzzy-searchable suggested completions (see the [PR][at-mention-pr] for a demo)
will appear:

```js
/* app/assets/javascripts/components/squawkbox.jsx L45-L68 (180c2747) */

// Render text area with Suggestions child component
render() {
return (



{this.state.remainingChars}



)
}
```


app/assets/javascripts/components/squawkbox.jsx#L45-L68 (180c2747)

[at-mention-pr]: https://github.com/jkrmr/squawker/pull/8

### Content Recommendations

Proof-of-concept. Generated by [Warbler][warbler-repo], a service written in
Python. See the [PR][warbler-pr] for a demo.

```ruby
# app/controllers/recommendations_controller.rb L6-L12 (180c2747)

def index
squawk_ids = Warbler.recommendations(squawk_params)
squawks = Squawk.where(id: squawk_ids)
render "activity_feed/index", locals: { squawks: squawks }
rescue ActionController::ParameterMissing
head :unprocessable_entity
end
```


app/controllers/recommendations_controller.rb#L6-L12 (180c2747)

[warbler-pr]: https://github.com/jkrmr/squawker/pull/20
[warbler-repo]: https://github.com/jkrmr/warbler