{"id":13624723,"url":"https://github.com/xmpp-ftw/xmpp-ftw","last_synced_at":"2025-09-07T04:37:26.826Z","repository":{"id":6713815,"uuid":"7959487","full_name":"xmpp-ftw/xmpp-ftw","owner":"xmpp-ftw","description":"The goal of this project is to make XMPP really simple to use for developers. This module takes away all of the XML and works by hooking to events which are passed between client and server using a transport in JSON. For example code see https://github.com/lloydwatkin/xmpp-ftw-demo.","archived":false,"fork":false,"pushed_at":"2017-05-05T08:17:07.000Z","size":8411,"stargazers_count":254,"open_issues_count":14,"forks_count":32,"subscribers_count":32,"default_branch":"master","last_synced_at":"2024-04-26T16:20:29.451Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://xmpp-ftw.org","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xmpp-ftw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-01T14:27:36.000Z","updated_at":"2024-04-26T16:20:29.452Z","dependencies_parsed_at":"2022-07-31T04:08:47.589Z","dependency_job_id":null,"html_url":"https://github.com/xmpp-ftw/xmpp-ftw","commit_stats":null,"previous_names":[],"tags_count":160,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmpp-ftw%2Fxmpp-ftw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmpp-ftw%2Fxmpp-ftw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmpp-ftw%2Fxmpp-ftw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmpp-ftw%2Fxmpp-ftw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xmpp-ftw","download_url":"https://codeload.github.com/xmpp-ftw/xmpp-ftw/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247557767,"owners_count":20958047,"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-08-01T21:01:45.555Z","updated_at":"2025-04-06T22:07:13.500Z","avatar_url":"https://github.com/xmpp-ftw.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# XMPP-FTW (For The Web/Win)\n\nThe goal of this project is to make XMPP really simple to use for developers. This module takes away all of the XML \nand works by hooking to events which are passed between client and server using a transport in JSON. In the example \ncode we use socket.io, but there is no reason this can not be replaced with engine.io, or implement your own transport \nand pass in as a connection.\n\n# Try it out...\n\nThe code is now up and running at http://xmpp-ftw.org so you can try it out. Be aware that this \nsetup is only for trying xmpp-ftw out and may be slow as we need to go client ↔ heroku (east coast US) ↔  your XMPP server and back each time.\n\n* http://xmpp-ftw.org/manual -- XMPP-FTW manual\n* http://xmpp-ftw.org/demo -- Awesome demo tool, generated from manual\n* \u003cdel\u003ehttp://xmpp-ftw.org/chat\u003c/del\u003e -- Old chat client, no longer updated\n\nThe version running on the website matches 'master' branch here and auto-deploys with commits.\n\nAlso check out the [xmpp-ftw-demo](https://github.com/xmpp-ftw/xmpp-ftw-demo) repository which is what http://xmpp-ftw.org is running.\n\n# Blog posts/Talks\n\n* http://blog.superfeedr.com/easy-xmpp-ftw/\n * XMPP-FTW XMPP and JSON for the Web\n* http://www.evilprofessor.co.uk/615-xmpp-ftw-now-supports-superfeedr/\n * XMPP-FTW now supports [SuperFeedr](http://www.superfeedr.com)\n* http://www.evilprofessor.co.uk/573-talking-at-the-first-xmppuk-event-march-2013/\n * Talking at the first XMPPUK event (March 2013) \n* http://www.evilprofessor.co.uk/562-new-demo-system-for-xmpp-ftw/\n * How the demo client works\n* http://www.evilprofessor.co.uk/579-xmpp-for-the-web-xmpp-ftw/\n * Introduction to XMPP-FTW\n\n# Badges!\n\n[![Build Status](https://secure.travis-ci.org/xmpp-ftw/xmpp-ftw.png)](http://travis-ci.org/xmpp-ftw/xmpp-ftw)\n\n[![Dependency Status](https://david-dm.org/xmpp-ftw/xmpp-ftw.png)](https://david-dm.org/xmpp-ftw/xmpp-ftw)\n\n[![Coverage Status](https://coveralls.io/repos/xmpp-ftw/xmpp-ftw/badge.png?branch=master)](https://coveralls.io/r/xmpp-ftw/xmpp-ftw?branch=master)\n\n[![Known Vulnerabilities](https://snyk.io/test/npm/xmpp-ftw/badge.svg)](https://snyk.io/test/npm/xmpp-ftw)\n\n# Instructions\n\n* npm i xmpp-ftw\n* Create your socket.io connection manually and then pass this socket into the constructor\n\n```javascript\nio.sockets.on('connection', function(socket) {\n     new require('xmpp-ftw').Xmpp(socket);       \n});\n```\n* All events are prefixed with 'xmpp.'\n\n# Logging\n\nLogging is handled using a [Winston](https://github.com/flatiron/winston) like interface but by default \ndoes not record any logging (uses a null logger). Developers can inject any logging platform they wish \nprovided it uses the same interface as Winston. In order to inject a logger simply call `setLogger` on \nthe main XMPP-FTW object after instantiation.\n\nMethods used in XMPP-FTW projects are:\n\n* log()\n* warn()\n* info()\n* error()\n\n# Server-side\n\nIf you want to run xmpp-ftw server side (e.g. to write a bot) then this should be a good starting point:\n\n```javascript\nvar xmppFtw = require('xmpp-ftw')\nvar Emitter = require('events').EventEmitter\n\nvar Socket = function() {\n    this.server = new Emitter()\n    this.client = new Emitter()\n    var self = this\n    this.server.send = function(event, data, rsm, callback) {\n        self.client.emit(event, data, rsm, callback)\n    }\n    this.client.send = function(event, data, callback) {\n        self.server.emit(event, data, callback)\n    }\n}\nSocket.prototype.on = function(event, data, rsm) {\n    this.server.on(event, data, rsm)\n}\nSocket.prototype.send = function(event, data, callback) {\n    this.server.send(event, data, callback)\n}\nSocket.prototype.removeAllListeners = function(event) {\n    this.server.removeAllListeners(event)\n}\n\nvar socket = new Socket()\nvar client = new xmppFtw.Xmpp(socket)\nsocket.client.on('xmpp.connection', function (data) {\n    console.log('Connected', data)\n})\nsocket.client.on('xmpp.error', function (error) {\n    console.log('error', error)\n})\nsocket.client.on('xmpp.error.client', function (error) {\n    console.log('client error', error)\n})\nsocket.client.send('xmpp.login', { login: 'detiails', here: true })\nsocket.client.send(\n    'xmpp.chat.message',\n    {\n        to: 'aother@user.com',\n        content: 'Hello world'\n    },\n    function (error, data) { console.log(error, data) }\n)\n```\n\n# License\n\nLicense is Apache 2.0, please let me know if this doesn't suit.\n\n# See also...\n\n* Strophe http://strophe.im/\n* Stanza.io https://github.com/legastero/stanza.io\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmpp-ftw%2Fxmpp-ftw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxmpp-ftw%2Fxmpp-ftw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmpp-ftw%2Fxmpp-ftw/lists"}