{"id":15059552,"url":"https://github.com/jlengrand/elm-firebase","last_synced_at":"2026-03-08T12:31:39.570Z","repository":{"id":38704019,"uuid":"199259365","full_name":"jlengrand/elm-firebase","owner":"jlengrand","description":"A simple repository to show Elm integration with Firebase using ports - WIP","archived":false,"fork":false,"pushed_at":"2025-06-02T21:39:30.000Z","size":1411,"stargazers_count":50,"open_issues_count":14,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-09T20:08:59.922Z","etag":null,"topics":["elm","elm-lang","elm-language","firebase","firebase-auth","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Elm","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/jlengrand.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,"zenodo":null}},"created_at":"2019-07-28T07:59:38.000Z","updated_at":"2025-03-09T16:21:44.000Z","dependencies_parsed_at":"2025-04-10T05:34:25.186Z","dependency_job_id":"36d8950d-ed1c-48cf-88b4-73d26b36da13","html_url":"https://github.com/jlengrand/elm-firebase","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/jlengrand/elm-firebase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlengrand%2Felm-firebase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlengrand%2Felm-firebase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlengrand%2Felm-firebase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlengrand%2Felm-firebase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jlengrand","download_url":"https://codeload.github.com/jlengrand/elm-firebase/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlengrand%2Felm-firebase/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30256052,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T08:59:44.879Z","status":"ssl_error","status_checked_at":"2026-03-08T08:58:02.867Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["elm","elm-lang","elm-language","firebase","firebase-auth","hacktoberfest"],"created_at":"2024-09-24T22:45:26.976Z","updated_at":"2026-03-08T12:31:39.553Z","avatar_url":"https://github.com/jlengrand.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elm Firebase\n\n \u003ca href=\"https://trackgit.com\"\u003e\n\u003cimg src=\"https://us-central1-trackgit-analytics.cloudfunctions.net/token/ping/litfwbveqpoqgp5reoil\" alt=\"trackgit-views\" /\u003e\n\u003c/a\u003e\n\n\nA simple repository to show Elm integration with Firebase using ports. You can read more about it in my [short blog post introducing it](https://lengrand.fr/using-firebase-in-elm/).\n\nYou can demo the app **[here](https://elm-firebase.netlify.com/)**.\n\nThis demo runs on **[Elm 0.19](https://elm-lang.org)**.\n\n## Getting started\n\nTo run this app locally, you will need to :\n\n- Set up your [Firebase Cloud Firestore](https://firebase.google.com/docs/firestore) to handle and receive users and messages.\n- Be able to run this repository\n\n### Setting up the Database and Auth\n\n- Go to the [Firebase console](https://console.firebase.google.com/?pli=1) and create a new project\n- Setup Google Signin in the Authentication part.\n\n![How to setup Google Sign-In](images/auth-setup.png)\n\n- Create a new Cloud Firestore in locked mode\n- Change the Firestore rules so that only logged requests can be written / read.\n\n```\nrules_version = '2';\nservice cloud.firestore {\n  match /databases/{database}/documents {\n\t\tmatch /users/{userId}/messages/{messageId} {\n      allow create, read, update, delete: if request.auth.uid == userId;\n    }\n  }\n}\n```\n\nUsing those rules, each user will get its own space, with a messages store inside it. So this doubles down as database setup, and security.\n\nThat should be it! If needed, test your rules using the [Simulator](https://firebase.google.com/docs/firestore/security/get-started#testing_rules).\n\n### Running the code\n\nTo run the code, only a few steps are needed :).\n\n- Clone the repo : `$ git clone git@github.com:jlengrand/elm-firebase.git`\n- Move in the repo : `$ cd elm-firebase`\n- Install necessary dependencies. The easiest way is probably to run `$ npm install`.\n- You will need to create a `.env` file in your root folder to let the app know about your Firestore project. The `.env` file looks like this :\n\n```\nELM_APP_API_KEY=\"AIzaSyCjjxds-Qrk2Vsjj8qktPuzEgwerggeg\"\nELM_APP_AUTH_DOMAIN=\"test-elm-login-elererge.firebaseapp.com\"\nELM_APP_DATABASE_URL=\"https://test-elm-login-elererge.firebaseio.com\"\nELM_APP_PROJECT_ID=\"test-elm-login-elererge\"\nELM_APP_STORAGE_BUCKET=\"\"\nELM_APP_MESSAGING_SENDER_ID=\"916631954567\"\nELM_APP_APP_ID=\"1:916631954567:web:2a755b103fe23041\"\n```\n\nThe required information is the same as described in the [Firebase config object](https://firebase.google.com/docs/web/setup#config-object).\nThe easiest way is to go to the settings page of your project, and scroll down until you see the javascript snippet. It will contain all the information needed.\n\n_Note : All the informationm in the .env file is not secret, and can be shared. In fact, it will be accessible to anyone using your app via the console. [This is not a problem](https://stackoverflow.com/questions/37482366/is-it-safe-to-expose-firebase-apikey-to-the-public)!_\n\n![Settings page of Firebase project](images/settings.png)\n\n- Run the app : `$ npm start`. You will be able to test the app at `http://localhost:3000`!\n\n### Deploying\n\nIf for some reason you want to deploy the code somewhere, you can run `$ npm run build`. Now you simply have to serve the content of the `build` folder, and you're done!\n\n## Contributing\n\nContributions are more than welcome ! You can [pick one of the issues of the list](https://github.com/jlengrand/elm-firebase/issues) or simply create your own :).\n\n## Authors\n\n* [Julien Lengrand-Lambert](https://twitter.com/jlengrand)\n\nHappy hacking!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlengrand%2Felm-firebase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjlengrand%2Felm-firebase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlengrand%2Felm-firebase/lists"}