{"id":16906568,"url":"https://github.com/rsms/smolmsg","last_synced_at":"2025-03-22T10:31:13.421Z","repository":{"id":56713475,"uuid":"523788966","full_name":"rsms/smolmsg","owner":"rsms","description":"Simple messages","archived":false,"fork":false,"pushed_at":"2022-08-11T16:35:21.000Z","size":25,"stargazers_count":54,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-15T21:17:06.528Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/rsms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-11T16:11:55.000Z","updated_at":"2024-10-22T14:37:29.000Z","dependencies_parsed_at":"2022-08-16T00:00:42.181Z","dependency_job_id":null,"html_url":"https://github.com/rsms/smolmsg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fsmolmsg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fsmolmsg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fsmolmsg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fsmolmsg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rsms","download_url":"https://codeload.github.com/rsms/smolmsg/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244943732,"owners_count":20536290,"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-10-13T18:43:18.579Z","updated_at":"2025-03-22T10:31:12.976Z","avatar_url":"https://github.com/rsms.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# smolmsg\n\nSimple and robust messaging\n\n- Very simple protocol\n- Plain text body with attachments. No MIME types, etc.\n- Address includes delivery destination.\n  Might seem obvious, but consider just a username\n  e.g. \"sam\" — that would require an authority with\n  knowledge of where \"sam\" wants their messages.\n  Instead, simply sam@destination removed the need for\n  a \"directory authority.\"\n- Is a \"to\" field required?\n- Messages are encrypted at the ends\n  - How painful would this be for group conversations?\n    Kind of like the WhatsApp problem.\n- Some smtp-like feature where it can be deliviered\n  and handed over to another server and so on\n  - Maybe using dns srv records\n    - Probably can't implement it with a web app\n      this way, since web browsers aren't capable\n- Clients may choose to offer rich-text rendering by\n  interpreting the body text as Markdown\n\n## Message format\n\nMessages are encoded as a series of sections with headers in plain text.\nA section header ends with a newline character (U+000A.)\nSome sections are required and some are optional.\nSome sections have trailing data, arbitrary bytes with a size defined by the header.\n(This is how a message's body and attachments are encoded.)\n\nThe message format is designed...\n- To be easy to parse and build\n- To be easy for a human to inspect (ie with a text editor)\n- To be simple so that there's little room for mistakes and confusion\n- To be extensible\n\n### Required sections\n\n    NAME     VALUE\n    subject  \u003ctext\u003e\n    from     \u003caddress\u003e [\u003cname\u003e]\n    to       \u003caddress\u003e [\u003cname\u003e]\n    body     \u003cbytesize\u003e\n\n### Optional sections\n\n    NAME     VALUE                     NOTES\n    time     \u003cdatetime\u003e [\u003ctzoffset\u003e]   Defaults to UTC if tzoffset is not given\n    file     \u003cbytesize\u003e \u003cname\u003e\n\n\n### Example message\n\n```\nsubject Hello hej\nfrom    robin@address Robin Smith\ntime    2022-08-08 11:09:03 -0700\nto      sam@address\nbody    5\nHello\nfile 11 hello.txt\nHello\nworld\nfile 16 evening time.txt\nGoodbye\nsunshine\n```\n\n\n### Message encoding specification\n\n```abnf\nmessage        = section*\nsection        = custom_section | std_section\ncustom_section = \"x-\" key (whitespace textline)? newline\nstd_section    = ( body_section | file_section\n                 | to_section | from_section | subject_section | time_section\n                 ) newline\n\nbody_section    = \"body\" whitespace bytesize newline anybyte{bytesize}\nfile_section    = \"file\" whitespace bytesize name newline anybyte{bytesize}\nto_section      = \"to\" whitespace address name? newline\nfrom_section    = \"from\" whitespace address name? newline\nsubject_section = \"subject\" whitespace textline newline\ntime_section    = \"time\" whitespace datetime [timezoneoffset] newline\n\naddress  = username \"@\" domain\nusername = (unicode_letter | unicode_digit | \"_\" | \"-\" | \"+\" | \".\")+\ndomain   = (unicode_letter | unicode_digit | \"_\" | \"-\" | \"+\" | \".\")+\n\ndatetime = year \"-\" month \"-\" day space hour \":\" minute \":\" second\nyear     = decdigit{4}\nmonth    = decdigit{2}\nday      = decdigit{2}\nhour     = decdigit{2}\nminute   = decdigit{2}\nsecond   = decdigit{2}\n\ntimezoneoffset = \"-\"? tzhours\ntzhours        = decdigit{4}\n\nkey        = (unicode_letter | unicode_digit | \"_\" | \"-\")+\nname       = textline\ntextline   = \u003cany Unicode character except 0+000A\u003e\nanybyte    = \u003cbyte 0x00–0xFF\u003e\nnewline    = \u003cbyte 0x0A\u003e\nspace      = \u003cbyte 0x20\u003e\ntab        = \u003cbyte 0x09\u003e\nwhitespace = (tab | space)+\ndecdigit   = \u003cbyte 0x30–0x39\u003e\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsms%2Fsmolmsg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frsms%2Fsmolmsg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsms%2Fsmolmsg/lists"}