{"id":16710677,"url":"https://github.com/mdgriffith/elm-prefab","last_synced_at":"2025-03-21T20:33:07.701Z","repository":{"id":229238067,"uuid":"606760925","full_name":"mdgriffith/elm-prefab","owner":"mdgriffith","description":"Maintainable code generation for Elm Apps","archived":false,"fork":false,"pushed_at":"2024-06-07T11:22:24.000Z","size":3453,"stargazers_count":9,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-07-06T09:13:30.551Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/mdgriffith.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-26T13:45:38.000Z","updated_at":"2024-07-15T20:04:58.706Z","dependencies_parsed_at":null,"dependency_job_id":"ba085500-ee98-4066-a4bf-2f9d1289467d","html_url":"https://github.com/mdgriffith/elm-prefab","commit_stats":null,"previous_names":["mdgriffith/elm-prefab"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Felm-prefab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Felm-prefab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Felm-prefab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Felm-prefab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdgriffith","download_url":"https://codeload.github.com/mdgriffith/elm-prefab/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244866176,"owners_count":20523476,"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-10-12T20:09:16.605Z","updated_at":"2025-03-21T20:33:07.288Z","avatar_url":"https://github.com/mdgriffith.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elm Prefab\n\n\u003e **Prefab** _(Noun)_\n\u003e A prefabricated building or structure that is manufactured in sections, typically in a factory, and then transported and assembled on site to form a complete structure.\n\n\u003e **Prefab** _(Adjective)_\n\u003e A portmanteau of \"Pretty\" and \"Fabulous\" :sparkles:\n\nElm Prefab is a codegeneration tool for generating and maintaining Elm apps.\n\nIt's organized via plugins, where each plugin is independent. You can pick and choose what you want.\n\n- **App** - A base app architecture that has\n\n  - Page-level state caching\n  - Notion-like flexibility for _viewing multiple pages_ at once.\n  - Routing generation - Spend as little time futzing with routes as possible!\n  - Built-in support for [`elm-program-test`](https://package.elm-lang.org/packages/avh4/elm-program-test/latest/) for full end-to-end testing of your Elm app.\n\n- **Assets** - Be able to link to a static asset\n\n- **GraphQL** - Write GraphQL queries and mutations and get Elm code to use them! (Powered by [vendrinc/elm-gql](https://github.com/Vendrinc/elm-gql))\n\n[The Elm Architecture](https://guide.elm-lang.org/architecture/) is a very stable way to build apps, but there are some nuances to master.\n\nThis project is born out of years of experience working on large (\u003e500k lines) Elm apps at Blissfully and now [Vendr](vendr.com).\n\nThis is for those who want to speed up development for new projects, avoid some tricky situations that can be expensive to fix, and get some super powers along the way 🚀.\n\n## Getting started\n\nGenerate a new Elm project!:\n\n```bash\nnpx elm-prefab\n```\n\n- [Check out an example of what's generated.](https://github.com/mdgriffith/elm-prefab/blob/main/examples/example-app/README.md)\n\nOr, if you want to get started more \"traditionally\":\n\n```bash\n# navigate to your project directory and install `elm-prefab`\nnpm install --save-dev elm-prefab\n\n# Running `elm-prefab` will generate working\nnpm run elm-prefab\n```\n\n## Starting the Vite development server\n\n`npm run dev` will start a dev server using [`Vite`](https://vitejs.dev/) so you can get coding!\n\nRunning `npm run build` will build things for production, with the resultant files in the `dist` folder. Feel free to check out the [ViteJS docs](https://vitejs.dev/guide/).\n\n## The first place to look\n\n`elm-prefab` has generated [`src/Page/Home.elm`](https://github.com/mdgriffith/elm-prefab/blob/main/examples/example-app/src/Page/Home.elm) for you, let's take a look.\n\nIf you've worked with Elm before it should be pretty familiar as a standard `model/update/Msg/view` thing.\n\nThe next place to look is [`src/Main.elm`](https://github.com/mdgriffith/elm-prefab/blob/main/examples/example-app/src/Main.elm).\n\nThis is the _global_ part of the app. This is where you can control:\n\n- Global layout, including showing multiple pages in one layout.\n- Authentication logic.\n- Any other \"App-wide\" thing you might want.\n\nNow go build something! If you have questions, check out the below guides.\n\n- [Managing routes and pages](https://github.com/mdgriffith/elm-prefab/blob/main/guides/plugins/app/routes_and_pages.md)\n- [Using local storage](https://github.com/mdgriffith/elm-prefab/blob/main/guides/how-to/using-localstorage.md)\n- [Managing assets](https://github.com/mdgriffith/elm-prefab/blob/main/guides/plugins/assets.md)\n- [Using GraphQL](https://github.com/mdgriffith/elm-prefab/blob/main/guides/plugins/graphql.md)\n\n## FAQ\n\n- [Why does this thing exist?](https://github.com/mdgriffith/elm-prefab/blob/main/guides/why/app_architecture.md)\n- [Why is routing handled like it is?](https://github.com/mdgriffith/elm-prefab/blob/main/guides/why/routes.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdgriffith%2Felm-prefab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdgriffith%2Felm-prefab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdgriffith%2Felm-prefab/lists"}