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.
Repository languagesRuby 55.29%5
Shares calculated from GitHub Linguist bytes.
| Language | % | Bytes |
|---|---|---|
| Ruby | 74,011 | |
| HTML | 26,174 | |
| CSS | 17,773 | |
| JavaScript | 15,470 | |
| CoffeeScript | 422 |
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
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.
- Browser request
- Rails router
- Links and comments controllers
- Models and persistence
- Rendered response
Links verified in the repository.
Mermaid Interactive diagram (loads on open)

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
ApplicationController(class) ·app/controllers/application_controller.rb:1Methods in the overview:
configure_permitted_parameters.Declared bases:
ActionController, Base.CommentsController(class) ·app/controllers/comments_controller.rb:1Methods in the overview:
create, destroy, set_comment, comment_params.Declared bases:
ApplicationController.LinksController(class) ·app/controllers/links_controller.rb:1Methods in the overview:
index, authorized_user, show, new.Declared bases:
ApplicationController.UsersController(class) ·app/controllers/users_controller.rb:1Methods in the overview:
index, show, set_user, user_params.Declared bases:
ApplicationController.Comment(class) ·app/models/comment.rb:18Declared bases:
ActiveRecord, Base.Link(class) ·app/models/link.rb:19Methods in the overview:
search.Declared bases:
ActiveRecord, Base.User(class) ·app/models/user.rb:28Methods in the overview:
search.Declared bases:
ActiveRecord, Base.AvatarUploader(class) ·app/uploaders/avatar_uploader.rb:3Methods in the overview:
store_dir, extension_white_list.Declared bases:
CarrierWave, Uploader, Base.FileUploader(class) ·app/uploaders/file_uploader.rb:3Methods in the overview:
store_dir, to_jq_upload.Declared bases:
CarrierWave, Uploader, Base.Application(class) ·config/application.rb:10Declared bases:
Rails, Application.CreateLinks(class) ·db/migrate/20150716224041_create_links.rb:1Methods in the overview:
change.Declared bases:
ActiveRecord, Migration.DeviseCreateUsers(class) ·db/migrate/20150716224938_devise_create_users.rb:1Methods in the overview:
change.Declared bases:
ActiveRecord, Migration.
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