{"id":13850157,"url":"https://github.com/lucamug/elm-spa-boilerplate","last_synced_at":"2025-12-30T02:21:14.257Z","repository":{"id":73800628,"uuid":"117347523","full_name":"lucamug/elm-spa-boilerplate","owner":"lucamug","description":"Boilerplate to create Single Page Applications in Elm","archived":false,"fork":false,"pushed_at":"2018-10-28T02:36:49.000Z","size":811,"stargazers_count":34,"open_issues_count":0,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-05T20:31:53.707Z","etag":null,"topics":["localstorage","pushstate","seo","spa","style-guide"],"latest_commit_sha":null,"homepage":"https://medium.com/@l.mugnaini/single-page-application-boilerplate-for-elm-160bb5f3eec2","language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucamug.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-01-13T13:54:18.000Z","updated_at":"2022-05-28T05:26:30.000Z","dependencies_parsed_at":"2024-01-18T09:57:53.440Z","dependency_job_id":"e60a2c0d-ec87-4b90-957d-8eeea205355b","html_url":"https://github.com/lucamug/elm-spa-boilerplate","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/lucamug%2Felm-spa-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucamug%2Felm-spa-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucamug%2Felm-spa-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucamug%2Felm-spa-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucamug","download_url":"https://codeload.github.com/lucamug/elm-spa-boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225839485,"owners_count":17532305,"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":["localstorage","pushstate","seo","spa","style-guide"],"created_at":"2024-08-04T20:01:00.304Z","updated_at":"2025-12-30T02:21:14.231Z","avatar_url":"https://github.com/lucamug.png","language":"Elm","funding_links":[],"categories":["Elm"],"sub_categories":[],"readme":"# elm-spa-boilerplate\n\n* Demo http://elm-spa-boilerplate.guupa.com/\n* Article https://medium.com/@l.mugnaini/single-page-application-boilerplate-for-elm-160bb5f3eec2\n\n## Characteristics\n\n* Use of pushState navigation using forward slash “/” as path separator\n* List of pages in the configuration, easy to add or remove them\n* Implementation of localStorage through ports\n* Example of Ajax request\n* Update of the Title and Meta Description of the page for [Search Engine Optimisation (SEO)](https://medium.com/@l.mugnaini/spa-and-seo-is-googlebot-able-to-render-a-single-page-application-1f74e706ab11)\n* Webpack environment (based on https://github.com/halfzebra/create-elm-app)\n* [Experimental Built-in Living Style Guide generator](https://medium.com/@l.mugnaini/zero-maintenance-always-up-to-date-living-style-guide-in-elm-dbf236d07522) base on stateless components ([Example](http://elm-spa-boilerplate.surge.sh/styleguide)).\n* Sitemap ([Example](http://elm-spa-boilerplate.surge.sh/sitemap))\n* Transition between pages\n\n## Usage\n\nIf you don’t have Elm yet:\n```\n$ npm install -g elm\n```\nIf you don’t have create-elm-app yet:\n```\n$ npm install -g create-elm-app\n```\nthen\n```\n$ git clone https://github.com/lucamug/elm-spa-boilerplate myproject\n$ cd myproject\n$ rm -rf .git    # To remove the boilerplate repo, on Windows:\n                 # rmdir .git /s /q\n$ elm-app start  # To start the local server\n```\nThen access http://localhost:3000/, and everything should work.\n\nOpen the code, in `src`, and poke around!\n\nTo build the production version:\n```\n$ elm-app build\n```\nThe production version is built in build/\n\n## Deploy the app in Surge\n\nGithub doesn’t support SPA yet. If you want to check your app in production you can use Surge.\n\nIf you don’t have Surge yet\n```\n$ npm install -g surge\n```\nthen:\n\n```\n$ elm-app build\n$ mv build/index.html build/200.html\n$ surge build myproject.surge.sh\n```\nOther useful Surge commands\n```\n$ surge list\n$ surge teardown myproject.surge.sh\n```\n\n## To create a new repository\n\nFrom myproject foder:\n```\n$ git init\n$ git add .\n$ git commit -m 'first commit'\n```\n\n## Links\n\nhttp://package.elm-lang.org/packages/mdgriffith/stylish-elephants/4.0.0/\nhttp://package.elm-lang.org/packages/mdgriffith/style-elements/4.2.1/\n\nhttps://github.com/mdgriffith/stylish-elephants\nhttps://github.com/mdgriffith/style-elements\n\nhttps://mdgriffith.gitbooks.io/style-elements/content/\n\nhttps://css-tricks.com/snippets/css/a-guide-to-flexbox/\n\nhttps://app.netlify.com/\n\n## Lines of code\n\n```\n$ cloc src \u003e loc.txt\n```\n\n```\n-------------------------------------------------------------------------------\nLanguage                     files          blank        comment           code\n-------------------------------------------------------------------------------\nElm                              9            419             66           1543\nJavaScript                       2             15             27            107\n-------------------------------------------------------------------------------\nSUM:                            11            434             93           1650\n-------------------------------------------------------------------------------\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucamug%2Felm-spa-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucamug%2Felm-spa-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucamug%2Felm-spa-boilerplate/lists"}