Skip to content

linkshare: A Rails application for shared links

linkshare is an archived Rails learning project for publishing links, commenting and voting. Its routes reveal a conventional server-rendered application with account management and an administrative interface.

Application and services Archived
  • Updated
  • 2
  • Ruby · 55.29%
Repository languagesRuby 55.29%5

Shares calculated from GitHub Linguist bytes.

Language%Bytes
Ruby55.29%74,011
HTML19.55%26,174
CSS13.28%17,773
JavaScript11.56%15,470
CoffeeScript0.32%422

GitHub · README · Language statistics

Overview

Why it exists

Ruby on Rails web platform featuring asynchronous OpenGraph metadata scrapers and card previews.

Best fit

Social bookmarking and rich link curation.

Getting started

These commands come from the repository documentation. They were not run during this review.

Repository references

Excerpts from the repository’s guides, in their original language. Links open the inspected source revision.

Development and contributions

Testing

README.md

$ bash –login -c rvm use 2.2>/dev/null 2>&1; rails server -p 8080 -b 0.0.0.0 $ redis-server made with cloud9 IDE
Read the full instructions ↗
Source documentation

1 documents read from 1 candidates.

Features and components 2

Resources and actions
config/routes.rb maps links to resource actions and nests comments beneath links. Member routes send like and dislike actions to upvote and downvote. The root page is links#index.
Accounts and administration
Devise supplies the account-route surface, and RailsAdmin is mounted under /admin. Controllers and models are separate from the routing file; declaring a route does not show its full authorization or persistence behavior.

Architecture

The components and their connections remain available as text. The diagram adds an interactive view.

System context Context
  1. Browser request
  2. Rails router
  3. Links and comments controllers
  4. Models and persistence
  5. Rendered response

Links verified in the repository.

Mermaid Interactive diagram (loads on open)

System overview of the components and connections verified in the repository.

Static architecture view for linkshare
Static preview. The interactive diagram replaces it after Mermaid loads.
flowchart LR
  n0["Browser request"]
  n1["Rails router"]
  n2["Links and comments controllers"]
  n3["Models and persistence"]
  n4["Rendered response"]
  n0 --> n1
  n1 --> n2
  n2 --> n3
  n2 --> n4
Text version of the diagram
  • Browser request → Rails router
  • Rails router → Links and comments controllers
  • Links and comments controllers → Models and persistence
  • Links and comments controllers → Rendered response
Follow one path through the code

Follow PUT /links/:id/like into the upvote action, then inspect the model operation. This keeps the HTTP action, the user identity and the stored vote from being treated as one indistinguishable step.

Types and file structure

26 declared types, with 12 in the base-relationship overview.

