{"id":19552249,"url":"https://github.com/simonewebdesign/phoenix-fizzbuzz","last_synced_at":"2026-06-09T01:04:20.432Z","repository":{"id":147912736,"uuid":"93302752","full_name":"simonewebdesign/phoenix-fizzbuzz","owner":"simonewebdesign","description":null,"archived":false,"fork":false,"pushed_at":"2017-06-11T19:00:23.000Z","size":117,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-20T01:17:33.395Z","etag":null,"topics":["api","fizzbuzz","phoenix"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/simonewebdesign.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-06-04T09:19:30.000Z","updated_at":"2017-06-11T20:26:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd46df0b-b2da-493d-b0fb-667b5aa728a2","html_url":"https://github.com/simonewebdesign/phoenix-fizzbuzz","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simonewebdesign/phoenix-fizzbuzz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonewebdesign%2Fphoenix-fizzbuzz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonewebdesign%2Fphoenix-fizzbuzz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonewebdesign%2Fphoenix-fizzbuzz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonewebdesign%2Fphoenix-fizzbuzz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonewebdesign","download_url":"https://codeload.github.com/simonewebdesign/phoenix-fizzbuzz/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonewebdesign%2Fphoenix-fizzbuzz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34086665,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["api","fizzbuzz","phoenix"],"created_at":"2024-11-11T04:17:23.236Z","updated_at":"2026-06-09T01:04:20.426Z","avatar_url":"https://github.com/simonewebdesign.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FizzBuzz [![Build Status](https://travis-ci.org/simonewebdesign/phoenix-fizzbuzz.svg?branch=master)](https://travis-ci.org/simonewebdesign/phoenix-fizzbuzz) [![Coverage Status](https://coveralls.io/repos/github/simonewebdesign/phoenix-fizzbuzz/badge.svg?branch=master)](https://coveralls.io/github/simonewebdesign/phoenix-fizzbuzz?branch=master)\n\nA Phoenix application.\n\n## Getting started\n\nYou need to have Elixir 1.4.x installed on your machine.\n\nTo start the Phoenix server:\n\n    mix deps.get\n    mix phx.server\n\nNow you can visit [`localhost:4000`](http://localhost:4000) from your browser.\n\nYou can also run the app inside IEx (Interactive Elixir) as:\n\n    $ iex -S mix phx.server\n\nTo run the tests:\n\n    mix test\n\n## Walk-through\n\nThe relevant files are:\n\n- [`lib/fizzbuzz.ex`](https://github.com/simonewebdesign/phoenix-fizzbuzz/blob/master/lib/fizzbuzz.ex): fizzbuzz implementation.\n- [`lib/fizzbuzz/item.ex`](https://github.com/simonewebdesign/phoenix-fizzbuzz/blob/master/lib/fizzbuzz/item.ex): model.\n- [`lib/fizzbuzz/web/controllers/page_controller.ex`](https://github.com/simonewebdesign/phoenix-fizzbuzz/blob/master/lib/fizzbuzz/web/controllers/page_controller.ex): controller.\n- [`lib/fizzbuzz/web/templates/page/index.html.eex`](https://github.com/simonewebdesign/phoenix-fizzbuzz/blob/master/lib/fizzbuzz/web/templates/page/index.html.eex): view template.\n- [`priv/static/js/app.js`](https://github.com/simonewebdesign/phoenix-fizzbuzz/blob/master/priv/static/js/app.js): web client.\n\nThere is one single entry-point, which is [`localhost:4000`](http://localhost:4000). It's not a SPA, although it's quite close to being one. Marking favourites doesn't require a page reload because it's using websockets.\n\nThe `PageController`'s `index` function is taking care of paginating the results and serving them in either HTML or JSON, depending on the client request.\n\nThe number of values displayed defaults to 100 per page and the limit is capped at 100,000,000,000 results. However it is possible to go even further and display extremely big values (you can do so by incrementing the querystring's `page` parameter).\n\nEven with huge values, the server remains very fast and responsive. There is no caching layer, but the favourites are saved in an ETS table, which is an in-memory storage – that's why it's so fast: it's never going to write to disk. This also means that when we restart the server we lose the data, but I decided to use it anyway because:\n\n- MySQL or PostgreSQL felt overkill for a fizzbuzz app;\n- ETS is simple and does the job;\n- I wanted to learn how it works.\n\nOn a real-world app I would probably choose to use Ecto with PostgreSQL or equivalent. My primary goal was to \"Keep It Simple, Stupid\" (KISS).\n\nFor the JSON API you can just add `json` to the querystring, i.e. [`localhost:4000/?json`](http://localhost:4000/?json). The pagination works the same way.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonewebdesign%2Fphoenix-fizzbuzz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonewebdesign%2Fphoenix-fizzbuzz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonewebdesign%2Fphoenix-fizzbuzz/lists"}