{"id":20687862,"url":"https://github.com/cribbles/slipmat","last_synced_at":"2025-04-22T15:13:39.453Z","repository":{"id":94979276,"uuid":"42522803","full_name":"cribbles/Slipmat","owner":"cribbles","description":"Discogs clone, powered by Rails and Backbone","archived":false,"fork":false,"pushed_at":"2015-11-17T00:55:03.000Z","size":10268,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-22T15:13:23.909Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://slipmat.xyz","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cribbles.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-15T13:59:17.000Z","updated_at":"2024-02-22T13:59:25.000Z","dependencies_parsed_at":"2023-03-10T22:45:20.546Z","dependency_job_id":null,"html_url":"https://github.com/cribbles/Slipmat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cribbles%2FSlipmat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cribbles%2FSlipmat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cribbles%2FSlipmat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cribbles%2FSlipmat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cribbles","download_url":"https://codeload.github.com/cribbles/Slipmat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250264913,"owners_count":21402004,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T22:58:29.471Z","updated_at":"2025-04-22T15:13:39.438Z","avatar_url":"https://github.com/cribbles.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slipmat\n\n[Live](http://slipmat.xyz)\n\n## Summary\n\nSlipmat is a near-faithful clone of [Discogs](http://discogs.com), the\nInternet's largest database and marketplace for audio recordings. Slipmat\nreplicates most of the core functionality and UI components of Discogs's\ninventory and user systems. The main difference is that Slipmat is designed\nfrom the ground up as a single-page application.\n\n### Languages:\n- Javascript\n- Ruby\n- HTML / CSS\n\n### Frameworks:\n- Backbone\n- Rails\n\n### Libraries and Technologies:\n- jQuery / AJAX\n- jQuery-UI\n- paperclip / AWS\n- pg_search\n- kaminari\n- figaro\n- jbuilder\n- omniauth\n- friendly_id\n\n## What can I do on this website?\n\nYou can:\n- Securely create an account\n- Log in using Facebook or Google\n- Edit your own profile\n- Add records to your wantlist and collection\n- Contribute new records to the database\n- Contribute information about records, artists, and labels\n- Update, sort, and customize tracklists (using jQuery sortable UI)\n- Tag and sort records by genre\n- Comment on records, artists, and labels\n\nSlipmat provides an robust interface for browsing, searching, and sorting\nrecords, artists, and labels. It features:\n- Live search results in the header search bar\n- Global, weighted search index for records, artists, and labels\n- Stackable category filtering for records\n  - Sort by year, genre, or country\n- Tabbed and paginated index for records, artists, and labels\n\n## API\n\nSlipmat is powered by a RESTful JSON API.\n\nI took great care to ensure correspondence between Backbone routes and API\nendpoints. If you're on a page that displays data, you can replace the `#` in\nthe URI fragment at any time with `api` to see what's being served up for a\ngiven view. This includes [search](http://slipmat.xyz/api/search?query=jackson)\nand [sort](http://slipmat.xyz/api/records/search?genre=Electronic) results.\n\nMany API responses handle nested data and associations. I made extensive use of\njbuilder to manage these. Nearly all Backbone models override the `parse` method\nto keep track of nested associations.\n\nI used Rails's counter caching and eager loading to optimize data retreival. API\nresponses are structured to prevent N+1 queries. I used model scoping with\n`find_by_sql` as needed to minimize database fetching and keep controllers slim.\n\nI structured user comments and contributions as polymorphic associations in\norder to prevent bloat. This greatly reduced the overhead for my Rails models\nand Backbone views.\n\n## Slipmat.Import\n\nSlipmat features a super handy [import\nutility](app/assets/javascripts/utils/import.js), `Slipmat.Import`, for\nconstructing seed data based on real Discogs releases.\n\nFor my own convenience, I've bound it to a Backbone route. Visit\n`#/import/(discogs release id)` if you want to try it out!\n\nHere's how it works:\n\n- `Import#import` takes Discogs release ID provided in the URI fragment as an\nargument and fetches the release data from the [official Discogs\nAPI](http://www.discogs.com/developers/) by making a GET request to the\nrelease's API endpoint.\n- On success, the payload is passed along to `Import#parse`. This parses the\nDiscogs data into Backbone model attributes, sets them on a new instance of\n`Slipmat.Models.Record` and saves the record. This includes nested associations,\ne.g. tracklist, genre taggings, artist and label.\n- On success, the persisted model is passed along to `Import#fetchImage`, which\nmakes a separate GET request to the Discogs search engine, sending along the\nartist name and album title as parameters.\n- On success, the payload is scanned for the first associated thumbnail URI,\nwhich is passed along to `Import#patchImage`. This updates the persisted model\nby assigning the thumbnail to the its `image_url` attribute and saving it.\n\n_N.B._ - under the hood, the Rails `Record` model doesn't really have an\n`image_url` attribute. Instead, we override `#image_url=` like so:\n\n```ruby\ndef image_url=(image_url)\n  self.image = open(image_url)\nend\n```\n\nThis intercepts the thumbnail before saving the model and delegates the file\ncontents to Paperclip, which politely stores the thumbnail on AWS for us and\ndisplays it normally (i.e. without image leeching).\n\n## Future polishing touches (TBD)\n- User activity / feed\n- Git diff / wiki like updates for records, artists, and labels\n- Comment on comments\n- Multiple formats and releases (CD, Cassette, Reissue, Deluxe, etc.)\n- Buy and sell records\n- User messaging\n- Ratings for records (5 star scale)\n- Add records to lists (Best Reggae records of the 90s, etc.)\n\n## License\n\nSlipmat is released under the [MIT License](/LICENSE).\n\n---\nDeveloped by [Chris Sloop](http://chrissloop.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcribbles%2Fslipmat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcribbles%2Fslipmat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcribbles%2Fslipmat/lists"}