{"id":15130686,"url":"https://github.com/firebaseextended/firepad","last_synced_at":"2025-12-12T04:05:52.868Z","repository":{"id":7674625,"uuid":"9037027","full_name":"FirebaseExtended/firepad","owner":"FirebaseExtended","description":"Collaborative Text Editor Powered by Firebase","archived":true,"fork":false,"pushed_at":"2024-09-11T07:21:02.000Z","size":41569,"stargazers_count":3872,"open_issues_count":105,"forks_count":881,"subscribers_count":165,"default_branch":"master","last_synced_at":"2025-01-20T09:28:28.000Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FirebaseExtended.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","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":"2013-03-26T18:16:29.000Z","updated_at":"2025-01-02T13:34:24.000Z","dependencies_parsed_at":"2024-01-08T07:02:31.926Z","dependency_job_id":"d5f84bcd-624f-446b-8c6d-f09926d21caa","html_url":"https://github.com/FirebaseExtended/firepad","commit_stats":{"total_commits":457,"total_committers":57,"mean_commits":8.017543859649123,"dds":0.7264770240700219,"last_synced_commit":"4daf24bd0dcd27a017cc4b6607af1d3887c25944"},"previous_names":["firebase/firepad"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FirebaseExtended%2Ffirepad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FirebaseExtended%2Ffirepad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FirebaseExtended%2Ffirepad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FirebaseExtended%2Ffirepad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FirebaseExtended","download_url":"https://codeload.github.com/FirebaseExtended/firepad/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237793867,"owners_count":19367421,"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-09-26T03:03:46.636Z","updated_at":"2025-10-23T07:30:36.070Z","avatar_url":"https://github.com/FirebaseExtended.png","language":"JavaScript","readme":"# Firepad [![Actions Status][gh-actions-badge]][gh-actions] [![Coverage Status](https://img.shields.io/coveralls/FirebaseExtended/firepad.svg?branch=master\u0026style=flat)](https://coveralls.io/r/FirebaseExtended/firepad) [![Version](https://badge.fury.io/gh/firebase%2Ffirepad.svg)](http://badge.fury.io/gh/firebase%2Ffirepad)\n\n[Firepad](http://www.firepad.io/) is an open-source, collaborative code and text editor. It is\ndesigned to be embedded inside larger web applications.\n\nJoin our [Firebase Google Group](https://groups.google.com/forum/#!forum/firebase-talk) to ask\nquestions, request features, or share your Firepad apps with the community.\n\n## Status\n\n![Status: Frozen](https://img.shields.io/badge/Status-Frozen-yellow)\n\nThis repository is no longer under active development. No new features will be added and issues are not actively triaged. Pull Requests which fix bugs are welcome and will be reviewed on a best-effort basis.\n\nIf you maintain a fork of this repository that you believe is healthier than the official version, we may consider recommending your fork. Please open a Pull Request if you believe that is the case.\n\n\n## Table of Contents\n\n * [Getting Started With Firebase](#getting-started-with-firebase)\n * [Live Demo](#live-demo)\n * [Downloading Firepad](#downloading-firepad)\n * [Documentation](#documentation)\n * [Examples](#examples)\n * [Contributing](#contributing)\n * [Database Structure](#database-structure)\n * [Repo Structure](#repo-structure)\n\n\n## Getting Started With Firebase\n\nFirepad requires [Firebase](https://firebase.google.com/) in order to sync and store data. Firebase\nis a suite of integrated products designed to help you develop your app, grow your user base, and\nearn money. You can [sign up here for a free account](https://console.firebase.google.com/).\n\n\n## Live Demo\n\nVisit [firepad.io](http://demo.firepad.io/) to see a live demo of Firepad in rich text mode, or the\n[examples page](http://www.firepad.io/examples/) to see it setup for collaborative code editing.\n\n[![a screenshot of demo.firepad.io including a picture of two cats and a discussion about fonts](screenshot.png)](http://demo.firepad.io/)\n\n\n## Downloading Firepad\n\nFirepad uses [Firebase](https://firebase.google.com) as a backend, so it requires no server-side\ncode. It can be added to any web app by including a few JavaScript files:\n\n```HTML\n\u003chead\u003e\n  \u003c!-- Firebase --\u003e\n  \u003cscript src=\"https://www.gstatic.com/firebasejs/7.13.2/firebase-app.js\"\u003e\u003c/script\u003e\n  \u003cscript src=\"https://www.gstatic.com/firebasejs/7.13.2/firebase-auth.js\"\u003e\u003c/script\u003e\n  \u003cscript src=\"https://www.gstatic.com/firebasejs/7.13.2/firebase-database.js\"\u003e\u003c/script\u003e\n\n  \u003c!-- CodeMirror --\u003e\n  \u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.17.0/codemirror.js\"\u003e\u003c/script\u003e\n  \u003clink rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.17.0/codemirror.css\"/\u003e\n\n  \u003c!-- Firepad --\u003e\n  \u003clink rel=\"stylesheet\" href=\"https://firepad.io/releases/v1.5.10/firepad.css\" /\u003e\n  \u003cscript src=\"https://firepad.io/releases/v1.5.10/firepad.min.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n```\n\nThen, you need to initialize the Firebase SDK and Firepad:\n\n```HTML\n\u003cbody onload=\"init()\"\u003e\n  \u003cdiv id=\"firepad\"\u003e\u003c/div\u003e\n  \u003cscript\u003e\n    function init() {\n      // Initialize the Firebase SDK.\n      firebase.initializeApp({\n        apiKey: '\u003cAPI_KEY\u003e',\n        databaseURL: 'https://\u003cDATABASE_NAME\u003e.firebaseio.com'\n      });\n\n      // Get Firebase Database reference.\n      var firepadRef = firebase.database().ref();\n\n      // Create CodeMirror (with lineWrapping on).\n      var codeMirror = CodeMirror(document.getElementById('firepad'), { lineWrapping: true });\n\n      // Create Firepad (with rich text toolbar and shortcuts enabled).\n      var firepad = Firepad.fromCodeMirror(firepadRef, codeMirror,\n          { richTextShortcuts: true, richTextToolbar: true, defaultText: 'Hello, World!' });\n    }\n  \u003c/script\u003e\n\u003c/body\u003e\n```\n\n## Documentation\n\nFirepad supports rich text editing with [CodeMirror](http://codemirror.net/) and code editing via\n[Ace](http://ace.c9.io/). Check out the detailed setup instructions at [firepad.io/docs](http://www.firepad.io/docs).\n\n\n## Examples\n\nYou can find some Firepad examples [here](examples/README.md).\n\n\n## Contributing\n\nIf you'd like to contribute to Firepad, please first read through our [contribution\nguidelines](.github/CONTRIBUTING.md). Local setup instructions are available [here](.github/CONTRIBUTING.md#local-setup).\n\n## Database Structure\nHow is the data structured in Firebase?\n\n* `\u003cdocument id\u003e/` - A unique hash generated when pushing a new item to Firebase.\n    * `users/`\n        * `\u003cuser id\u003e/` - A unique hash that identifies each user. \n          * `cursor` - The current location of the user's cursor. \n          * `color` - The color of the user's cursor.\n    * `history/` - The sequence of revisions that are automatically made as the document is edited.\n        * `\u003crevision id\u003e/` - A unique id that ranges from 'A0' onwards.\n            * `a` - The user id that made the revision.\n            * `o/` - Array of operations (eg TextOperation objects) that represent document changes.\n            * `t` - Timestamp in milliseconds determined by the Firebase servers.\n    * `checkpoint/` - Snapshot automatically created every 100 revisions.  \n        * `a` - The user id that triggered the checkpoint.\n        * `id` - The latest revision at the time the checkpoint was taken.\n        * `o/` - A representation of the document state at that time that includes styling and plaintext.   \n\n\n## Repo Structure\n\nHere are some highlights of the directory structure and notable source files:\n\n* `dist/` - output directory for all files generated by grunt (`firepad.js`, `firepad.min.js`, `firepad.css`, `firepad.eot`).\n* `examples/` - examples of embedding Firepad.\n* `font/` - icon font used for rich text toolbar.\n* `lib/`\n    * `firepad.js` - Entry point for Firepad.\n    * `text-operation.js`, `client.js` - Heart of the Operation Transformation implementation.  Based on\n      [ot.js](https://github.com/Operational-Transformation/ot.js/) but extended to allow arbitrary\n      attributes on text (for representing rich-text).\n    * `annotation-list.js` - A data model for representing annotations on text (i.e. spans of text with a particular\n      set of attributes).\n    * `rich-text-codemirror.js` - Uses `AnnotationList` to track annotations on the text and maintain the appropriate\n      set of markers on a CodeMirror instance.\n    * `firebase-adapter.js` - Handles integration with Firebase (appending operations, triggering retries,\n      presence, etc.).\n* `test/` - Jasmine tests for Firepad (many of these were borrowed from ot.js).\n\n[gh-actions]: https://github.com/FirebaseExtended/firepad/actions\n[gh-actions-badge]: https://github.com/FirebaseExtended/firepad/workflows/CI%20Tests/badge.svg\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirebaseextended%2Ffirepad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirebaseextended%2Ffirepad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirebaseextended%2Ffirepad/lists"}