{"id":21262368,"url":"https://github.com/johanbrook/systemet","last_synced_at":"2025-03-15T07:42:28.920Z","repository":{"id":3425139,"uuid":"4476660","full_name":"johanbrook/systemet","owner":"johanbrook","description":"A small web app which responds to the simple question: \"is the closest liquor store open?\"","archived":false,"fork":false,"pushed_at":"2012-10-10T18:48:17.000Z","size":4710,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-21T22:42:49.006Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johanbrook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-05-29T02:07:25.000Z","updated_at":"2017-09-02T18:45:46.000Z","dependencies_parsed_at":"2022-09-21T13:13:03.541Z","dependency_job_id":null,"html_url":"https://github.com/johanbrook/systemet","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/johanbrook%2Fsystemet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanbrook%2Fsystemet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanbrook%2Fsystemet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanbrook%2Fsystemet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johanbrook","download_url":"https://codeload.github.com/johanbrook/systemet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243701314,"owners_count":20333616,"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-21T04:58:15.975Z","updated_at":"2025-03-15T07:42:28.899Z","avatar_url":"https://github.com/johanbrook.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Is \"Systembolaget\" open?\n\nThis is a small app which responds \"Yes\" or \"No\" to the question above, which I've asked myself many, many times.\n\n### Visit [oppet.systmt.se](http://oppet.systmt.se) to check out the app live\n\nIn Sweden there's this alcohol monopoly, which means all liqour stores are run by the state. \nThus there's no competition, and the opening hours are ... not that satisfactory. There's been days where I in panic\nhave looked for the closest open liqour store, just to find out that they closed fifteen minutes ago. \n\n**But no more.**\n\n## Tech\n\nI built this app partly to learn more about Node.js and MongoDB. It's been a ride. The Swedish \"Systembolaget\"'s \npublic store API is in XML and badly formatted. Thus I decided to parse the XML daily and put it into a MongoDB\ninstance in order to get better experience querying for closest store, and more. And MongoDB is sexier than XML.\n\nStuff I've used\n\n- Node.js\n- Express.js\n- MongoDB\n- EJS\n- CoffeeScript\n- xml2js (XML to JSON)\n- HTML5 GeoLocation\n- A Gauss-Kruger conversion library (from RT90 coords to WSG)\n- SCSS/Compass\n\nHosted on the Heroku Cedar stack with the MongoLab addon.\n\n## Build\n\nBe sure to install Node dependencies with\n\n    npm install\n\nbefore first run. The Gauss-Kruger conversion library is already bundled in this repo, as it's not on\nNPM (yet).\n\nIn order to build the CoffeeScript files, just run\n\n    cake build\n\nIf you want to watch and auto-compile, run\n\n    cake watch\n\nTo run the import script which grabs the XML from Systembolaget.se, do\n\n    cd build\n    node script/import.js\n\nIt'll get the data from `http://www.systembolaget.se/Assortment.aspx?butikerombud=1`, parse it to JSON, and insert it\ninto a local MongoDB database (be sure to have it started).\n\nRead more about Systembolaget's open APIs on \n[systembolaget.se/Tjanster/Oppna-APIer/](http://www.systembolaget.se/Tjanster/Oppna-APIer/)\n\nThe database details I use are\n\n    host: localhost\n    port: 27017\n    dbname: systemet\n    collection: stores\n\nYou'll find this in the code as well (`src/script/import.coffee`)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohanbrook%2Fsystemet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohanbrook%2Fsystemet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohanbrook%2Fsystemet/lists"}