Type diagram
classDiagram
direction TB
class te6c01275de47["ApplicationController"] {
  configure_permitted_parameters()
}
class t8678c70aa713["CommentsController"] {
  create()
  destroy()
  set_comment()
  comment_params()
}
class tb0660d882e74["LinksController"] {
  index()
  authorized_user()
  show()
  new()
}
class te74c95b27ab9["UsersController"] {
  index()
  show()
  set_user()
  user_params()
}
class t507ea3b434b7["Comment"] {
}
class teaffcf98c1af["Link"] {
  search()
}
class t3d8e51a5861b["User"] {
  search()
}
class t365c5f73a845["AvatarUploader"] {
  store_dir()
  extension_white_list()
}
class t02b326265c03["FileUploader"] {
  store_dir()
  to_jq_upload()
}
class t1b987a5d8a58["Application"] {
}
class t8a2d1d5f3397["CreateLinks"] {
  change()
}
class t413ee87dca90["DeviseCreateUsers"] {
  change()
}
class b597d79078b7c["ActionController"] {
  <<unresolved_base>>
}
te6c01275de47 ..> b597d79078b7c : declared base
class bf963db62dcd9["Base"] {
  <<unresolved_base>>
}
te6c01275de47 ..> bf963db62dcd9 : declared base
class b5537154b21ce["ApplicationController"] {
  <<unresolved_base>>
}
t8678c70aa713 ..> b5537154b21ce : declared base
class b06d39a03faa5["ApplicationController"] {
  <<unresolved_base>>
}
tb0660d882e74 ..> b06d39a03faa5 : declared base
class bf0d517ccfe97["ApplicationController"] {
  <<unresolved_base>>
}
te74c95b27ab9 ..> bf0d517ccfe97 : declared base
class b4387f5fdab61["ActiveRecord"] {
  <<unresolved_base>>
}
t507ea3b434b7 ..> b4387f5fdab61 : declared base
class bf1ccf4a6fae5["Base"] {
  <<unresolved_base>>
}
t507ea3b434b7 ..> bf1ccf4a6fae5 : declared base
class b7aff22b225bf["ActiveRecord"] {
  <<unresolved_base>>
}
teaffcf98c1af ..> b7aff22b225bf : declared base
class baa51e6c4d3ac["Base"] {
  <<unresolved_base>>
}
teaffcf98c1af ..> baa51e6c4d3ac : declared base
class b8ebb2ba28373["ActiveRecord"] {
  <<unresolved_base>>
}
t3d8e51a5861b ..> b8ebb2ba28373 : declared base
class bd2eb40535edb["Base"] {
  <<unresolved_base>>
}
t3d8e51a5861b ..> bd2eb40535edb : declared base
class bdfe6f931ddc7["CarrierWave"] {
  <<unresolved_base>>
}
t365c5f73a845 ..> bdfe6f931ddc7 : declared base
class b58373087e72b["Uploader"] {
  <<unresolved_base>>
}
t365c5f73a845 ..> b58373087e72b : declared base
class bdcc7e7756ad6["Base"] {
  <<unresolved_base>>
}
t365c5f73a845 ..> bdcc7e7756ad6 : declared base
class b14b22903d121["CarrierWave"] {
  <<unresolved_base>>
}
t02b326265c03 ..> b14b22903d121 : declared base
class b2e18ae1a52e7["Uploader"] {
  <<unresolved_base>>
}
t02b326265c03 ..> b2e18ae1a52e7 : declared base
class bf7a34fbf068a["Base"] {
  <<unresolved_base>>
}
t02b326265c03 ..> bf7a34fbf068a : declared base
class b656be7aa4ef3["Rails"] {
  <<unresolved_base>>
}
t1b987a5d8a58 ..> b656be7aa4ef3 : declared base
t1b987a5d8a58 <|-- t1b987a5d8a58
class bbdad3cd73cb5["ActiveRecord"] {
  <<unresolved_base>>
}
t8a2d1d5f3397 ..> bbdad3cd73cb5 : declared base
class b3cbff79e4244["Migration"] {
  <<unresolved_base>>
}
t8a2d1d5f3397 ..> b3cbff79e4244 : declared base
class bf941026e7405["ActiveRecord"] {
  <<unresolved_base>>
}
t413ee87dca90 ..> bf941026e7405 : declared base
class b35ea4c6d3585["Migration"] {
  <<unresolved_base>>
}
t413ee87dca90 ..> b35ea4c6d3585 : declared base

Unresolved bases remain labelled; full signatures are not reconstructed.

Type index

Reference

58 / 58 eligible files read (171 in the tree); 0 oversized, 0 failed reads and 0 syntax diagnostics.

What the scan covers

Known dependency/build folders, credential files and binaries are excluded. The scan covers READMEs, recognized manifests and parser-supported source files.

Linguist statistics cover the whole repository and may include other languages.

File map
flowchart TD
  root["linkshare"]
  f0["Gemfile"]
  root --> f0
  f1["README.md"]
  root --> f1
  f2["config/routes.rb"]
  root --> f2
  f3["config/application.rb"]
  root --> f3
  f4["config/boot.rb"]
  root --> f4
  f5["config/environment.rb"]
  root --> f5
  f6["db/schema.rb"]
  root --> f6
  f7["db/seeds.rb"]
  root --> f7
  f8["test/test_helper.rb"]
  root --> f8
  f9["app/controllers/application_controller.rb"]
  root --> f9
  f10["app/controllers/comments_controller.rb"]
  root --> f10
  f11["app/controllers/links_controller.rb"]
  root --> f11
  f12["app/controllers/users_controller.rb"]
  root --> f12
  f13["app/helpers/application_helper.rb"]
  root --> f13
  f14["app/helpers/comments_helper.rb"]
  root --> f14
  f15["app/helpers/links_helper.rb"]
  root --> f15

Files to read 3

References