{"id":21757745,"url":"https://github.com/alxarno/swap","last_synced_at":"2025-03-21T03:43:59.260Z","repository":{"id":57572349,"uuid":"167000392","full_name":"alxarno/swap","owner":"alxarno","description":"🖥️ Messenger Backend (Golang, GORM, SQLite)","archived":false,"fork":false,"pushed_at":"2019-06-19T18:21:41.000Z","size":25480,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-26T00:26:57.035Z","etag":null,"topics":["api-rest","chat","chat-application","golang","golang-server","gorilla-websocket","gorm","jwt-authentication","messaging","messenger","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alxarno.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}},"created_at":"2019-01-22T13:38:27.000Z","updated_at":"2024-05-07T11:54:03.000Z","dependencies_parsed_at":"2022-08-24T08:40:35.291Z","dependency_job_id":null,"html_url":"https://github.com/alxarno/swap","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alxarno%2Fswap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alxarno%2Fswap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alxarno%2Fswap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alxarno%2Fswap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alxarno","download_url":"https://codeload.github.com/alxarno/swap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244734096,"owners_count":20501014,"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":["api-rest","chat","chat-application","golang","golang-server","gorilla-websocket","gorm","jwt-authentication","messaging","messenger","sqlite3"],"created_at":"2024-11-26T11:16:57.817Z","updated_at":"2025-03-21T03:43:59.231Z","avatar_url":"https://github.com/alxarno.png","language":"Go","readme":"\u003cimg src=\"https://i.imgur.com/gtXdkk6.png\" align=\"right\" width=\"256\"/\u003e\n\n# [Swap](https://github.com/alxarno/swap)\n\n\n![](https://img.shields.io/badge/price-free-%235F2FE1.svg)\n![](https://img.shields.io/badge/version-0.0.1-green.svg)\n\nInstant messenger for local network \n\n\u003e Current standalone application is messenger's server, there isn't [UI](https://github.com/alxarno/swap-ui)\n\n## System Capabilities\n* Working without a setup\n* Auto producing self-signed SSL certificates\n* Embedded database\n* Files holding\n* Declarative settings\n* Logging to a file\n\n## Messenger Capabilities\n* User's sing in and sing up\n* Creating chat\n* Invite users to a chat\n* Block users in the chat\n* Leave chat\n* Upload docs\n* Instant messaging via WebSocket\n\n\n## Installation and run\n\nGetting repository \n\n```\ngo get github.com/alxarno/swap\n```\n\u003e All deps are in `vendor` folder\n\nRunning only API server, without web UI.\n\nFor running with web UI look [below](#build)\n\n```\ngo run main.go logo.go  router.go  router_without_ui.go\n```\n\n\u003e Also you can start by fresh, with auto rebuild\n\u003e```\n\u003e go get github.com/pilu/fresh\n\u003e ./fresh.sh\n\u003e```\n\n## Config\n\nAfter starting swap server, it create `swap.json` file, if it doesnt exist. The `swap.json` contains [swap's settings](https://github.com/alxarno/swap/blob/master/settings/settings.go).\n\n```\n{\n\t\"backend\":{\n\t\t\"fileLogs\": true, // swap will logging to swap.log file, instead stdout\n\t\t\"host\": \"80\", // base host for http (will auto redirect to sslhost)\n\t\t\"sslhost\": \"443\", // https host\n\t\t\"secret_key_for_token\": \"CGli0F5jNe3RhLCfVyEBTw==\", // auto produced random string for creating some tokens\n\t\t\"files_path\": \"./files/\" // folder for containing files\n\t},\n\t\"cert\":{\n\t\t\"org\": \"Example Co\", // self-signed cert's company name \n\t\t\"hosts\": [\"192.168.1.38\",\"localhost\",\"127.0.0.1\"], // self-signed cert's hosts\n\t\t\"rsa-bits\":2048 // key bits\n\t},\n\t\"service\":{\n\t\t\"max_file_size_byte\": 104857600, // max uploaded file size (1MB)\n\t\t\"max_minutes_available_for_files_download\": 5, // temporary donwload link time\n\t\t\"cors\": false // cross-domain requests\n\t},\n\t\"db\":{\n\t\t\"sqlite\":{\n\t\t\t\"file_path\": \"swap.db\" // DB file name\n\t\t}\n\t}\n}\n```\n\n## Certificates\n\nAfter starting swap server, it create `swap.crt` and `swap.key` files, if they don't exist.\n\nThey are generated based on information in `swap.json`\n\nYou can generate your own certificate and key, and put it like `swap.crt` and `swap.key`\n\n\n## Build \n\nFor build executable install [packr](https://github.com/gobuffalo/packr) and run\n```\n./build.sh\n```\n\nIt download [UI](https://github.com/alxarno/swap-ui), make go classes by [packr](https://github.com/gobuffalo/packr) and compile all\n\n\u003e Now supporting building only for current OS\n\nResult will appear in releases folder\n\n## Built With\n* [Go](https://github.com/golang/go)\n* [GORM](https://github.com/jinzhu/gorm)\n* [SQLite](https://www.sqlite.org/index.html)\n* [Gorilla web toolkit](https://github.com/gorilla)\n* [Packr ](https://github.com/gobuffalo/packr)\n\n## Download\nYou can [download](https://github.com/alxarno/swap/releases) the latest portable version of Swap\n\nLicense\n----\nGPL-3.0","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falxarno%2Fswap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falxarno%2Fswap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falxarno%2Fswap/lists"}