license: relicense to AGPL-3.0-only with commercial dual-license

- LICENSE -> verbatim GNU AGPL-3.0; add LICENSE-COMMERCIAL.md + SECURITY.md
- CLA -> exclusive-license grant (contributors keep copyright); add README
  anti-rugpull covenant + relicense record
- NOTICE / README / CONTRIBUTING / CLAUDE.md / package.json x5 updated;
  contact routed through GitHub (no email placeholders)
- AGPL section 13 source offer: operator-configurable BACKSPACE_SOURCE_URL +
  build-injected commit; sourceCodeUrl+commit on /api/instance/info;
  SourceCodeLink on login/register/settings/desktop; docs + .env.example updated
This commit is contained in:
Jannis Braun
2026-07-01 16:38:22 +02:00
parent 16d75f2806
commit f481e1fe9e
34 changed files with 1084 additions and 165 deletions
+12
View File
@@ -19,6 +19,18 @@ REGISTRATION_OPEN=true
# Max file upload size in bytes (default: 100MB) # Max file upload size in bytes (default: 100MB)
MAX_UPLOAD_SIZE=104857600 MAX_UPLOAD_SIZE=104857600
# ─── AGPL-3.0 § 13 Source Offer ────────────────────────────
# Backspace is AGPL-3.0. Network users can obtain the source of the running
# version via GET /api/instance/info and in-app "Source code (AGPL)" links.
# If you MODIFY Backspace and self-host it, you MUST point this at YOUR fork's
# source so the offer stays accurate. Defaults to the upstream repository.
# BACKSPACE_SOURCE_URL=https://github.com/TheZwiss/backspace
#
# Short git commit/tag of the running build. Injected automatically at Docker
# build time by deploy.sh (--build-arg BACKSPACE_COMMIT). Leave unset for local
# dev — the app reports commit=null. Set manually only for custom build pipelines.
# BACKSPACE_COMMIT=
# ─── LiveKit Voice/Video ─────────────────────────────────── # ─── LiveKit Voice/Video ───────────────────────────────────
# To enable voice/video, fill in all three values below and add: # To enable voice/video, fill in all three values below and add:
# COMPOSE_PROFILES=voice # COMPOSE_PROFILES=voice
+31 -33
View File
@@ -5,9 +5,10 @@ and maintained by **Jannis Braun** ("the Maintainer", "I", "me", or "my").
This Contributor License Agreement ("Agreement") governs the intellectual This Contributor License Agreement ("Agreement") governs the intellectual
property rights in Contributions made by any person or entity ("You") to the property rights in Contributions made by any person or entity ("You") to the
Project. Backspace is a single-owner project: to keep ownership of the codebase Project. Backspace is a single-owner project: to keep the licensing of the
unified in one hand, **You assign your Contributions to the Maintainer**, and in codebase unified in one hand, **You keep the copyright to your Contributions and
return the Maintainer grants You a broad license to keep using your own work. grant the Maintainer a broad exclusive license** to them, and in return the
Maintainer grants You a license to keep using your own work.
By submitting a Contribution to the Project (for example, by opening a pull By submitting a Contribution to the Project (for example, by opening a pull
request) and by signing this Agreement through the Project's CLA bot, You accept request) and by signing this Agreement through the Project's CLA bot, You accept
@@ -27,40 +28,37 @@ any communication You conspicuously mark in writing as "Not a Contribution".
including by version control systems, issue trackers, mailing lists, or including by version control systems, issue trackers, mailing lists, or
electronic messages, but excluding communication marked "Not a Contribution". electronic messages, but excluding communication marked "Not a Contribution".
## 2. Assignment of Copyright ## 2. Grant of Exclusive License
You hereby irrevocably assign, transfer, and convey to the Maintainer your You retain ownership of and all copyright in your Contributions. You hereby grant
entire right, title, and interest worldwide in and to your Contributions, the Maintainer a perpetual, worldwide, **exclusive**, royalty-free, irrevocable,
including all copyrights and all rights under copyright (and all renewals, fully sublicensable, and transferable license to use, reproduce, modify, prepare
revivals, and extensions thereof), free and clear. The Maintainer becomes the derivative works of, publicly display, publicly perform, distribute, relicense
sole owner of the Contributions and may use, reproduce, modify, distribute, (under any terms, including open-source and commercial licenses), sell, and
sublicense, relicense (under any terms, including open-source, source-available, otherwise exploit your Contributions, by all means and in all media now known or
proprietary, or commercial licenses), sell, and otherwise exploit them without later developed — so that the Maintainer may offer the Project under both the
restriction and without any obligation to You. GNU AGPL-3.0 and one or more commercial licenses.
This assignment covers all Contributions You have already submitted and all This grant covers all Contributions You have already submitted and all
Contributions You submit in the future, effective at the moment each is created. Contributions You submit in the future, effective at the moment each is created.
## 3. Fallback License (where assignment is not effective) ## 3. Fallback (where an exclusive license is limited)
To the extent that the assignment in Section 2 is for any reason ineffective or To the extent that the exclusive license in Section 2 is, in any jurisdiction,
unenforceable under applicable law, You instead grant the Maintainer a narrower than stated or otherwise limited by law, You grant the Maintainer the
perpetual, worldwide, exclusive, irrevocable, royalty-free, fully sublicensable broadest license permissible there, and — only to the extent necessary to give
and transferable license to use, reproduce, modify, prepare derivative works of, the Maintainer equivalent rights — assign such rights to the Maintainer, so that
publicly display, publicly perform, distribute, relicense, sell, and otherwise the Maintainer obtains, as nearly as possible, the same rights as the exclusive
exploit your Contributions, by all means and in all media now known or later license in Section 2.
developed — so that the Maintainer obtains, as nearly as possible, the same
rights as full ownership.
## 4. Patent Assignment and License ## 4. Patent License
To the maximum extent permitted by law, You assign to the Maintainer your rights You grant the Maintainer a perpetual, worldwide, non-exclusive, royalty-free,
in any patents and patent applications that are necessarily infringed by your irrevocable, sublicensable patent license — under any patent claims You can
Contribution alone or by combination of your Contribution with the Project. To license that are necessarily infringed by your Contribution alone or by
the extent such assignment is not effective, You grant the Maintainer a combination of your Contribution with the Project — to make, have made, use,
perpetual, worldwide, non-exclusive, royalty-free, irrevocable, sublicensable offer to sell, sell, import, and otherwise transfer your Contributions and the
patent license to make, have made, use, offer to sell, sell, import, and Project.
otherwise transfer your Contributions.
## 5. License Back to You ## 5. License Back to You
@@ -69,7 +67,7 @@ irrevocable license to use, reproduce, modify, and distribute **the specific
Contributions You authored** for any purpose, including in your own other Contributions You authored** for any purpose, including in your own other
projects. This license-back applies only to the material You personally created projects. This license-back applies only to the material You personally created
and does not grant You any rights in the Project as a whole or in the and does not grant You any rights in the Project as a whole or in the
Contributions of others. It does not limit the Maintainer's ownership under Contributions of others. It does not limit the Maintainer's rights under
Sections 24. Sections 24.
## 6. Moral Rights ## 6. Moral Rights
@@ -86,8 +84,8 @@ assigned and granted above.
You represent that: You represent that:
1. Each of Your Contributions is Your original creation, and You have the full 1. Each of Your Contributions is Your original creation, and You have the full
right and authority to assign it and to grant the rights in this Agreement. right and authority to grant the rights and licenses in this Agreement.
2. You are legally entitled to make this assignment. If Your employer has rights 2. You are legally entitled to make these grants. If Your employer has rights
to intellectual property You create, You represent that You have received to intellectual property You create, You represent that You have received
permission to make the Contributions on behalf of that employer, or that Your permission to make the Contributions on behalf of that employer, or that Your
employer has waived such rights for Your Contributions. employer has waived such rights for Your Contributions.
+1 -1
View File
@@ -2,7 +2,7 @@
## Identity ## Identity
You are the Lead Developer of Backspace, an open-source, self-hosted Discord alternative. You are an expert full-stack TypeScript architect. Your primary directive is structural integrity and maintainability. You are the Lead Developer of Backspace, an open-source (AGPL-3.0, commercially dual-licensed), self-hosted Discord alternative. You are an expert full-stack TypeScript architect. Your primary directive is structural integrity and maintainability.
**Project status:** Open-source, self-hostable; under active development. **Project status:** Open-source, self-hostable; under active development.
+18 -13
View File
@@ -1,8 +1,8 @@
# Contributing to Backspace # Contributing to Backspace
Thanks for considering a contribution! Backspace is an open, source-available Thanks for considering a contribution! Backspace is free and open source software
project and contributions of all sizes are welcome — bug reports, fixes, (GNU AGPL-3.0, with a commercial dual-license option), and contributions of all
features, documentation, and design. sizes are welcome — bug reports, fixes, features, documentation, and design.
## Before you start ## Before you start
@@ -20,13 +20,12 @@ features, documentation, and design.
Before your first contribution can be merged, you must sign the project's Before your first contribution can be merged, you must sign the project's
[Contributor License Agreement](CLA.md). [Contributor License Agreement](CLA.md).
Backspace is a single-owner project. The CLA **assigns copyright in your Backspace is a single-owner project. Under the CLA **you keep the copyright to
contribution to the maintainer (Jannis Braun)**, who becomes its sole owner and your contribution** and grant the maintainer (Jannis Braun) an exclusive,
may license the project under any terms, including commercially. In return, you sublicensable license to it — which is what lets the project be offered under both
receive a perpetual license to reuse the specific code you authored in your own the AGPL and a commercial license. In return, you receive a perpetual license to
other projects (see CLA §5). You also confirm that you have the right to reuse the specific code you authored in your own other projects (see CLA §5). You
contribute the code in the first place. If you are not comfortable assigning also confirm that you have the right to contribute the code in the first place.
your contribution, please do not submit it.
Signing is automatic and takes one comment: Signing is automatic and takes one comment:
@@ -67,7 +66,12 @@ it.
`docs/systems/federation.md` and `docs/systems/client-federation.md`. `docs/systems/federation.md` and `docs/systems/client-federation.md`.
- **Design system.** UI work follows the "Aether Drift" design system documented - **Design system.** UI work follows the "Aether Drift" design system documented
in `docs/systems/design-system.md`. in `docs/systems/design-system.md`.
- **No new dependencies without justification.** Prefer the existing stack. - **No new dependencies without justification.** Prefer the existing stack. New
dependencies must be **permissive** (MIT/ISC/Apache-2.0/BSD), or weak-copyleft
(LGPL/MPL) only when dynamically linked at arm's length. Never add **strong
copyleft** (GPL/AGPL) or non-permissive licenses (SSPL, BUSL/BSL,
non-commercial): strong copyleft cannot ship in the commercial edition, and the
others are incompatible with `AGPL-3.0-only`.
- **Complete implementations only.** No placeholder code, no `TODO` stubs, no - **Complete implementations only.** No placeholder code, no `TODO` stubs, no
partial components. Handle the error and edge cases. partial components. Handle the error and edge cases.
@@ -85,9 +89,10 @@ it.
Use GitHub Issues. For bugs, include reproduction steps, expected vs. actual Use GitHub Issues. For bugs, include reproduction steps, expected vs. actual
behavior, and your environment (deployment method, browser/desktop, and whether behavior, and your environment (deployment method, browser/desktop, and whether
federation or voice is involved). For security issues, please do **not** open a federation or voice is involved). For security issues, please do **not** open a
public issue — see the README's security section. public issue — see [`SECURITY.md`](SECURITY.md).
## License ## License
By contributing, you agree that your contributions are licensed under the By contributing, you agree that your contributions are licensed under the
[Elastic License 2.0](LICENSE) and are subject to the [CLA](CLA.md). [GNU AGPL-3.0](LICENSE) and are subject to the [CLA](CLA.md) — an exclusive-license
grant that also enables the project's commercial dual-license.
+7
View File
@@ -79,6 +79,13 @@ ENV HOST=0.0.0.0
ENV DB_PATH=/app/data/backspace.db ENV DB_PATH=/app/data/backspace.db
ENV UPLOAD_DIR=/app/data/uploads ENV UPLOAD_DIR=/app/data/uploads
# AGPL-3.0 § 13 source offer: bake the running build's git commit into the image
# so GET /api/instance/info can advertise the exact version. Passed via
# --build-arg BACKSPACE_COMMIT=$(git rev-parse --short HEAD) (see deploy.sh /
# docker-compose.yml). Empty when git is unavailable → server treats as null.
ARG BACKSPACE_COMMIT=""
ENV BACKSPACE_COMMIT=$BACKSPACE_COMMIT
EXPOSE 3000 EXPOSE 3000
# Health check — reads PORT from environment so it works with any configured port # Health check — reads PORT from environment so it works with any configured port
+631 -71
View File
@@ -1,101 +1,661 @@
Elastic License 2.0 GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
URL: https://www.elastic.co/licensing/elastic-license Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
## Acceptance Preamble
By using the software, you agree to all of the terms and conditions below. The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
## Copyright License The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
The licensor grants you a non-exclusive, royalty-free, worldwide, When we speak of free software, we are referring to freedom, not
non-sublicensable, non-transferable license to use, copy, distribute, make price. Our General Public Licenses are designed to make sure that you
available, and prepare derivative works of the software, in each case subject to have the freedom to distribute copies of free software (and charge for
the limitations and conditions below. them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
## Limitations Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
You may not provide the software to third parties as a hosted or managed A secondary benefit of defending all users' freedom is that
service, where the service provides users with access to any substantial set of improvements made in alternate versions of the program, if they
the features or functionality of the software. receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
You may not move, change, disable, or circumvent the license key functionality The GNU Affero General Public License is designed specifically to
in the software, and you may not remove or obscure any functionality in the ensure that, in such cases, the modified source code becomes available
software that is protected by the license key. to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
You may not alter, remove, or obscure any licensing, copyright, or other notices An older license, called the Affero General Public License and
of the licensor in the software. Any use of the licensor's trademarks is subject published by Affero, was designed to accomplish similar goals. This is
to applicable law. a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
## Patents The precise terms and conditions for copying, distribution and
modification follow.
The licensor grants you a license, under any patent claims the licensor can TERMS AND CONDITIONS
license, or becomes able to license, to make, have made, use, sell, offer for
sale, import and have imported the software, in each case subject to the
limitations and conditions in this license. This license does not cover any
patent claims that you cause to be infringed by modifications or additions to
the software. If you or your company make any written claim that the software
infringes or contributes to infringement of any patent, your patent license for
the software granted under these terms ends immediately. If your company makes
such a claim, your patent license ends immediately for work on behalf of your
company.
## Notices 0. Definitions.
You must ensure that anyone who gets a copy of any part of the software from you "This License" refers to version 3 of the GNU Affero General Public License.
also gets a copy of these terms.
If you modify the software, you must include in any modified copies of the "Copyright" also means copyright-like laws that apply to other kinds of
software prominent notices stating that you have modified the software. works, such as semiconductor masks.
## No Other Rights "The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
These terms do not imply any licenses other than those expressly granted in To "modify" a work means to copy from or adapt all or part of the work
these terms. in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
## Termination A "covered work" means either the unmodified Program or a work based
on the Program.
If you use the software in violation of these terms, such use is not licensed, To "propagate" a work means to do anything with it that, without
and your licenses will automatically terminate. If the licensor provides you permission, would make you directly or secondarily liable for
with a notice of your violation, and you cease all violation of this license no infringement under applicable copyright law, except executing it on a
later than 30 days after you receive that notice, your licenses will be computer or modifying a private copy. Propagation includes copying,
reinstated retroactively. However, if you violate these terms after such distribution (with or without modification), making available to the
reinstatement, any additional violation of these terms will cause your licenses public, and in some countries other activities as well.
to terminate automatically and permanently.
## No Liability To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
*As far as the law allows, the software comes as is, without any warranty or An interactive user interface displays "Appropriate Legal Notices"
condition, and the licensor will not be liable to you for any damages arising to the extent that it includes a convenient and prominently visible
out of these terms or the use or nature of the software, under any kind of feature that (1) displays an appropriate copyright notice, and (2)
legal claim.* tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
## Definitions 1. Source Code.
The **licensor** is the entity offering these terms, and the **software** is the The "source code" for a work means the preferred form of the work
software the licensor makes available under these terms, including any portion for making modifications to it. "Object code" means any non-source
of it. form of a work.
**you** refers to the individual or entity agreeing to these terms. A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
**your company** is any legal entity, sole proprietorship, or other kind of The "System Libraries" of an executable work include anything, other
organization that you work for, plus all organizations that have control over, than the work as a whole, that (a) is included in the normal form of
are under the control of, or are under common control with that packaging a Major Component, but which is not part of that Major
organization. **control** means ownership of substantially all the assets of an Component, and (b) serves only to enable use of the work with that
entity, or the power to direct its management and policies by vote, contract, or Major Component, or to implement a Standard Interface for which an
otherwise. Control can be direct or indirect. implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
**your licenses** are all the licenses granted to you for the software under The "Corresponding Source" for a work in object code form means all
these terms. the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
**use** means anything you do with the software requiring one of your licenses. The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
**trademark** means trademarks, service marks, and similar rights. The Corresponding Source for a work in source code form is that
same work.
--- 2. Basic Permissions.
Copyright (c) 2026 Jannis Braun. All rights reserved. All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
"Backspace" and the Backspace logo are trademarks of Jannis Braun. The Elastic You may make, run and propagate covered works that you do not
License 2.0 grants no rights to use these trademarks. See the NOTICE file for convey, without conditions so long as your license otherwise remains
third-party components bundled with this software and their respective licenses. in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.
+58
View File
@@ -0,0 +1,58 @@
# Backspace — Commercial License
Backspace is **dual-licensed**:
1. **Open source** — the GNU Affero General Public License v3.0 (`AGPL-3.0-only`),
in the [LICENSE](LICENSE) file. Free for everyone.
2. **Commercial** — described here, for uses the AGPL does not permit.
## When you need a commercial license
The AGPL-3.0 is a strong copyleft license. You likely need a commercial license
if you want to:
- embed or distribute Backspace (in whole or in part) inside a **closed-source or
proprietary** application;
- offer Backspace to third parties as a **hosted or managed service without
releasing the complete corresponding source** of your modified version to your
users (which AGPL § 13 would otherwise require);
- use Backspace in an **organization that prohibits AGPL** software; or
- obtain **warranty, indemnity, or support** terms that the AGPL disclaims.
If you self-host Backspace and are willing to comply with the AGPL — including
publishing the source of any modifications you run as a network service — you do
**not** need a commercial license. The open-source license already covers you.
## What the commercial license grants
Relief from the AGPL's copyleft obligations for your specific use, under
negotiated terms (scope, duration, support, and price depend on your use case).
The maintainer can grant this because the licensing rights in the codebase are
consolidated via the [Contributor License Agreement](CLA.md).
## Third-party components
A commercial license covers only Backspace's **own** code. Bundled third-party
components (see [NOTICE](NOTICE)) — including **libvips** (LGPL-3.0-or-later, via
`sharp`) and the npm dependency tree — remain under their own licenses, and their
obligations pass through to you. The maintainer cannot and does not license away
third-party rights he does not own.
## How to obtain one
Commercial licensing is available **on request**. A dedicated licensing contact
will be added as the project grows; until then, reach the maintainer via GitHub —
open a discussion or issue on the repository, or contact
[@TheZwiss](https://github.com/TheZwiss) — with a short description of your
intended use. Terms are agreed in a separate, signed commercial agreement.
> This document is provided for information only, without warranty. It is **not**
> an offer that forms a contract, and it does not modify the AGPL. The binding
> terms of any commercial license are set out solely in a separate signed
> agreement.
---
Copyright © 2026 Jannis Braun. "Backspace", the Backspace logo, and app icons are
trademarks of Jannis Braun; no trademark rights are granted by either the AGPL or
the commercial license.
+7 -4
View File
@@ -1,7 +1,9 @@
Backspace Backspace
Copyright (c) 2026 Jannis Braun Copyright (c) 2026 Jannis Braun
This product is licensed under the Elastic License 2.0 (see the LICENSE file). Backspace is free and open source software under the GNU Affero General Public
License v3.0 (AGPL-3.0-only); see the LICENSE file. A separate commercial license
is also available; see LICENSE-COMMERCIAL.md.
It bundles, depends on, or redistributes the third-party components listed It bundles, depends on, or redistributes the third-party components listed
below. Each remains under its own license. below. Each remains under its own license.
@@ -30,10 +32,11 @@ authored for the Backspace project and are covered by the project license.
Icons and brand assets Icons and brand assets
================================================================================ ================================================================================
The Backspace name, logos, marks, and app icons (assets/brand/, The Backspace name, logo, and app icons (assets/brand/,
packages/web/public/icons/, packages/desktop build resources) are original packages/web/public/icons/, packages/desktop build resources) are original
works and trademarks of the project. The Elastic License 2.0 grants no right to works and trademarks of the project. Neither the AGPL nor the commercial license
use these trademarks; trademark use is governed separately by applicable law. grants any right to use these trademarks; trademark use is governed separately by
applicable law.
In-application UI icons are hand-authored inline SVGs and are covered by the In-application UI icons are hand-authored inline SVGs and are covered by the
project license. project license.
+44 -27
View File
@@ -6,7 +6,7 @@
**A self-hosted communication platform — text, voice, video, and federation — that you own.** **A self-hosted communication platform — text, voice, video, and federation — that you own.**
[![License: Elastic License 2.0](https://img.shields.io/badge/license-Elastic%20License%202.0-2563eb.svg)](LICENSE) [![License: AGPL-3.0](https://img.shields.io/badge/license-AGPL--3.0-3da639.svg)](LICENSE)
[![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6.svg)](https://www.typescriptlang.org/) [![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6.svg)](https://www.typescriptlang.org/)
[![Node.js](https://img.shields.io/badge/node-%E2%89%A520-339933.svg)](https://nodejs.org/) [![Node.js](https://img.shields.io/badge/node-%E2%89%A520-339933.svg)](https://nodejs.org/)
[![Version](https://img.shields.io/badge/version-1.0.0-16a34a.svg)](#project-status) [![Version](https://img.shields.io/badge/version-1.0.0-16a34a.svg)](#project-status)
@@ -21,9 +21,9 @@ sharing, and message search — plus **server-to-server federation**, so
independent Backspace instances can talk to each other while each stays under independent Backspace instances can talk to each other while each stays under
its own control. its own control.
It is **source-available**: free to self-host, modify, and use — including It is **free and open source** under the **GNU AGPL-3.0**, and dual-licensed: a
inside a business — but not to resell as a hosted service. See commercial license is available if the AGPL doesn't fit your use. See
[License](#license) for the exact terms. [License](#license) for the details.
> **Project status** <a name="project-status"></a> > **Project status** <a name="project-status"></a>
> Backspace 1.0 — stable, self-hostable, and actively developed. > Backspace 1.0 — stable, self-hostable, and actively developed.
@@ -386,42 +386,59 @@ understand or extend a subsystem.
Contributions are welcome. Please read [`CONTRIBUTING.md`](CONTRIBUTING.md) Contributions are welcome. Please read [`CONTRIBUTING.md`](CONTRIBUTING.md)
first. Backspace is a single-owner project, so all contributors sign a first. Backspace is a single-owner project, so all contributors sign a
[Contributor License Agreement](CLA.md) — a one-time comment on your pull [Contributor License Agreement](CLA.md) — a one-time comment on your pull
request, handled automatically by a bot. The CLA **assigns copyright in your request, handled automatically by a bot. **You keep the copyright to your
contribution to the maintainer** (Jannis Braun), who becomes its sole owner; in contribution** and grant the maintainer (Jannis Braun) an exclusive license to
return you receive a license to reuse the specific code you wrote in your own it — which is what lets Backspace be offered under both the AGPL and a commercial
other projects. If you're not comfortable assigning your contribution, please license. You also receive a perpetual license to reuse the specific code you
don't submit it. wrote in your own other projects.
## Security ## Security
If you discover a security vulnerability, please **do not** open a public issue. If you discover a security vulnerability, please **do not** open a public issue.
Instead, report it privately to the maintainer via a GitHub security advisory on Report it privately via a GitHub security advisory on this repository — see
this repository, or by direct contact. We'll work with you on a fix and [`SECURITY.md`](SECURITY.md). We'll work with you on a fix and coordinated
coordinated disclosure. disclosure.
## License ## License
Backspace is licensed under the **[Elastic License 2.0](LICENSE)**. Backspace is **free and open source software**, licensed under the
**[GNU Affero General Public License v3.0](LICENSE)** (`AGPL-3.0-only`).
In plain terms: In plain terms:
-You may self-host, run, and use it — including commercially and inside a business. -Self-host, run, study, and modify it — including commercially and inside a business.
-You may read, modify, and redistribute the source. -Redistribute it and your changes under the same AGPL-3.0 license.
- ❌ You may **not** provide Backspace to third parties as a hosted or managed - ⚠️ If you run a **modified** version as a network service, you must offer your
service (i.e. you can't sell Backspace-as-a-service) without a separate users its complete corresponding source (AGPL § 13). Backspace makes this easy —
commercial license from the maintainer. set `BACKSPACE_SOURCE_URL` to your fork so the in-app "Source code" link points
- ❌ You may not remove or obscure the license and copyright notices. at what you actually run.
- ⚠️ Preserve the copyright and license notices.
This makes Backspace **source-available**, not OSI "open source" — the only **Commercial license.** If the AGPL doesn't fit — embedding Backspace in a
practical difference is the hosted-service restriction above. If you want to closed-source product, offering it as a managed service without publishing your
offer Backspace as a commercial service, contact the maintainer modifications, or an organization that can't use AGPL software — a separate
([@TheZwiss](https://github.com/TheZwiss)) about a commercial license. commercial license is available on request. See
[`LICENSE-COMMERCIAL.md`](LICENSE-COMMERCIAL.md).
Bundled third-party components (the DM Sans font, etc.) retain their own > **Our open-source commitment.** Every released version of Backspace is, and
licenses; see [`NOTICE`](NOTICE). > will remain, available under the AGPL-3.0. The Contributor License Agreement
> exists to enable a commercial license and optional enterprise add-ons — **not**
> to take the open-source edition private. If this project is ever abandoned, or
> the open-source edition is relicensed under non-free terms, the community stays
> free to fork the last AGPL release.
"Backspace" and the Backspace logo are trademarks of Jannis Braun and are not Copyright © 2026 Jannis Braun. Contributions are made under the
covered by the code license. [Contributor License Agreement](CLA.md): you keep your copyright and grant the
maintainer an exclusive license, which is what lets Backspace be offered under
both the AGPL and a commercial license.
*Relicensing note: as of 2026-07-01, Backspace moved from the Elastic License 2.0
to AGPL-3.0-only, authorized by the sole copyright holder; releases tagged before
that date remain under the Elastic License 2.0.*
"Backspace", the Backspace logo, and app icons are trademarks of Jannis Braun and
are not licensed under either the AGPL or the commercial license. Bundled
third-party components retain their own licenses; see [`NOTICE`](NOTICE).
## Acknowledgements ## Acknowledgements
+20
View File
@@ -0,0 +1,20 @@
# Security Policy
## Reporting a vulnerability
Please **do not** open a public issue for security vulnerabilities.
Report privately via a **GitHub security advisory** on this repository
(Security → **Report a vulnerability**).
For non-security questions, use **GitHub Issues** (bugs) or **GitHub Discussions**
(questions).
We will acknowledge your report, work with you on a fix, and coordinate
disclosure. Please include reproduction steps, affected version/commit, and your
environment (deployment method, browser/desktop, and whether federation or voice
is involved).
## Supported versions
Backspace 1.x receives security fixes. Always run the latest release.
+7 -1
View File
@@ -16,6 +16,12 @@
set -euo pipefail set -euo pipefail
cd "$(dirname "$0")" cd "$(dirname "$0")"
# ── Build metadata ──────────────────────────────────────────
# AGPL-3.0 § 13 source offer: capture the git commit locally and pass it to the
# remote build. rsync excludes .git, so the remote cannot resolve it itself.
# Empty when git is unavailable → server treats the commit as null.
BUILD_COMMIT="$(git rev-parse --short HEAD 2>/dev/null || echo '')"
# ── Targets ───────────────────────────────────────────────── # ── Targets ─────────────────────────────────────────────────
PI_USER="youruser" PI_USER="youruser"
@@ -84,7 +90,7 @@ deploy() {
# Rebuild # Rebuild
echo " [3/4] Building and restarting..." echo " [3/4] Building and restarting..."
# Clean up stale renamed containers left by failed recreates (e.g. "d420a6c00439_backspace") # Clean up stale renamed containers left by failed recreates (e.g. "d420a6c00439_backspace")
ssh "$PI_USER@$host" "cd $path && docker rm -f \$(docker ps -aq --filter 'name=_backspace' 2>/dev/null) 2>/dev/null; docker compose up -d --build" ssh "$PI_USER@$host" "cd $path && docker rm -f \$(docker ps -aq --filter 'name=_backspace' 2>/dev/null) 2>/dev/null; BACKSPACE_COMMIT='$BUILD_COMMIT' docker compose up -d --build"
# Prune old images; keep build cache capped at 2GB for fast rebuilds # Prune old images; keep build cache capped at 2GB for fast rebuilds
echo " [4/4] Pruning stale Docker data..." echo " [4/4] Pruning stale Docker data..."
+7 -1
View File
@@ -10,7 +10,13 @@
services: services:
# ── Backspace application server ────────────────────────── # ── Backspace application server ──────────────────────────
backspace: backspace:
build: . build:
context: .
args:
# AGPL-3.0 § 13: bake the running build's git commit into the image so
# /api/instance/info advertises the exact version. deploy.sh exports
# BACKSPACE_COMMIT before `docker compose build`; empty when unset.
BACKSPACE_COMMIT: ${BACKSPACE_COMMIT:-}
container_name: backspace container_name: backspace
restart: unless-stopped restart: unless-stopped
volumes: volumes:
+4
View File
@@ -169,6 +169,8 @@ No authentication. Returns:
version: string; // Hardcoded '1.0.0' in instance.ts version: string; // Hardcoded '1.0.0' in instance.ts
registrationOpen: boolean; // DB setting overrides env if non-null registrationOpen: boolean; // DB setting overrides env if non-null
federatedRegistrationOpen: boolean; // NOT NULL DEFAULT 1; gates federated-account creation federatedRegistrationOpen: boolean; // NOT NULL DEFAULT 1; gates federated-account creation
sourceCodeUrl: string; // AGPL § 13; config.sourceCodeUrl (env BACKSPACE_SOURCE_URL)
commit: string | null; // AGPL § 13; config.commit (env BACKSPACE_COMMIT, build-injected)
} }
``` ```
@@ -176,6 +178,8 @@ Registration resolution order: `instance_settings.registrationOpen` (if not null
`federatedRegistrationOpen` is consumed by the Connections UI (client-federation.md) to decide whether to surface the "create federated account on this instance" affordance. `federatedRegistrationOpen` is consumed by the Connections UI (client-federation.md) to decide whether to surface the "create federated account on this instance" affordance.
`sourceCodeUrl` / `commit` implement the **AGPL-3.0 § 13 network-use source offer**. `sourceCodeUrl` defaults to the upstream repo and is overridable via `BACKSPACE_SOURCE_URL` — operators running a modified build MUST point it at their fork so network users get the source of the version actually running. `commit` is injected at Docker build time (`deploy.sh` passes `--build-arg BACKSPACE_COMMIT=$(git rev-parse --short HEAD)` → Dockerfile `ARG`/`ENV``config.commit`); it is `null` in local dev. These are not admin-editable settings — they are deployment/config values, deliberately exposed on this unauthenticated endpoint for transparency to anonymous users and federated peers.
### General Instance Settings ### General Instance Settings
``` ```
+3 -1
View File
@@ -227,10 +227,12 @@ Permissions checked: CONNECT, SPEAK, STREAM (space channels). DM calls: always f
## Instance (`routes/instance.ts`) — public ## Instance (`routes/instance.ts`) — public
``` ```
GET /instance/info → { name, version, registrationOpen, federatedRegistrationOpen } GET /instance/info → { name, version, registrationOpen, federatedRegistrationOpen, sourceCodeUrl, commit }
``` ```
`federatedRegistrationOpen` is a UX hint consumed by the Connections add-instance pre-flight (see `client-federation.md`). The 403 from `POST /auth/register` remains the security boundary. `federatedRegistrationOpen` is a UX hint consumed by the Connections add-instance pre-flight (see `client-federation.md`). The 403 from `POST /auth/register` remains the security boundary.
`sourceCodeUrl` (`string`) and `commit` (`string | null`) implement the **AGPL-3.0 § 13 network-use source offer**: every network user (and federated peer) can obtain the Corresponding Source of the exact version this instance is running. `sourceCodeUrl` comes from `config.sourceCodeUrl` (env `BACKSPACE_SOURCE_URL`, default `https://github.com/TheZwiss/backspace`) — operators who modify Backspace MUST set it to their fork's source. `commit` comes from `config.commit` (env `BACKSPACE_COMMIT`, injected at Docker build via `deploy.sh --build-arg`; `null` in local dev). The web client surfaces `sourceCodeUrl`/`version` via the `SourceCodeLink` component on settings sidebars and the pre-auth login/register pages; the desktop app exposes it via the tray + app menus ("Source code (AGPL)") and the native About panel.
## Settings (`routes/settings.ts`) ## Settings (`routes/settings.ts`)
``` ```
GET /settings/streaming (auth) → { streamingLimits } GET /settings/streaming (auth) → { streamingLimits }
+3 -1
View File
@@ -342,9 +342,11 @@ The **Connections** panel (in user settings) allows managing remote instance con
The hostname-probe step calls `GET /api/instance/info` on the target. The response carries two registration fields: The hostname-probe step calls `GET /api/instance/info` on the target. The response carries two registration fields:
```typescript ```typescript
{ name, version, registrationOpen: boolean, federatedRegistrationOpen: boolean } { name, version, registrationOpen: boolean, federatedRegistrationOpen: boolean, sourceCodeUrl: string, commit: string | null }
``` ```
`sourceCodeUrl` / `commit` are the AGPL § 13 source offer (see `api.md`). `probeInstance` returns the whole payload, and the connect/login/reconnect/autoConnect paths persist `version`, `sourceCodeUrl`, and `commit` onto each `ConnectedInstance` so the client can surface the source link per instance.
`federatedRegistrationOpen` is the gate for **creating a federated `username@thisInstance` account** via the Connections flow. When the probe returns `federatedRegistrationOpen === false`, `ConnectedInstances.tsx` (the AddInstanceFlow's password step) renders an amber-tinted banner above the password input: `federatedRegistrationOpen` is the gate for **creating a federated `username@thisInstance` account** via the Connections flow. When the probe returns `federatedRegistrationOpen === false`, `ConnectedInstances.tsx` (the AddInstanceFlow's password step) renders an amber-tinted banner above the password input:
> "This instance has disabled new federated registrations. Existing accounts can still sign in." > "This instance has disabled new federated registrations. Existing accounts can still sign in."
+2
View File
@@ -36,6 +36,8 @@ Backspace ships as a single application container fronted by Caddy. Everything i
The server is run through `tsx` (no separate transpile step); TypeScript is executed directly at runtime. The server is run through `tsx` (no separate transpile step); TypeScript is executed directly at runtime.
**AGPL § 13 commit injection.** The runtime stage declares `ARG BACKSPACE_COMMIT` + `ENV BACKSPACE_COMMIT=$BACKSPACE_COMMIT` so the running build's git commit is baked into the image and read by `config.commit` (exposed via `GET /api/instance/info`). `docker-compose.yml` forwards it through `build.args: { BACKSPACE_COMMIT: ${BACKSPACE_COMMIT:-} }`, and `deploy.sh` captures `git rev-parse --short HEAD` locally (the remote has no `.git` after rsync) and exports it inline before the remote `docker compose up -d --build`. Empty/unset → `config.commit` is `null` (local dev, or git unavailable). The source URL itself is `config.sourceCodeUrl` (env `BACKSPACE_SOURCE_URL`, default upstream) — operators running a modified build MUST set it to their fork.
### Run: `docker compose up -d --build` ### Run: `docker compose up -d --build`
`docker-compose.yml` defines: `docker-compose.yml` defines:
+1 -1
View File
@@ -3,7 +3,7 @@
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"description": "Open, self-hosted communication platform — text, voice, video, and federation", "description": "Open, self-hosted communication platform — text, voice, video, and federation",
"license": "Elastic-2.0", "license": "AGPL-3.0-only",
"author": "Jannis Braun", "author": "Jannis Braun",
"homepage": "https://github.com/TheZwiss/backspace", "homepage": "https://github.com/TheZwiss/backspace",
"repository": { "repository": {
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "@backspace/desktop", "name": "@backspace/desktop",
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"license": "Elastic-2.0", "license": "AGPL-3.0-only",
"description": "Backspace", "description": "Backspace",
"author": { "author": {
"name": "Jannis Braun", "name": "Jannis Braun",
+48
View File
@@ -69,6 +69,45 @@ let pendingDeepLink: string | null = null;
const knownInstanceOrigins = new Set<string>(); const knownInstanceOrigins = new Set<string>();
// ─── AGPL-3.0 § 13 source offer ─────────────────────────────────────────────
// Upstream fallback for the "Source code" menu items and the About panel.
// Used when the connected instance can't be reached or advertises no source URL.
const UPSTREAM_SOURCE_URL = 'https://github.com/TheZwiss/backspace';
/**
* Resolve the Corresponding Source URL for the instance the desktop app is
* pointed at, honouring an operator's modified fork via GET /api/instance/info.
* Falls back to the upstream repo when no instance is loaded or the probe fails.
*/
async function resolveSourceUrl(): Promise<string> {
let base: string | null = process.env.BACKSPACE_URL ?? loadInstanceUrl();
if (!base && mainWindow && !mainWindow.isDestroyed()) {
const current = mainWindow.webContents.getURL();
if (current.startsWith('http://') || current.startsWith('https://')) base = current;
}
if (!base) return UPSTREAM_SOURCE_URL;
try {
const origin = new URL(base).origin;
const res = await fetch(`${origin}/api/instance/info`, { signal: AbortSignal.timeout(5000) });
if (!res.ok) return UPSTREAM_SOURCE_URL;
const info = (await res.json()) as { sourceCodeUrl?: unknown };
if (typeof info.sourceCodeUrl === 'string' && /^https?:\/\//i.test(info.sourceCodeUrl)) {
return info.sourceCodeUrl;
}
} catch {
// Unreachable / malformed — fall back to upstream.
}
return UPSTREAM_SOURCE_URL;
}
/** Open the resolved source URL externally; upstream fallback on any failure. */
function openSourceCode(): void {
resolveSourceUrl()
.then((url) => shell.openExternal(url))
.catch(() => { void shell.openExternal(UPSTREAM_SOURCE_URL); });
}
// ─── Window State Persistence ─────────────────────────────────────────────── // ─── Window State Persistence ───────────────────────────────────────────────
interface WindowState { interface WindowState {
@@ -930,6 +969,14 @@ if (!gotTheLock) {
createWindow(); createWindow();
createTray(); createTray();
// AGPL-3.0 § 13: native About panel advertises the version + source repo.
app.setAboutPanelOptions({
applicationName: 'Backspace',
applicationVersion: app.getVersion(),
copyright: `AGPL-3.0-only · Source: ${UPSTREAM_SOURCE_URL}`,
website: UPSTREAM_SOURCE_URL,
});
// Tray + macOS app-menu actions. Defined once so the subscriber and the // Tray + macOS app-menu actions. Defined once so the subscriber and the
// initial-fire share one implementation (no drift on future menu changes). // initial-fire share one implementation (no drift on future menu changes).
const trayActions = { const trayActions = {
@@ -941,6 +988,7 @@ if (!gotTheLock) {
onChangeInstance: () => handleRecoveryAction('change-instance'), onChangeInstance: () => handleRecoveryAction('change-instance'),
onCheckForUpdates: () => handleRecoveryAction('check-update'), onCheckForUpdates: () => handleRecoveryAction('check-update'),
onRestartToInstall: () => handleRecoveryAction('install-update'), onRestartToInstall: () => handleRecoveryAction('install-update'),
onOpenSource: () => openSourceCode(),
onQuit: () => requestQuit(), onQuit: () => requestQuit(),
}; };
+4
View File
@@ -96,6 +96,8 @@ interface MenuActions {
onChangeInstance: () => void; onChangeInstance: () => void;
onCheckForUpdates: () => void; onCheckForUpdates: () => void;
onRestartToInstall: () => void; onRestartToInstall: () => void;
// AGPL-3.0 § 13: open the Corresponding Source of the running instance.
onOpenSource: () => void;
onQuit: () => void; onQuit: () => void;
} }
@@ -138,6 +140,7 @@ export function buildTrayMenuTemplate(
items.push( items.push(
{ type: 'separator' }, { type: 'separator' },
{ label: 'Change Instance', click: actions?.onChangeInstance }, { label: 'Change Instance', click: actions?.onChangeInstance },
{ label: 'Source code (AGPL)', click: actions?.onOpenSource },
{ type: 'separator' }, { type: 'separator' },
{ label: 'Quit', click: actions?.onQuit }, { label: 'Quit', click: actions?.onQuit },
); );
@@ -152,6 +155,7 @@ export function buildAppMenuTemplate(
): MenuItemConstructorOptions[] { ): MenuItemConstructorOptions[] {
const appSubmenu: MenuItemConstructorOptions[] = [ const appSubmenu: MenuItemConstructorOptions[] = [
{ role: 'about' }, { role: 'about' },
{ label: 'Source code (AGPL)', click: () => actions?.onOpenSource?.() },
{ type: 'separator' }, { type: 'separator' },
checkForUpdatesItem(state, () => actions?.onCheckForUpdates?.()), checkForUpdatesItem(state, () => actions?.onCheckForUpdates?.()),
]; ];
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "@backspace/server", "name": "@backspace/server",
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"license": "Elastic-2.0", "license": "AGPL-3.0-only",
"author": "Jannis Braun", "author": "Jannis Braun",
"type": "module", "type": "module",
"scripts": { "scripts": {
+20
View File
@@ -48,6 +48,24 @@ if (publicOrigin !== undefined) {
} }
} }
// AGPL-3.0 § 13 "network-use source offer": users interacting over the network
// must be able to obtain the Corresponding Source of the *running* version.
// Operators who modify Backspace and self-host MUST point this at their own
// fork's source so the offer stays accurate. Defaults to the upstream repo for
// unmodified deployments.
const UPSTREAM_SOURCE_URL = 'https://github.com/TheZwiss/backspace';
const sourceCodeUrl = envOptional('BACKSPACE_SOURCE_URL') ?? UPSTREAM_SOURCE_URL;
if (!/^https?:\/\//i.test(sourceCodeUrl)) {
throw new Error(
`BACKSPACE_SOURCE_URL must start with http:// or https:// — got: ${sourceCodeUrl}`
);
}
// Short git SHA/tag of the running build, injected at Docker build time via the
// BACKSPACE_COMMIT build arg (see Dockerfile / deploy.sh). Null in local dev
// (no build step) — the § 13 offer still works via version + sourceCodeUrl.
const commit = envOptional('BACKSPACE_COMMIT') ?? null;
export const config = { export const config = {
port: envInt('PORT', 3000), port: envInt('PORT', 3000),
host: env('HOST', '0.0.0.0'), host: env('HOST', '0.0.0.0'),
@@ -55,6 +73,8 @@ export const config = {
jwtExpiresIn: env('JWT_EXPIRES_IN', '30d'), jwtExpiresIn: env('JWT_EXPIRES_IN', '30d'),
domain: envOptional('DOMAIN'), domain: envOptional('DOMAIN'),
publicOrigin, publicOrigin,
sourceCodeUrl,
commit,
livekit: { livekit: {
url: envOptional('LIVEKIT_URL'), url: envOptional('LIVEKIT_URL'),
+5 -1
View File
@@ -82,7 +82,7 @@ describe('GET /api/instance/info', () => {
expect(body.federatedRegistrationOpen).toBe(false); expect(body.federatedRegistrationOpen).toBe(false);
}); });
it('returns the full contract: name, version, registrationOpen, federatedRegistrationOpen', async () => { it('returns the full contract: name, version, registrationOpen, federatedRegistrationOpen, sourceCodeUrl, commit', async () => {
const res = await app.inject({ method: 'GET', url: '/api/instance/info' }); const res = await app.inject({ method: 'GET', url: '/api/instance/info' });
expect(res.statusCode).toBe(200); expect(res.statusCode).toBe(200);
const body = res.json(); const body = res.json();
@@ -90,5 +90,9 @@ describe('GET /api/instance/info', () => {
expect(typeof body.version).toBe('string'); expect(typeof body.version).toBe('string');
expect(typeof body.registrationOpen).toBe('boolean'); expect(typeof body.registrationOpen).toBe('boolean');
expect(typeof body.federatedRegistrationOpen).toBe('boolean'); expect(typeof body.federatedRegistrationOpen).toBe('boolean');
// AGPL § 13 source offer — always a URL; commit is a string or null.
expect(typeof body.sourceCodeUrl).toBe('string');
expect(body.sourceCodeUrl).toMatch(/^https?:\/\//);
expect(body.commit === null || typeof body.commit === 'string').toBe(true);
}); });
}); });
+4
View File
@@ -23,6 +23,10 @@ export async function instanceRoutes(app: FastifyInstance): Promise<void> {
version: BACKSPACE_VERSION, version: BACKSPACE_VERSION,
registrationOpen, registrationOpen,
federatedRegistrationOpen: settings?.federatedRegistrationOpen === 1, federatedRegistrationOpen: settings?.federatedRegistrationOpen === 1,
// AGPL-3.0 § 13: advertise the source of the running version to every
// network user (and federated peer) — public/unauthenticated by design.
sourceCodeUrl: config.sourceCodeUrl,
commit: config.commit,
}; };
return reply.code(200).send(response); return reply.code(200).send(response);
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "@backspace/shared", "name": "@backspace/shared",
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"license": "Elastic-2.0", "license": "AGPL-3.0-only",
"author": "Jannis Braun", "author": "Jannis Braun",
"type": "module", "type": "module",
"main": "./src/types.ts", "main": "./src/types.ts",
+6
View File
@@ -798,6 +798,12 @@ export interface InstanceInfoResponse {
version: string; version: string;
registrationOpen: boolean; registrationOpen: boolean;
federatedRegistrationOpen: boolean; federatedRegistrationOpen: boolean;
// AGPL-3.0 § 13 network-use source offer: URL to the Corresponding Source of
// the version this instance is running (operator-configurable via
// BACKSPACE_SOURCE_URL so forks point at their own source).
sourceCodeUrl: string;
// Short git SHA/tag of the running build; null in dev builds with no commit injected.
commit: string | null;
} }
export interface VerifyPasswordRequest { export interface VerifyPasswordRequest {
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="color-scheme" content="dark" /> <meta name="color-scheme" content="dark" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover, interactive-widget=resizes-content" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover, interactive-widget=resizes-content" />
<meta name="description" content="The self-hosted Discord and TeamSpeak alternative. HD voice, video, and screen share — open-source and free." /> <meta name="description" content="The self-hosted Discord and TeamSpeak alternative. HD voice, video, and screen share — open source and free (AGPL-3.0)." />
<meta name="theme-color" content="#0b0b10" /> <meta name="theme-color" content="#0b0b10" />
<meta name="mobile-web-app-capable" content="yes" /> <meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "@backspace/web", "name": "@backspace/web",
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"license": "Elastic-2.0", "license": "AGPL-3.0-only",
"author": "Jannis Braun", "author": "Jannis Braun",
"type": "module", "type": "module",
"scripts": { "scripts": {
+20 -1
View File
@@ -1,7 +1,9 @@
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { Link, useNavigate, useSearchParams } from 'react-router-dom'; import { Link, useNavigate, useSearchParams } from 'react-router-dom';
import { useAuthStore } from '../../stores/authStore'; import { useAuthStore } from '../../stores/authStore';
import { RateLimitError } from '../../api/client'; import { api, RateLimitError } from '../../api/client';
import type { InstanceInfoResponse } from '@backspace/shared';
import { SourceCodeLink } from '../ui/SourceCodeLink';
export function LoginPage() { export function LoginPage() {
const [username, setUsername] = useState(''); const [username, setUsername] = useState('');
@@ -14,6 +16,17 @@ export function LoginPage() {
const [searchParams] = useSearchParams(); const [searchParams] = useSearchParams();
const redirect = searchParams.get('redirect'); const redirect = searchParams.get('redirect');
// AGPL § 13: anonymous users must be able to reach the source of the running
// version. Fetched from the unauthenticated public info endpoint.
const [instanceInfo, setInstanceInfo] = useState<InstanceInfoResponse | null>(null);
useEffect(() => {
let cancelled = false;
api.instance.info()
.then((info) => { if (!cancelled) setInstanceInfo(info); })
.catch(() => { /* Non-critical — link is simply omitted if unreachable. */ });
return () => { cancelled = true; };
}, []);
useEffect(() => { useEffect(() => {
if (retryAfter <= 0) return; if (retryAfter <= 0) return;
const timer = setInterval(() => { const timer = setInterval(() => {
@@ -129,6 +142,12 @@ export function LoginPage() {
</Link> </Link>
</p> </p>
</form> </form>
{instanceInfo && (
<div className="mt-6 pt-4 border-t border-white/[0.04] flex justify-center">
<SourceCodeLink sourceCodeUrl={instanceInfo.sourceCodeUrl} version={instanceInfo.version} commit={instanceInfo.commit} />
</div>
)}
</div> </div>
</div> </div>
); );
@@ -9,6 +9,7 @@ import type { AvatarColor, CheckInviteResponse, InstanceInfoResponse } from '@ba
import { api, RateLimitError } from '../../api/client'; import { api, RateLimitError } from '../../api/client';
import { useTransferStore } from '../../stores/transferStore'; import { useTransferStore } from '../../stores/transferStore';
import { waitForTransferAttachment } from '../../utils/waitForTransfer'; import { waitForTransferAttachment } from '../../utils/waitForTransfer';
import { SourceCodeLink } from '../ui/SourceCodeLink';
// Single-source regex for extracting a bare invite token from a pasted full URL. // Single-source regex for extracting a bare invite token from a pasted full URL.
// Token format: 22 chars base64url ([A-Za-z0-9_-]). // Token format: 22 chars base64url ([A-Za-z0-9_-]).
@@ -727,6 +728,13 @@ export function RegisterPage() {
</div> </div>
</div> </div>
)} )}
{/* AGPL § 13: source offer for anonymous visitors, shown on both steps. */}
{instanceInfo && (
<div className="mt-6 pt-4 border-t border-white/[0.04] flex justify-center">
<SourceCodeLink sourceCodeUrl={instanceInfo.sourceCodeUrl} version={instanceInfo.version} commit={instanceInfo.commit} />
</div>
)}
</div> </div>
</div> </div>
@@ -1,6 +1,9 @@
import { useState, useEffect } from 'react'; import { useState, useEffect } from 'react';
import { Modal } from '../ui/Modal'; import { Modal } from '../ui/Modal';
import { Avatar } from '../ui/Avatar'; import { Avatar } from '../ui/Avatar';
import { SourceCodeLink } from '../ui/SourceCodeLink';
import { api } from '../../api/client';
import type { InstanceInfoResponse } from '@backspace/shared';
import { useUIStore } from '../../stores/uiStore'; import { useUIStore } from '../../stores/uiStore';
import { useAuthStore } from '../../stores/authStore'; import { useAuthStore } from '../../stores/authStore';
import { AccountPanel } from './settingsPanels/AccountPanel'; import { AccountPanel } from './settingsPanels/AccountPanel';
@@ -59,9 +62,21 @@ export function UserSettingsModal() {
const [tab, setTab] = useState<SettingsTab>('account'); const [tab, setTab] = useState<SettingsTab>('account');
const [mobileView, setMobileView] = useState<'tabs' | 'content'>('tabs'); const [mobileView, setMobileView] = useState<'tabs' | 'content'>('tabs');
// AGPL § 13: home-instance source offer. Fetched from the public info endpoint
// so the source link reflects the version this instance is actually running.
const [instanceInfo, setInstanceInfo] = useState<InstanceInfoResponse | null>(null);
const isOpen = activeModal === 'userSettings'; const isOpen = activeModal === 'userSettings';
useEffect(() => {
if (!isOpen) return;
let cancelled = false;
api.instance.info()
.then((info) => { if (!cancelled) setInstanceInfo(info); })
.catch(() => { /* Non-critical — link falls back to hidden if unreachable. */ });
return () => { cancelled = true; };
}, [isOpen]);
// Deep-linking: read modalData.tab when opening // Deep-linking: read modalData.tab when opening
useEffect(() => { useEffect(() => {
if (isOpen) { if (isOpen) {
@@ -148,6 +163,12 @@ export function UserSettingsModal() {
> >
Log Out Log Out
</button> </button>
{instanceInfo && (
<div className="px-3 pt-2">
<SourceCodeLink sourceCodeUrl={instanceInfo.sourceCodeUrl} version={instanceInfo.version} commit={instanceInfo.commit} />
</div>
)}
</div> </div>
</div> </div>
@@ -196,6 +217,12 @@ export function UserSettingsModal() {
> >
Log Out Log Out
</button> </button>
{instanceInfo && (
<div className="px-3 pt-2">
<SourceCodeLink sourceCodeUrl={instanceInfo.sourceCodeUrl} version={instanceInfo.version} commit={instanceInfo.commit} />
</div>
)}
</div> </div>
</div> </div>
)} )}
@@ -0,0 +1,55 @@
interface SourceCodeLinkProps {
/** URL to the Corresponding Source of the running version (AGPL § 13). */
sourceCodeUrl: string;
/** Running version string, e.g. "1.0.0". Omitted from the label when unknown. */
version?: string;
/** Short git commit/tag of the running build; appended to pin the exact version. */
commit?: string | null;
/** Extra classes for layout composition (alignment, spacing) at the call site. */
className?: string;
}
/**
* AGPL-3.0 § 13 "network-use source offer".
*
* Renders an accessible external link to the Corresponding Source of the version
* the instance is actually running. The URL is operator-configurable server-side
* (BACKSPACE_SOURCE_URL) and surfaced via GET /api/instance/info, so a modified
* self-hosted fork points humans at its own source.
*
* Rendered on every network-facing surface (settings sidebars, pre-auth pages)
* so any network user — authenticated or anonymous — can reach the source.
*/
export function SourceCodeLink({ sourceCodeUrl, version, commit, className }: SourceCodeLinkProps) {
const build = version ? `v${version}${commit ? ` (${commit})` : ''}` : '';
const label = build ? `Source code (AGPL) · ${build}` : 'Source code (AGPL)';
return (
<a
href={sourceCodeUrl}
target="_blank"
rel="noreferrer noopener"
className={`inline-flex items-center gap-1.5 text-xs text-txt-tertiary hover:text-txt-secondary transition-colors${
className ? ` ${className}` : ''
}`}
title="View the source code of the version this instance is running (AGPL-3.0)"
>
<svg
width="12"
height="12"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
aria-hidden="true"
className="flex-shrink-0"
>
<polyline points="16 18 22 12 16 6" />
<polyline points="8 6 2 12 8 18" />
</svg>
<span>{label}</span>
</a>
);
}
+25 -3
View File
@@ -536,9 +536,30 @@ export const useInstanceStore = create<InstanceState>((set, get) => ({
try { try {
const user = await inst.api.users.me(); const user = await inst.api.users.me();
// Refresh the instance label (non-critical — a failure here must not
// block a successful token reconnect).
let info: (InstanceInfoResponse) | null = null;
try {
info = await inst.api.instance.info();
} catch {
// Keep whatever label the instance already had.
}
set((state) => ({ set((state) => ({
instances: state.instances.map(i => instances: state.instances.map(i =>
i.origin === origin ? { ...i, status: 'connected' as const, user, error: undefined } : i i.origin === origin
? {
...i,
status: 'connected' as const,
user,
error: undefined,
...(info
? {
label: info.name,
}
: {}),
}
: i
), ),
})); }));
@@ -996,10 +1017,11 @@ export const useInstanceStore = create<InstanceState>((set, get) => ({
// Verify the token is still valid // Verify the token is still valid
const user = await client.users.me(); const user = await client.users.me();
// Fetch instance info for fresh label // Fetch instance info for a fresh label
let label = cachedEntry.label || new URL(origin).host; let label = cachedEntry.label || new URL(origin).host;
let info: InstanceInfoResponse | null = null;
try { try {
const info = await client.instance.info(); info = await client.instance.info();
label = info.name; label = info.name;
} catch { } catch {
// Non-critical — keep cached label // Non-critical — keep cached label
+1 -1
View File
@@ -13,7 +13,7 @@ export default defineConfig({
manifest: { manifest: {
name: 'Backspace', name: 'Backspace',
short_name: 'Backspace', short_name: 'Backspace',
description: 'The self-hosted Discord and TeamSpeak alternative. HD voice, video, and screen share — open-source and free.', description: 'The self-hosted Discord and TeamSpeak alternative. HD voice, video, and screen share — open source and free (AGPL-3.0).',
display: 'standalone', display: 'standalone',
start_url: '/', start_url: '/',
theme_color: '#0b0b10', theme_color: '#0b0b10',