Inital Docs Updated
@@ -0,0 +1,2 @@
|
||||
# Default owners for everything
|
||||
* @446564
|
||||
@@ -0,0 +1,24 @@
|
||||
## What this PR does
|
||||
|
||||
A clear description of the change and why it was made.
|
||||
|
||||
## Type of change
|
||||
|
||||
- [ ] Documentation fix (typo, broken link, clarification)
|
||||
- [ ] Documentation addition / restructure
|
||||
- [ ] Deployment change (compose, config, Caddyfile)
|
||||
- [ ] New deployment type
|
||||
- [ ] Other:
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] Docs match the actual files in `docker-deployment-*/` and `app_config/`
|
||||
- [ ] Variable tables in the README are in sync with the example config files
|
||||
- [ ] Internal and external links resolve
|
||||
- [ ] Any changed `docker-compose.yml` passes `docker compose config`
|
||||
- [ ] No real secrets, passwords, channel keys, or MQTT credentials committed
|
||||
- [ ] I have read [CONTRIBUTING.md](../CONTRIBUTING.md)
|
||||
|
||||
## Notes for reviewers
|
||||
|
||||
Anything specific reviewers should look at?
|
||||
@@ -0,0 +1,117 @@
|
||||
# Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and maintainers of the Beacon project pledge to
|
||||
make participation in our community a harassment-free experience for everyone,
|
||||
regardless of age, body size, visible or invisible disability, ethnicity, sex
|
||||
characteristics, gender identity and expression, level of experience, education,
|
||||
socioeconomic status, nationality, personal appearance, race, caste, colour,
|
||||
religion, or sexual identity and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behaviour that contributes to a positive environment:
|
||||
|
||||
- Using welcoming and inclusive language
|
||||
- Being respectful of differing viewpoints and experiences
|
||||
- Giving and gracefully accepting constructive feedback
|
||||
- Focusing on what is best for the community
|
||||
- Showing empathy and kindness toward other community members
|
||||
- Acknowledging and crediting the contributions of others
|
||||
|
||||
Examples of unacceptable behaviour:
|
||||
|
||||
- Hate speech or discriminatory language or jokes of any kind — including but
|
||||
not limited to those targeting race, ethnicity, nationality, gender identity
|
||||
or expression, sexual orientation, disability, religion, age, or socioeconomic
|
||||
background
|
||||
- The use of sexualised language or imagery, and sexual attention or advances of
|
||||
any kind
|
||||
- Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
- Public or private harassment of any kind
|
||||
- Deliberate misgendering or use of rejected names
|
||||
- Publishing others' private information — such as a physical or email address —
|
||||
without their explicit permission
|
||||
- Threats of violence or incitement of violence toward any individual or group
|
||||
- Dismissing or minimising reports of harassment or discrimination
|
||||
- Any other conduct which could reasonably be considered inappropriate in a
|
||||
professional or community setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Maintainers are responsible for clarifying and enforcing our standards of
|
||||
acceptable behaviour and will take appropriate and fair corrective action in
|
||||
response to any behaviour that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Maintainers have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, issues, and other contributions that are not aligned
|
||||
with this Code of Conduct, and will communicate reasons for moderation decisions
|
||||
when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all project spaces — GitHub issues, pull
|
||||
requests, discussions, and the MeshCore Canada Discord server — and also when an
|
||||
individual is representing the project in public spaces.
|
||||
|
||||
## Reporting
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behaviour may be
|
||||
reported by contacting the maintainers directly on the MeshCore Canada Discord
|
||||
server at https://discord.gg/Gz3KvJx2hf — reach out to **dedskelly** privately.
|
||||
|
||||
All reports will be handled with discretion and confidentiality. Maintainers are
|
||||
obligated to respect the privacy and safety of the reporter.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Maintainers will follow these guidelines when determining consequences for
|
||||
behaviour that violates this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Impact:** Use of inappropriate language or other behaviour deemed unwelcome.
|
||||
|
||||
**Consequence:** A private written warning explaining the nature of the
|
||||
violation and why the behaviour was inappropriate. A public apology may be
|
||||
requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Impact:** A violation through a single incident or series of actions.
|
||||
|
||||
**Consequence:** A warning with consequences for continued behaviour. No
|
||||
interaction with the people involved for a specified period. This includes
|
||||
avoiding interaction in community spaces as well as external channels. Violating
|
||||
these terms may lead to a temporary or permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Impact:** A serious violation of community standards, including sustained
|
||||
inappropriate behaviour or a pattern of harassment.
|
||||
|
||||
**Consequence:** A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period. No public or private
|
||||
interaction with the people involved is allowed during this period. Violating
|
||||
these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Impact:** Demonstrating a pattern of violation of community standards,
|
||||
including sustained harassment, hate speech, or aggression toward or
|
||||
discrimination against any individual or group.
|
||||
|
||||
**Consequence:** A permanent ban from any sort of public interaction within the
|
||||
community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the
|
||||
[Contributor Covenant](https://www.contributor-covenant.org), version 2.1,
|
||||
available at
|
||||
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
||||
@@ -0,0 +1,126 @@
|
||||
# Contributing to Beacon Docs
|
||||
|
||||
Thank you for your interest in contributing. This repository holds the
|
||||
project-wide documentation and the ready-to-run Docker deployments for Beacon.
|
||||
The application code lives elsewhere:
|
||||
|
||||
- [beacon-server](https://github.com/MeshCore-Beacon/beacon-server) — the API backend
|
||||
- [beacon-web](https://github.com/MeshCore-Beacon/beacon-web) — the web frontend
|
||||
|
||||
Please read this guide before opening a PR.
|
||||
|
||||
---
|
||||
|
||||
## Before you start
|
||||
|
||||
**Issues are disabled on this repository.** To discuss a change before doing the
|
||||
work — a docs restructure, a new deployment type, a correction you're unsure
|
||||
about — reach out on the [MeshCore Canada Discord](https://discord.gg/Gz3KvJx2hf)
|
||||
first. For small fixes (typos, broken links, clarifications) just open a PR.
|
||||
|
||||
**One thing per PR.** Each pull request should cover one logical change — a fixed
|
||||
section, a new deployment type, a corrected variable table. PRs that touch many
|
||||
unrelated docs at once are hard to review.
|
||||
|
||||
**No fully AI-generated contributions.** We welcome contributors who use AI tools
|
||||
to assist their work, but PRs should reflect the author's own understanding and
|
||||
judgement. PRs that appear to be unreviewed AI output may be closed without
|
||||
further comment.
|
||||
|
||||
---
|
||||
|
||||
## Branches
|
||||
|
||||
- `main` — the published documentation. PRs target `main`.
|
||||
|
||||
## Workflow
|
||||
|
||||
1. Fork or create a branch from `main`
|
||||
2. Make your changes
|
||||
3. Run the checklist below
|
||||
4. Open a pull request against `main` with a clear description of what changed
|
||||
and why
|
||||
|
||||
---
|
||||
|
||||
## Checklist before opening a PR
|
||||
|
||||
- **Docs match reality.** If you change a variable, path, command, or image
|
||||
name, confirm it matches the actual files in `docker-deployment-*/` and
|
||||
`app_config/`. The README's variable tables must stay in sync with
|
||||
`app_config/.env.example` and `app_config/config.yaml.example`.
|
||||
- **Links resolve.** Internal links point at files that exist; external links
|
||||
load.
|
||||
- **Compose still parses.** If you touched a `docker-compose.yml`, validate it:
|
||||
```bash
|
||||
docker compose -f docker-deployment-type1/docker-compose.yml config
|
||||
```
|
||||
- **No secrets.** Never commit a real `.env`, real passwords, channel keys, or
|
||||
MQTT credentials. Use placeholder values like `CHANGE_ME` in examples, and
|
||||
keep real secrets in the gitignored `.env`.
|
||||
|
||||
---
|
||||
|
||||
## Documentation style
|
||||
|
||||
- Write for an operator deploying Beacon for the first time — assume Docker
|
||||
knowledge, not knowledge of this project.
|
||||
- Prefer concrete, copy-pasteable commands over prose.
|
||||
- Use fenced code blocks with a language tag (` ```bash `, ` ```yaml `,
|
||||
` ```text `).
|
||||
- Keep tables aligned with the example config files; when a config field
|
||||
changes, update both the example file and the README in the same PR.
|
||||
- Use relative links between files in this repo so they work on GitHub and in
|
||||
local clones.
|
||||
|
||||
---
|
||||
|
||||
## Adding or changing a deployment
|
||||
|
||||
The deployment folders are meant to be copied to a server and run as-is. When
|
||||
editing one:
|
||||
|
||||
- Keep the folder self-contained: `docker-compose.yml`, the `data/` tree, and a
|
||||
`.env` that is created from `app_config/.env.example`.
|
||||
- Every variable a user must set should appear in `app_config/.env.example` (for
|
||||
`.env`) or `app_config/config.yaml.example` (for app config), and be documented
|
||||
in the README's variable tables.
|
||||
- Keep service names, container names, and the Caddyfile upstreams consistent —
|
||||
the reverse proxy must resolve the names it proxies to.
|
||||
- If you add a new deployment type, give it its own `docker-deployment-typeN/`
|
||||
folder, add a Caddyfile template under `app_config/caddy/`, and add a section
|
||||
to the README walkthrough.
|
||||
|
||||
---
|
||||
|
||||
## Commit messages
|
||||
|
||||
Use the conventional commits format:
|
||||
|
||||
```
|
||||
docs(readme): clarify VITE_MAP_CENTER fallback behaviour
|
||||
docs(deploy): add Type 2 split server/web compose files
|
||||
fix(config): correct postgres password mismatch note
|
||||
chore: update logos
|
||||
```
|
||||
|
||||
Common scopes: `readme`, `deploy`, `config`, `caddy`, `docs`.
|
||||
|
||||
---
|
||||
|
||||
## Repo structure
|
||||
|
||||
```
|
||||
docker-deployment-type1/ — single-server (all-in-one) Docker Compose deployment
|
||||
docker-deployment-type2/ — split server/web deployment (WIP)
|
||||
app_config/ — example .env, config.yaml, and Caddyfile templates
|
||||
app_documentation/ — project-wide design & API docs
|
||||
logos/ — brand assets
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Recognition
|
||||
|
||||
If you'd like to be listed as a contributor, add yourself to
|
||||
[CONTRIBUTORS.md](CONTRIBUTORS.md) in your PR.
|
||||
@@ -0,0 +1,12 @@
|
||||
# Contributors
|
||||
|
||||
Beacon is built by its contributors. Thank you to everyone who has helped.
|
||||
|
||||
## Core
|
||||
|
||||
- [ded](https://hackers.town/@ded) — co-founder, lead developer
|
||||
- [MrAlders0n](https://github.com/MrAlders0n/) — co-founder, lead developer
|
||||
|
||||
## Contributors
|
||||
|
||||
Contributors who wish to be listed here may add themselves in a PR.
|
||||
@@ -0,0 +1,661 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2026 Beacon Contributors
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
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.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
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.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
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.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"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.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
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.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
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.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
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.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
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.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
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.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
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.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
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.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
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/>.
|
||||
@@ -1,15 +1,144 @@
|
||||
# tower-docs
|
||||
# beacon-docs
|
||||
|
||||
Documentation, architecture decisions, and guides for MeshCore Tower.
|
||||
Documentation, architecture, and **ready-to-run Docker deployments** for MeshCore Beacon.
|
||||
|
||||
## Core documents
|
||||
This repo is the single place to:
|
||||
|
||||
- [**High Level Design**](high_level_design.md) — Single source of truth for the project. Covers system overview, database schema, ingestion pipeline, and future features. All other documents reference back to this.
|
||||
- [**API Contract**](api_contract.md) — REST endpoints, WebSocket protocol, search, backpressure/reconnection, and mobile-specific concerns.
|
||||
1. **Grab a deployment** — copy the Docker Compose folder for the topology you want, fill in your variables, and `docker compose up -d`.
|
||||
2. **Read the docs** — project-wide design and API documentation that describe how the whole system works.
|
||||
|
||||
## Structure
|
||||
---
|
||||
|
||||
- `/adr` — Architecture Decision Records
|
||||
- `/guides` — Developer guides and onboarding
|
||||
- `/diagrams` — System diagrams
|
||||
- `/codex-thoughts` — Clanker thoughts.
|
||||
## Deploy Beacon
|
||||
|
||||
Two deployment topologies are provided. Pick one, copy its folder to your server, set your variables, and bring it up.
|
||||
|
||||
| Type | Folder | What it is | Status |
|
||||
|---|---|---|---|
|
||||
| **Type 1 — All-in-One** | [`docker-deployment-type1/`](docker-deployment-type1/) | Full stack on a single server: API (`app`), Postgres (`db`), Redis (`redis`), web frontend (`web`), and Caddy reverse proxy with automatic TLS. | ✅ Ready |
|
||||
| **Type 2 — Split Server + Web** | [`docker-deployment-type2/`](docker-deployment-type2/) | API backend on one server, web frontend on a dedicated server. | 🚧 Not done yet (WIP) |
|
||||
|
||||
### Step-by-step (Type 1)
|
||||
|
||||
**1. Get the files onto your server**
|
||||
|
||||
Clone the repo (you only need the deployment folder, but cloning is the simplest way to grab it):
|
||||
|
||||
```bash
|
||||
git clone https://github.com/MeshCore-Beacon/beacon-docs.git
|
||||
cd beacon-docs/docker-deployment-type1
|
||||
```
|
||||
|
||||
The folder is self-contained:
|
||||
|
||||
```text
|
||||
docker-deployment-type1/
|
||||
├── docker-compose.yml # the stack
|
||||
├── .env # your secrets (you create this — see step 2)
|
||||
└── data/ # persistent state, bind-mounted into the containers
|
||||
├── app/config.yaml # Beacon app config (regions, channels, retention)
|
||||
├── Caddy/CaddyFile/Caddyfile.proxy
|
||||
├── postgres/ # ← Postgres database files live here (created on first run)
|
||||
└── redis/ # ← Redis data lives here (created on first run)
|
||||
```
|
||||
|
||||
> **`data/postgres/` and `data/redis/` are empty in git on purpose.** They're bind-mount targets: the `db` and `redis` containers write their data into them, so your database and cache **survive `docker compose down` and restarts**. Don't delete them unless you intend to wipe all data — `rm -rf data/postgres` resets the database. They populate automatically the first time you run `docker compose up -d`.
|
||||
|
||||
**2. Create and fill in your `.env`**
|
||||
|
||||
Copy the template from [`app_config/.env.example`](app_config/.env.example) and edit it:
|
||||
|
||||
```bash
|
||||
cp ../app_config/.env.example .env
|
||||
nano .env
|
||||
```
|
||||
|
||||
Set every `CHANGE_*` value. The variables you must fill in:
|
||||
|
||||
| Variable | Service | What to set |
|
||||
|---|---|---|
|
||||
| `POSTGRES_DSN` | `app` | Database connection string. Change the password (`CHANGE_DB_PASS`) to a strong one. |
|
||||
| `MQTT_BROKER_1_*` / `MQTT_BROKER_2_*` | `app` | URL, username, and password for your live MeshCore MQTT packet sources. |
|
||||
| `DOMAIN` | `caddy` | Your public domain (e.g. `beacon.example.com`). Caddy auto-provisions a Let's Encrypt cert for it. |
|
||||
| `VITE_API_BASE` | `web` | `https://<your-domain>/api/v1` — must be the **public** domain, never localhost. |
|
||||
| `VITE_WS_URL` | `web` | `wss://<your-domain>/ws` |
|
||||
| `VITE_MAP_CENTER` / `VITE_MAP_ZOOM` | `web` | *(Optional)* Fallback "All" map view. The app auto-fits the map to all IATA locations from `config.yaml`; these values are only used as a fallback when those IATAs have no location set. Omit for a world view. |
|
||||
|
||||
> ⚠️ **Password must match in two places.** The password inside `POSTGRES_DSN` (in `.env`) must equal `POSTGRES_PASSWORD` in `docker-compose.yml`. Update both before bringing the stack up.
|
||||
|
||||
**3. Fill in the app config**
|
||||
|
||||
Edit [`data/app/config.yaml`](docker-deployment-type1/data/app/config.yaml) to define your network:
|
||||
|
||||
```bash
|
||||
nano data/app/config.yaml
|
||||
```
|
||||
|
||||
- **`iatas`** — the airport-code anchor points for your coverage area (name + lat/lng).
|
||||
- **`regions`** — map regions that group IATAs together.
|
||||
- **`channel_keys`** — hashtag channels and/or explicit channel keys to decrypt.
|
||||
- **`scopes`**, **`telemetry`**, **`packets`**, **`ingest`** — transport scopes, retention windows, and an optional geographic ingest filter.
|
||||
|
||||
**4. Point DNS at the server**
|
||||
|
||||
Create an `A`/`AAAA` record for your `DOMAIN` pointing at the server's public IP. Caddy needs ports **80** and **443** reachable to issue the TLS certificate.
|
||||
|
||||
**5. Bring it up**
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Check it's healthy:
|
||||
|
||||
```bash
|
||||
docker compose ps
|
||||
docker compose logs -f
|
||||
```
|
||||
|
||||
Visit `https://<your-domain>` and you're off to the races. 🚀
|
||||
|
||||
> After changing any `VITE_*` value later, recreate the web container so the new values get baked into the JS bundle:
|
||||
> ```bash
|
||||
> docker compose up -d --force-recreate web
|
||||
> ```
|
||||
> (then hard-refresh / use incognito, since `/assets/*` is cached immutable.)
|
||||
|
||||
### Type 2 — Split Server + Web
|
||||
|
||||
🚧 **Not done yet.** [`docker-deployment-type2/`](docker-deployment-type2/) is a placeholder; instructions and compose files will land here.
|
||||
|
||||
---
|
||||
|
||||
## Project documentation
|
||||
|
||||
Project-wide docs that describe the entire system live in [`app_documentation/`](app_documentation/):
|
||||
|
||||
- [**High Level Design**](app_documentation/high_level_design.md) — single source of truth. System overview, database schema, ingestion pipeline, and future features.
|
||||
- [**API Contract**](app_documentation/api_contract.md) — REST endpoints, WebSocket protocol, search, backpressure/reconnection, and mobile-specific concerns.
|
||||
|
||||
## Source repositories
|
||||
|
||||
- **Beacon Server (API):** [github.com/MeshCore-Beacon/beacon-server](https://github.com/MeshCore-Beacon/beacon-server) — image `ghcr.io/meshcore-beacon/beacon-server`
|
||||
- **Beacon Web (Frontend):** [github.com/MeshCore-Beacon/beacon-web](https://github.com/MeshCore-Beacon/beacon-web) — image `ghcr.io/meshcore-beacon/beacon-web`
|
||||
|
||||
## Repo structure
|
||||
|
||||
- `/docker-deployment-type1` — Single-server (all-in-one) Docker Compose deployment ✅
|
||||
- `/docker-deployment-type2` — Split server/web Docker Compose deployment 🚧 WIP
|
||||
- `/app_config` — Example `.env`, `config.yaml`, and Caddyfile templates
|
||||
- `/app_documentation` — Project-wide design & API docs
|
||||
- `/logos` — Brand assets
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributions are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md) for the
|
||||
workflow and the [Code of Conduct](CODE_OF_CONDUCT.md). Issues are disabled on
|
||||
this repo; to discuss a change first, reach out on the
|
||||
[MeshCore Canada Discord](https://discord.gg/Gz3KvJx2hf). Security reports go
|
||||
through [SECURITY.md](SECURITY.md), not public channels.
|
||||
|
||||
## License
|
||||
|
||||
Beacon is licensed under the [GNU Affero General Public License v3.0](LICENSE)
|
||||
(AGPL-3.0), the same license as [beacon-server](https://github.com/MeshCore-Beacon/beacon-server).
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# Security Policy
|
||||
|
||||
This is the **documentation and deployment** repository for Beacon. If you have
|
||||
found a vulnerability in the Beacon application itself (server or web), please
|
||||
report it against the relevant code repository:
|
||||
|
||||
- [beacon-server](https://github.com/MeshCore-Beacon/beacon-server)
|
||||
- [beacon-web](https://github.com/MeshCore-Beacon/beacon-web)
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please do not report security issues through public GitHub. Issues are disabled
|
||||
on this repository.
|
||||
|
||||
Instead, contact the maintainers directly via the MeshCore Canada Discord
|
||||
server: [MeshCore Canada Discord](https://discord.gg/Gz3KvJx2hf) — reach out to
|
||||
**dedskelly** directly. Include as much detail as possible: the nature of the
|
||||
issue, steps to reproduce, and any potential impact.
|
||||
|
||||
We will acknowledge receipt within 48 hours and aim to provide a fix or
|
||||
mitigation within 14 days depending on severity.
|
||||
|
||||
Once a fix is released we will publish a security advisory on the relevant
|
||||
repository.
|
||||
|
||||
## Deployment hardening
|
||||
|
||||
The Docker deployments in this repo expose `db`, `redis`, and `app` only on
|
||||
`127.0.0.1`, with Caddy terminating TLS on ports 80/443. Beacon has no
|
||||
authentication layer and is intended to sit behind that reverse proxy on a
|
||||
trusted network. Keep this in mind when assessing the severity of any findings,
|
||||
and never expose the database, Redis, or the raw app port to the public
|
||||
internet.
|
||||
@@ -0,0 +1,43 @@
|
||||
# ============================================================
|
||||
# beacon stack, environment
|
||||
# Loaded into every service that sets `env_file: .env` in
|
||||
# docker-compose.yml (app, caddy, web). Each var below is only
|
||||
# *consumed* by the service(s) noted.
|
||||
# Contains secrets, keep out of git (.env is gitignored).
|
||||
# ============================================================
|
||||
|
||||
# ---- Backend API server (service: app) ----------------------
|
||||
# Address the Go server listens on inside its container.
|
||||
LISTEN_ADDR=:8080
|
||||
|
||||
# Postgres DSN. Host "db" is the compose service name; the password
|
||||
# must match POSTGRES_PASSWORD in docker-compose.yml.
|
||||
POSTGRES_DSN=postgres://tower:CHANGE_DB_PASS@db:5432/tower?sslmode=disable
|
||||
|
||||
# ---- MQTT ingest brokers (service: app) ---------------------
|
||||
# Live packet sources. Put your real passwords back here.
|
||||
MQTT_BROKER_1_URL=wss://mqtt1.meshcore.ca:443
|
||||
MQTT_BROKER_1_USERNAME=CHANGE_NAME
|
||||
MQTT_BROKER_1_PASSWORD=CHANGE_PASS
|
||||
|
||||
MQTT_BROKER_2_URL=wss://mqtt2.meshcore.ca:443
|
||||
MQTT_BROKER_2_USERNAME=CHANGE_NAME
|
||||
MQTT_BROKER_2_PASSWORD=CHANGE_PASS
|
||||
|
||||
# ---- Public domain / TLS (service: caddy) -------------------
|
||||
# Site address + automatic Let's Encrypt certificate.
|
||||
DOMAIN=dev.meshcore.ca
|
||||
|
||||
# ---- Frontend URLs (service: web) ---------------------------
|
||||
# Baked into the static JS bundle when the web container starts.
|
||||
# MUST be the public domain (never localhost) and match DOMAIN above,
|
||||
# the browser makes these calls, not the container.
|
||||
# After changing these, recreate the web container so they re-inject:
|
||||
# docker compose up -d --force-recreate web
|
||||
# (and hard-refresh / incognito, since /assets/* is cached immutable)
|
||||
VITE_API_BASE=https://dev.meshcore.ca/api/v1
|
||||
VITE_WS_URL=wss://dev.meshcore.ca/ws
|
||||
|
||||
# Default "All" map view (decimal "lat,lon" + zoom). Unset = world view.
|
||||
VITE_MAP_CENTER=52.5,-96.8
|
||||
VITE_MAP_ZOOM=3.2
|
||||
@@ -0,0 +1,14 @@
|
||||
# Type 1 (All-in-One): API + Web on same server
|
||||
{$DOMAIN} {
|
||||
handle /api/* {
|
||||
reverse_proxy tower-app:8080
|
||||
}
|
||||
|
||||
handle /ws {
|
||||
reverse_proxy tower-app:8080
|
||||
}
|
||||
|
||||
handle {
|
||||
reverse_proxy tower-web:80
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
# Type 2 Server: API-only, redirect other traffic to web host
|
||||
{$DOMAIN} {
|
||||
handle /api/* {
|
||||
reverse_proxy tower-app:8080
|
||||
}
|
||||
|
||||
handle /ws {
|
||||
reverse_proxy tower-app:8080
|
||||
}
|
||||
|
||||
handle {
|
||||
redir https://web.your.domain.com{uri} permanent
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
# Type 2 Web: Frontend-only
|
||||
{$DOMAIN} {
|
||||
handle {
|
||||
reverse_proxy tower-web:80
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
# Tower configuration file
|
||||
# Copy to config.yaml and adjust as needed.
|
||||
|
||||
iatas:
|
||||
YVR:
|
||||
name: Vancouver International
|
||||
lat: 49.1967
|
||||
lng: -123.1815
|
||||
YYJ:
|
||||
name: Victoria International
|
||||
lat: 48.6469
|
||||
lng: -123.4260
|
||||
YYC:
|
||||
name: Calgary International
|
||||
lat: 51.1139
|
||||
lng: -114.0200
|
||||
YEG:
|
||||
name: Edmonton International
|
||||
lat: 53.3097
|
||||
lng: -113.5797
|
||||
YOW:
|
||||
name: Ottawa International
|
||||
lat: 45.3225
|
||||
lng: -75.6692
|
||||
YYZ:
|
||||
name: Toronto Pearson
|
||||
lat: 43.6777
|
||||
lng: -79.6248
|
||||
|
||||
regions:
|
||||
- slug: swbc
|
||||
name: Southwest BC
|
||||
display_order: 1
|
||||
center_lat: 51.0
|
||||
center_lng: -114.0
|
||||
zoom_level: 5
|
||||
iatas: [YCD, YQQ, YSE, YVR, YWS, YXX, YYK]
|
||||
|
||||
channel_keys:
|
||||
# Hashtag channels: Tower derives the PSK automatically from the tag name.
|
||||
# secret = SHA256("#tag")[:16], channel_hash = SHA256(secret)[0]
|
||||
# Hashtag names should be provided without the # prefix.
|
||||
# Tower prepends # automatically before deriving the key.
|
||||
hashtags:
|
||||
- meshcore
|
||||
- ottawa
|
||||
- testing
|
||||
- towertest
|
||||
|
||||
# Explicit keys: provide the channel hash (hex) and key (hex) directly.
|
||||
# An optional name can be set for display purposes.
|
||||
keys:
|
||||
"11":
|
||||
key: "8b3387e9c5cdea6ac9e5edbaa115cd72"
|
||||
name: "Public"
|
||||
|
||||
telemetry:
|
||||
retention: 672h # 4 weeks
|
||||
resolution: 1h # store one snapshot per observer per hour
|
||||
|
||||
packets:
|
||||
retention: 720h # 30 days
|
||||
@@ -1,21 +0,0 @@
|
||||
# Codex Thoughts
|
||||
|
||||
This folder is Codex's project-facing notebook for MeshCore Tower.
|
||||
|
||||
It is meant for documents that help future code review, implementation planning, design alignment, and handoff across `tower-server`, `tower-web`, `tower-mobile`, and `tower-docs`.
|
||||
|
||||
## Ground Rules
|
||||
|
||||
- Codex may write documents in this folder when the human asks or when a useful review artifact should be preserved.
|
||||
- Codex should not use this folder to hide decisions from maintainers; important project decisions still belong in normal docs, ADRs, issues, or PR discussion.
|
||||
- Codex does not push, merge, approve, or make live operational changes.
|
||||
- Codex comments are advisory. The human maintainer is the final authority.
|
||||
- Codex should stay scoped to the active task, PR, commit, or design question.
|
||||
- Codex should prefer concise, actionable notes over broad speculation.
|
||||
|
||||
## Useful Documents
|
||||
|
||||
- [Initial baseline thoughts and suggestions](initial-baseline-thoughts.md)
|
||||
- [Initial tower-server baseline thoughts](initial-server-baseline-thoughts.md)
|
||||
- [Map page architecture](map-page-architecture/README.md)
|
||||
- [PR and commit commenting operating model](pr-commenting-operating-model.md)
|
||||
@@ -1,190 +0,0 @@
|
||||
# Initial Baseline Thoughts and Suggestions
|
||||
|
||||
Date: 2026-05-20
|
||||
|
||||
This is Codex's first baseline read on MeshCore Tower after reviewing the high-level design, the Golden Reference Kit, and the current local repositories.
|
||||
|
||||
These notes are advisory. They are meant to help review and planning, not to replace human decisions.
|
||||
|
||||
## Current Baseline
|
||||
|
||||
The project has a strong design center:
|
||||
|
||||
- Tower is a real-time MeshCore packet analyzer and observer-of-observers.
|
||||
- V1 is intentionally compact: one Go binary for MQTT ingest, decode, REST, and WebSocket fanout.
|
||||
- Postgres is durable truth, Redis plus in-memory LRU are hot-read acceleration, and Caddy is the edge.
|
||||
- WebSocket is live-only. REST is history and recovery.
|
||||
- IATA is the primary geography anchor.
|
||||
- Path ambiguity is not a UI inconvenience to hide; it is real mesh information to show honestly.
|
||||
- Privacy boundaries are clear: Role 2 MQTT subscriber for v1, no `/internal`, no owner PII, no public pprof.
|
||||
|
||||
The local repos are currently starter shells:
|
||||
|
||||
- `tower-server`: backend/server stack placeholder.
|
||||
- `tower-web`: web frontend placeholder.
|
||||
- `tower-mobile`: mobile frontend placeholder.
|
||||
- `tower-docs`: documentation placeholder plus this `codex-thoughts` folder.
|
||||
|
||||
That means the project is at a useful moment to lock down contracts and review habits before implementation inertia sets in.
|
||||
|
||||
## Main Suggestion
|
||||
|
||||
Make `tower-docs` the shared source of truth early.
|
||||
|
||||
The source design and Golden Reference Kit currently live outside the repos on the local machine. That is fine for handoff, but the team will work better if the important durable parts are promoted into `tower-docs`:
|
||||
|
||||
- Project charter.
|
||||
- System architecture.
|
||||
- Data model reference.
|
||||
- Ingestion and path resolution rules.
|
||||
- API and WebSocket contract.
|
||||
- Security and privacy rules.
|
||||
- Development flow and PR sequence.
|
||||
- ADRs for major choices.
|
||||
|
||||
This keeps all agents and humans aligned without depending on files from one workstation.
|
||||
|
||||
## Cross-Repo Contract Risk
|
||||
|
||||
The Golden Reference Kit suggests a monorepo-shaped layout, while the GitHub organization currently has separate repos for server, web, mobile, and docs.
|
||||
|
||||
That split can work, but the contracts need to live somewhere central:
|
||||
|
||||
- OpenAPI seed and REST response schemas.
|
||||
- WebSocket message schemas.
|
||||
- Error shape.
|
||||
- Time and byte encoding rules.
|
||||
- Config schema.
|
||||
- Shared terminology for packet, observation, observer, node, IATA, region, path confidence, and firmware tier.
|
||||
|
||||
Recommendation: keep canonical contracts in `tower-docs`, then let each repo consume or copy generated artifacts as needed. Avoid letting each repo invent its own version of the same contract.
|
||||
|
||||
## Suggested First Implementation Sequence
|
||||
|
||||
Use small PRs that match the Golden Reference Kit:
|
||||
|
||||
1. `tower-server`: skeleton, config loader, health endpoints, DB/Redis connections, Docker Compose, Caddy reference.
|
||||
2. `tower-server`: MQTT client manager, topic parser, observer/IATA upserts, packet decode wrapper, packet/observation writes.
|
||||
3. `tower-server`: advert handling, node short IDs, path resolver, ambiguity states, firmware inference.
|
||||
4. `tower-server`: REST API and WebSocket hub with bounded buffers and `afterId` backfill.
|
||||
5. `tower-web`: dashboard, live packets, expanded packet row, analyzer drawer, node map/list, observers, stats.
|
||||
6. `tower-mobile`: API client, WebSocket lifecycle, foreground/background reconnect and REST backfill.
|
||||
7. All repos: load tests, contract tests, redaction checks, docs, release checklist.
|
||||
|
||||
Server first is important because web and mobile should not guess at contracts that the backend has not proven.
|
||||
|
||||
## Design Rules to Defend in Review
|
||||
|
||||
These should be treated as high-signal review checks:
|
||||
|
||||
- No `/internal` subscription in v1.
|
||||
- No owner PII in public API responses, logs, or UI.
|
||||
- No channel key material returned by APIs or logged.
|
||||
- Packets and observations remain separate concepts.
|
||||
- Packet hash dedupe and observation uniqueness are both enforced.
|
||||
- Path resolution is scoped by observer IATA or explicit super-region IATA set.
|
||||
- Ambiguous paths are never drawn or described as high-confidence.
|
||||
- Firmware inference only happens from qualifying, unambiguous observations and never downgrades.
|
||||
- WebSocket remains live-only and does not grow per-client replay state.
|
||||
- `lagged` events lead to REST backfill with `afterId`.
|
||||
- Filters are server-enforced.
|
||||
- UI remains responsive under large packet volumes through virtualization and bounded live updates.
|
||||
|
||||
## Repo-Specific Suggestions
|
||||
|
||||
### `tower-server`
|
||||
|
||||
Start with boring, observable infrastructure:
|
||||
|
||||
- Config/env loader before feature code.
|
||||
- Health and readiness endpoints before MQTT ingest.
|
||||
- Migration runner and schema tests before business logic.
|
||||
- Topic parser tests before broker integration.
|
||||
- Fake MQTT fixtures before live broker dependence.
|
||||
- Logging redaction rules before secrets enter logs.
|
||||
|
||||
The packet pipeline is the highest-risk area. It should have tests for duplicate observations, malformed payloads, adverts, ambiguous paths, high-confidence paths, and firmware inference.
|
||||
|
||||
### `tower-web`
|
||||
|
||||
Do not build a marketing surface first. Build the operator experience:
|
||||
|
||||
- Live packets list.
|
||||
- Expanded packet rows.
|
||||
- Analyzer drawer.
|
||||
- Nodes and observers.
|
||||
- Stats.
|
||||
|
||||
The UI should be dense, calm, and operational. It should show uncertainty clearly instead of smoothing it over.
|
||||
|
||||
### `tower-mobile`
|
||||
|
||||
Mobile can follow once backend contracts stabilize.
|
||||
|
||||
The critical behavior is lifecycle correctness:
|
||||
|
||||
- Open WebSocket on foreground.
|
||||
- Close gracefully on background.
|
||||
- Reopen and re-subscribe on foreground return.
|
||||
- REST backfill active screen data from last seen ID.
|
||||
|
||||
### `tower-docs`
|
||||
|
||||
This repo should hold:
|
||||
|
||||
- Stable design rules.
|
||||
- API and WebSocket contracts.
|
||||
- ADRs.
|
||||
- Review checklists.
|
||||
- Release readiness checklists.
|
||||
- Cross-repo decisions.
|
||||
|
||||
If a design choice affects multiple repos, it should be documented here before or during implementation.
|
||||
|
||||
## Suggested Early ADRs
|
||||
|
||||
Create ADRs for:
|
||||
|
||||
- Separate repos vs monorepo-shaped implementation references.
|
||||
- Role 2 only for v1 ingest.
|
||||
- No `/internal` subscription in v1.
|
||||
- REST history plus live-only WebSocket.
|
||||
- IATA-scoped path resolution.
|
||||
- Config-file admin surface for v1.
|
||||
- Medium-sized `packetObservation` WebSocket events with lazy detail fetch.
|
||||
|
||||
## Suggested Review Automation Policy
|
||||
|
||||
Begin conservatively:
|
||||
|
||||
- Prefer PR-level review over commit-level review.
|
||||
- Comment only when findings are actionable.
|
||||
- Stay silent on no findings unless maintainers want confirmation comments.
|
||||
- Do not use admin-scoped local GitHub CLI credentials for automation.
|
||||
- Prefer the GitHub app/connector with read plus PR comment permission only.
|
||||
- Use inline comments sparingly for line-specific issues.
|
||||
- Use one top-level comment for design-alignment summaries or test gaps.
|
||||
|
||||
Commit-level comments should be reserved for commits that are not part of an open PR, or cases where a human explicitly asks for commit review.
|
||||
|
||||
## What Codex Should Watch For
|
||||
|
||||
The highest-value review findings will likely be:
|
||||
|
||||
- A PR accidentally introduces admin/write concerns into v1.
|
||||
- Backend code treats packet content and observation metadata as one row or one concept.
|
||||
- Path resolver picks a candidate when there is ambiguity.
|
||||
- UI draws a path that is not fully high-confidence.
|
||||
- WebSocket code accumulates per-client replay buffers.
|
||||
- API returns timestamps as strings or bytes as raw arrays instead of the contract.
|
||||
- Mobile reconnect skips REST backfill.
|
||||
- Logs include broker passwords, channel keys, or owner data.
|
||||
- Tests cover happy paths but skip ambiguity, duplicate broker delivery, and slow clients.
|
||||
|
||||
## Open Questions for Humans
|
||||
|
||||
- Should `tower-docs` import the full Golden Reference Kit docs now, or should it distill them into a smaller canonical docs set?
|
||||
- Should `tower-server` own generated OpenAPI artifacts, or should `tower-docs` own the source contract and server consumes it?
|
||||
- Should PR review automation post directly once the GitHub connector is authorized, or draft notes first for human approval?
|
||||
- Should `tower-docs/codex-thoughts` stay as a permanent notebook, or should mature notes be promoted into normal docs and then removed from this folder?
|
||||
|
||||
@@ -1,184 +0,0 @@
|
||||
# Initial tower-server Baseline Thoughts
|
||||
|
||||
Reviewed baseline: `MeshCore-Tower/tower-server` at commit `57cfdbb` (`small readme update`)
|
||||
|
||||
This document captures Codex's first read of the refreshed backend repository. It is not a code review on a specific PR. It is a working baseline for future PR comments, implementation planning, and design-alignment checks.
|
||||
|
||||
## Current Shape
|
||||
|
||||
`tower-server` has moved beyond a placeholder repo. It now contains a real Go backend skeleton and several early implementation slices:
|
||||
|
||||
- Go service entrypoint in `cmd/tower/main.go`.
|
||||
- Postgres schema in `db/migrations/001_schema.sql`.
|
||||
- sqlc query source in `db/queries/queries.sql` with generated code in `db/sqlc`.
|
||||
- A concrete store wrapper in `db/store.go`.
|
||||
- MQTT ingest worker in `internal/ingest`.
|
||||
- WebSocket hub and handler in `internal/hub` and `internal/ws`.
|
||||
- REST router and handler stubs in `internal/api`.
|
||||
- YAML config loading and seed logic in `internal/config`.
|
||||
- Channel key lookup in `internal/keystore`.
|
||||
- Docker Compose with app, Postgres, Redis, and Caddy services.
|
||||
|
||||
I ran `go test ./...` locally after the Go tool downloaded the declared `go1.26.1` toolchain. All packages compiled successfully. There are currently no test files.
|
||||
|
||||
## Strong Alignment With The Design
|
||||
|
||||
Several core design choices are already represented in the code:
|
||||
|
||||
- The service is a single Go process that wires ingest, persistence, REST, and WebSocket fanout.
|
||||
- The schema preserves the packet vs observation split.
|
||||
- The schema includes IATAs, regions, nodes, observers, node short IDs, channel messages, and materialized views.
|
||||
- MQTT ingest uses `github.com/meshcore-go/meshcore-go` for packet decode and packet hash computation.
|
||||
- Packet observations are inserted with conflict handling for duplicate deliveries.
|
||||
- Status and packet topics are split in the ingest path.
|
||||
- Role 2 privacy intent is visible: `/internal` is not handled in dispatch.
|
||||
- IATA and region REST endpoints are implemented.
|
||||
- Most v1 endpoint families are at least routed, which gives the project a visible API surface to fill in.
|
||||
- WebSocket hello, subscribe, ping/pong, and event fanout are scaffolded.
|
||||
|
||||
The repo is broadly heading in the direction described by the high-level design and Golden Reference Kit.
|
||||
|
||||
## Important Gaps To Track
|
||||
|
||||
These are not criticisms of the initial work. They are the areas I should watch carefully in future PRs because they touch Tower's core promises.
|
||||
|
||||
### Path resolution is not yet design-complete
|
||||
|
||||
The design requires ordered per-hop resolution states:
|
||||
|
||||
- `high`
|
||||
- `ambiguous`
|
||||
- `none`
|
||||
|
||||
The current store method returns only a distinct list of node UUIDs for all path hashes in a packet. That loses hop order and ambiguity information. It also makes it hard to tell whether every hop resolved with high confidence.
|
||||
|
||||
Future path work should return one result per hop, preserving order and confidence state. The API/UI can then honestly show candidates or raw unresolved hash bytes.
|
||||
|
||||
### Capability inference needs stricter gates
|
||||
|
||||
The design says firmware capability inference should happen only when:
|
||||
|
||||
- The observation insert succeeded.
|
||||
- `hash_size` is greater than 1.
|
||||
- There are no duplicate hash prefixes inside the same path.
|
||||
- Every hop resolves to exactly one node.
|
||||
|
||||
The current scaffolding runs capability detection from the resolved node ID list. Because the resolver does not yet return per-hop confidence, capability inference cannot yet enforce the "all hops high-confidence" rule.
|
||||
|
||||
This should be tightened before relying on `supports_multibyte_paths`, `supports_multibyte_traces`, or `min_firmware_version` in UI or operator decisions.
|
||||
|
||||
### Node short IDs appear defined but not populated
|
||||
|
||||
The schema and generated sqlc code include `node_short_ids` and `UpsertNodeShortID`. The current advert side effect appears to upsert the node and node-IATA association, but I did not see the short ID insert wired through the store interface.
|
||||
|
||||
Path resolution depends on these short IDs. A future PR should explicitly populate `node_short_ids` from advert public keys and include tests proving the prefixes are available for 1, 2, 3, and 4 byte lookup.
|
||||
|
||||
### WebSocket backpressure is scaffolded, not complete
|
||||
|
||||
The hub has bounded buffers, which is good. The design requires that slow clients receive a `lagged` event and then recover through REST with `afterId`.
|
||||
|
||||
Current behavior logs and drops a queued event when a client send buffer is full. I did not see a real `lagged` event emitted to the client, and REST backfill endpoints are still stubs.
|
||||
|
||||
This should remain a design gate for declaring WebSocket behavior complete.
|
||||
|
||||
### REST is only partially implemented
|
||||
|
||||
Implemented:
|
||||
|
||||
- `GET /api/v1/iatas`
|
||||
- `GET /api/v1/iatas/{iata}`
|
||||
- `GET /api/v1/regions`
|
||||
- `GET /api/v1/regions/{regionId}`
|
||||
|
||||
Routed but returning `501`:
|
||||
|
||||
- packets
|
||||
- nodes
|
||||
- observers
|
||||
- channels
|
||||
- stats
|
||||
|
||||
This is a reasonable early state, but future frontend work should avoid depending on contract details that are not backed by server code yet.
|
||||
|
||||
### Telemetry history is in schema but not wired
|
||||
|
||||
`observer_telemetry` exists in the migration. Status ingest updates latest observer fields and emits an `observerStatus` event, but I did not see time-series telemetry insertion wired yet.
|
||||
|
||||
Observer detail charts will need this before they can match the design.
|
||||
|
||||
### Deployment files need a pass
|
||||
|
||||
Two immediate deployment mismatches stood out:
|
||||
|
||||
- `docker-compose.yml` mounts `./Caddyfile`, but I did not see a `Caddyfile` in the repo.
|
||||
- `go.mod` declares Go `1.26.1`, while the Dockerfile uses `golang:1.23-alpine`.
|
||||
|
||||
Both are easy to fix, but they should be handled before using Compose as a release confidence check.
|
||||
|
||||
## Suggested Near-Term PR Sequence
|
||||
|
||||
For `tower-server`, I would keep the next PRs narrow and testable:
|
||||
|
||||
1. Health/readiness and deployment sanity
|
||||
- Add `/healthz` and `/readyz`.
|
||||
- Add or adjust Caddyfile reference.
|
||||
- Align Docker Go version with `go.mod`.
|
||||
- Smoke test Compose boot.
|
||||
|
||||
2. Path resolution foundation
|
||||
- Populate `node_short_ids` from adverts.
|
||||
- Return ordered hop results with `high`, `ambiguous`, and `none`.
|
||||
- Add unit tests for no match, ambiguous match, and high-confidence match.
|
||||
|
||||
3. Capability inference hardening
|
||||
- Skip hash size 1.
|
||||
- Detect duplicate hash prefixes within one path.
|
||||
- Only infer when every hop is high-confidence.
|
||||
- Test regular 2/3 byte and trace 2/4 byte cases.
|
||||
|
||||
4. REST packet backfill
|
||||
- Implement packet list/detail enough to support WebSocket recovery.
|
||||
- Add `afterId` behavior.
|
||||
- Match camelCase, epoch milliseconds, and hex byte strings.
|
||||
|
||||
5. WebSocket backpressure completion
|
||||
- Emit real `lagged` events.
|
||||
- Include the last observation ID needed for REST recovery.
|
||||
- Add slow-client tests.
|
||||
|
||||
## Test Baseline To Add
|
||||
|
||||
There are no tests yet, so the first tests should protect Tower's core invariants rather than broad coverage for its own sake:
|
||||
|
||||
- Topic parser accepts valid `meshcore/{IATA}/{pubkey}/packets` and rejects malformed topics.
|
||||
- `/internal` messages are ignored.
|
||||
- Duplicate packet observations are not inserted twice.
|
||||
- Advert creates or updates node, node-IATA, and node short IDs.
|
||||
- Path resolver returns ordered `none`, `ambiguous`, and `high` states.
|
||||
- Capability inference never runs for ambiguous paths.
|
||||
- Group text with unknown key stores channel activity without exposing key material.
|
||||
- WebSocket slow client receives `lagged`.
|
||||
- API responses use camelCase and epoch milliseconds.
|
||||
|
||||
## Review Posture For Future PRs
|
||||
|
||||
When reviewing `tower-server`, I should be strictest about:
|
||||
|
||||
- Privacy boundaries.
|
||||
- Path truth and ambiguity.
|
||||
- Packet vs observation data modeling.
|
||||
- Firmware inference gates.
|
||||
- WebSocket recovery semantics.
|
||||
- Public API contract shape.
|
||||
- Deployment claims matching actual files.
|
||||
|
||||
I should be more flexible about:
|
||||
|
||||
- Internal package layout while the service is young.
|
||||
- Names that are local-only and not part of the API contract.
|
||||
- Temporary 501 handlers when they are clearly marked and not claimed as implemented.
|
||||
|
||||
## Bottom Line
|
||||
|
||||
The backend is moving in the right direction and already encodes many of Tower's design decisions. The main risk is not overall architecture; it is prematurely treating scaffolded behavior as complete. The next backend PRs should turn the path-resolution, capability-inference, WebSocket recovery, and REST contract scaffolds into tested behavior.
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# MeshCore Tower Map Page Architecture
|
||||
|
||||
This folder tracks the staged map-page implementation plan for MeshCore Tower.
|
||||
The target is MC-CartoLive feature parity where it fits Tower, but with Tower's
|
||||
own backend contracts, privacy boundaries, IATA scoping, and path-confidence
|
||||
rules.
|
||||
|
||||
The first implementation slice is intentionally small:
|
||||
|
||||
- MapLibre GL JS renders the browser map.
|
||||
- OpenFreeMap provides the default basemap style and tiles.
|
||||
- `tower-server` owns all mesh state through Tower-native API contracts.
|
||||
- Live traffic overlays stay behind a master Live toggle and default off.
|
||||
- Routes remain empty until ordered per-hop path confidence is complete.
|
||||
|
||||
## Documents
|
||||
|
||||
- `cartolive-parity-inventory.md` lists CartoLive behaviors and their Tower status.
|
||||
- `tower-map-architecture.md` describes the Tower map shape and boundaries.
|
||||
- `staged-roadmap.md` breaks parity into safe implementation stages.
|
||||
- `api-contract-deltas.md` records map-specific backend contract additions.
|
||||
- `live-layer-policy.md` captures the Live toggle and animation safety rules.
|
||||
@@ -1,57 +0,0 @@
|
||||
# API Contract Deltas
|
||||
|
||||
This file records map-specific API additions that extend the existing Tower API
|
||||
without copying MC-CartoLive's public-state contract.
|
||||
|
||||
## `GET /api/v1/map/state`
|
||||
|
||||
Query parameters:
|
||||
|
||||
- `iata=YOW`: restrict map state to one IATA.
|
||||
- `regionId=1`: expand the region to its member IATAs.
|
||||
- Omitting both returns all mappable public state.
|
||||
|
||||
`iata` and `regionId` are mutually exclusive.
|
||||
|
||||
Response shape:
|
||||
|
||||
```json
|
||||
{
|
||||
"serverTime": 1760000000000,
|
||||
"scope": { "iatas": ["YOW"], "regionId": 1 },
|
||||
"metadata": {
|
||||
"basemap": "openfreemap",
|
||||
"routesComplete": false,
|
||||
"routesStatus": "blocked_by_ordered_path_confidence",
|
||||
"liveDefaultEnabled": false
|
||||
},
|
||||
"nodes": [],
|
||||
"observers": [],
|
||||
"routes": [],
|
||||
"activitySummary": {
|
||||
"packets24h": 0,
|
||||
"observations24h": 0,
|
||||
"activeObservers24h": 0,
|
||||
"activeIatas24h": 0,
|
||||
"lastHeardAt": null
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Route Contract Requirement
|
||||
|
||||
Routes must not be populated until path resolution returns one item per hop:
|
||||
|
||||
- hop order preserved from packet path bytes
|
||||
- `confidence = high | ambiguous | none`
|
||||
- candidates retained for ambiguous detail UI
|
||||
- raw bytes and full public keys excluded from public map responses
|
||||
|
||||
Only all-high observations may produce map route edges.
|
||||
|
||||
## Live Contract Direction
|
||||
|
||||
The existing WebSocket remains the primary live channel. If the current
|
||||
`packetObservation` event remains too slim for map animation, add a map-safe
|
||||
event shape rather than exposing packet internals. REST remains authoritative;
|
||||
WebSocket events update freshness and optional animation only.
|
||||
@@ -1,47 +0,0 @@
|
||||
# MC-CartoLive Parity Inventory
|
||||
|
||||
This inventory treats MC-CartoLive as the behavior reference, not as an API or
|
||||
code structure to copy directly. Tower must keep its own server contracts,
|
||||
schema, privacy rules, and UI conventions.
|
||||
|
||||
## Stage 1: Map Foundation
|
||||
|
||||
- OpenFreeMap basemap rendered through MapLibre GL JS.
|
||||
- Full-viewport operational map inside the existing Tower shell.
|
||||
- Mappable nodes from Tower server only.
|
||||
- Mappable observers from Tower server only.
|
||||
- Initial fit to data once per selected region or IATA.
|
||||
- No auto-zoom on new packet traffic.
|
||||
|
||||
## Stage 2: Static Topology
|
||||
|
||||
- Low-zoom node clustering.
|
||||
- High-zoom node and observer points.
|
||||
- Node and observer hover/click inspection.
|
||||
- Role/type filters.
|
||||
- Stale or offline visual states.
|
||||
- Passive route lines only when Tower can prove every hop is high confidence.
|
||||
|
||||
## Stage 3: Operational Panels
|
||||
|
||||
- Busy Pathways summary.
|
||||
- Reachable-node phonebook.
|
||||
- Route highlighting from a selected node.
|
||||
- Plot routes between node endpoints or map points.
|
||||
- Compact panel restore behavior for mobile and dense desktop use.
|
||||
|
||||
## Stage 4: Live Layer
|
||||
|
||||
- Master Live toggle defaults off.
|
||||
- Packet comets, route glows, observer auras, and message bubbles render only
|
||||
when Live is enabled.
|
||||
- Payload and channel filters apply before animation.
|
||||
- Events may be dropped or throttled under load.
|
||||
- VCR playback, scrubbing, and replay are intentionally excluded from Tower.
|
||||
|
||||
## Not Directly Portable
|
||||
|
||||
- CartoLive's `/api/v1/public/state` contract.
|
||||
- Public hash and path shortcuts that do not match Tower privacy policy.
|
||||
- Any route rendering that relies on guessed, ambiguous, or unordered paths.
|
||||
- VCR state and history playback UI.
|
||||
@@ -1,34 +0,0 @@
|
||||
# Live Layer Policy
|
||||
|
||||
The Tower map treats live traffic as an explicit overlay, not as the default map
|
||||
state.
|
||||
|
||||
## Defaults
|
||||
|
||||
- Live is off on first load.
|
||||
- Static nodes, observers, and high-confidence routes may render without Live.
|
||||
- Packet comets, route glows, observer auras, message bubbles, and live-follow
|
||||
movement require Live to be on.
|
||||
|
||||
## Safety Rules
|
||||
|
||||
- Do not animate ambiguous or unresolved paths.
|
||||
- Do not animate stale events outside the accepted live window.
|
||||
- Do not zoom or pan the map in response to packet traffic.
|
||||
- Prefer frame drops over UI jank under load.
|
||||
- Keep live visuals separate from route and node source truth.
|
||||
|
||||
## Subscription Rules
|
||||
|
||||
The map should attach live handlers only while Live is enabled. Turning Live off
|
||||
must clear transient overlays and detach map-specific listeners without affecting
|
||||
the packet list's WebSocket behavior.
|
||||
|
||||
## Future Controls
|
||||
|
||||
- Payload type filters.
|
||||
- Channel filters when channel visibility exists.
|
||||
- Optional observer-only activity aura.
|
||||
- Optional message bubbles for sanitized decoded public messages.
|
||||
|
||||
VCR playback and scrub controls stay out of scope.
|
||||
@@ -1,43 +0,0 @@
|
||||
# Staged Roadmap
|
||||
|
||||
The map should reach parity in small PRs because the server and frontend are
|
||||
changing quickly and multiple people are working in the repos.
|
||||
|
||||
## Stage 1: Static Map Foundation
|
||||
|
||||
- Add `GET /api/v1/map/state`.
|
||||
- Add MapLibre GL JS and OpenFreeMap to `tower-web`.
|
||||
- Render nodes, observers, and empty routes from Tower state.
|
||||
- Fit to visible data once when the selected IATA changes.
|
||||
- Add compact layer toggles.
|
||||
- Keep Live off by default.
|
||||
|
||||
## Stage 2: Confidence-Correct Routes
|
||||
|
||||
- Replace flattened path resolution with ordered per-hop results.
|
||||
- Store or derive route-safe observations only from all-high paths.
|
||||
- Add route edges to `/api/v1/map/state`.
|
||||
- Render passive route lines with no click-stealing.
|
||||
- Add route-focused tests for ambiguous and unresolved paths.
|
||||
|
||||
## Stage 3: Inspection And Topology Tools
|
||||
|
||||
- Add node/observer detail drawer.
|
||||
- Add route and neighbor highlighting.
|
||||
- Add searchable reachable-node phonebook.
|
||||
- Add Busy Pathways from recent high-confidence route activity.
|
||||
- Add route plotting by selected endpoints or map corners.
|
||||
|
||||
## Stage 4: Live Layer
|
||||
|
||||
- Add map-safe live event payloads if the existing WebSocket packet event stays
|
||||
too slim.
|
||||
- Convert high-confidence live observations into packet comets and route glows.
|
||||
- Convert observer-only observations into observer auras.
|
||||
- Add payload/channel filters.
|
||||
- Throttle and drop frames under load.
|
||||
|
||||
## Excluded
|
||||
|
||||
VCR playback, scrub bars, replay mode, and historical animation are not part of
|
||||
Tower map parity.
|
||||
@@ -1,47 +0,0 @@
|
||||
# Tower Map Architecture
|
||||
|
||||
The Tower map is a Tower-native feature. It should reuse CartoLive's proven
|
||||
interaction model where appropriate, but all data must flow from `tower-server`
|
||||
and all UI must follow the compact Tower shell.
|
||||
|
||||
## Rendering Stack
|
||||
|
||||
- Renderer: MapLibre GL JS.
|
||||
- Basemap: OpenFreeMap style URL, defaulting to Liberty unless configured.
|
||||
- Overlay data: GeoJSON sources owned by `src/features/map`.
|
||||
- Live effects: a separate source/layer or canvas overlay, controlled by the
|
||||
Live toggle.
|
||||
|
||||
## Frontend Boundaries
|
||||
|
||||
The map feature should stay under `tower-web/src/features/map`:
|
||||
|
||||
- `api.ts`: fetches Tower map state.
|
||||
- `types.ts`: map-specific frontend contract types.
|
||||
- `geojson.ts`: pure source builders for nodes, observers, routes, and live
|
||||
overlays.
|
||||
- `layers.ts`: MapLibre source and layer declarations.
|
||||
- `live.ts`: safe conversion from Tower live events to map pulses.
|
||||
- `MapView.tsx`: React lifecycle and controls.
|
||||
|
||||
The feature should not require packet-list internals. It may listen to the
|
||||
shared WebSocket manager only when the Live toggle is on.
|
||||
|
||||
## Backend Boundaries
|
||||
|
||||
The map API should expose sanitized, mappable records only:
|
||||
|
||||
- Node UUIDs, labels, roles, coordinates, IATAs, last seen, and counts.
|
||||
- Observer UUIDs, labels, type, IATA, coordinates, online state, and counts.
|
||||
- Route edges only after ordered path confidence exists.
|
||||
- Aggregate activity counts for panels and status.
|
||||
|
||||
The API must not expose full public keys, raw path bytes, packet hashes, owner
|
||||
metadata, broker secrets, channel keys, or resolver debug internals.
|
||||
|
||||
## Route Rule
|
||||
|
||||
Map routes are allowed only when every hop resolves in order with confidence
|
||||
`high`. Any `ambiguous` or `none` hop blocks route drawing for that observation.
|
||||
The UI may show ambiguity in details later, but must not promote it into a map
|
||||
edge.
|
||||
@@ -1,92 +0,0 @@
|
||||
# PR and Commit Commenting Operating Model
|
||||
|
||||
This note describes how to keep Codex connected to MeshCore Tower without giving it control of the project.
|
||||
|
||||
## Desired Role
|
||||
|
||||
Codex should act as a read-only reviewer and design-memory assistant.
|
||||
|
||||
It should:
|
||||
|
||||
- Read PRs, commits, diffs, CI results, and project docs.
|
||||
- Comment only when it finds actionable guidance.
|
||||
- Tie feedback to Tower's design rules, security/privacy posture, API contracts, operational behavior, tests, or maintainability.
|
||||
- Stay within the scope of the PR or commit.
|
||||
- Avoid repeating stale comments after a maintainer has already made a decision.
|
||||
|
||||
It should not:
|
||||
|
||||
- Push branches.
|
||||
- Open PRs unless explicitly instructed for a separate task.
|
||||
- Merge PRs.
|
||||
- Request broad rewrites without a concrete risk.
|
||||
- Comment on style preferences unless they affect clarity, correctness, or existing project conventions.
|
||||
- Treat its own interpretation as final authority.
|
||||
|
||||
## GitHub Connection
|
||||
|
||||
The practical connection is the GitHub app/connector plus a Codex automation.
|
||||
|
||||
Required access:
|
||||
|
||||
- Read repository contents for all `MeshCore-Tower` repos.
|
||||
- Read PR metadata, diffs, reviews, comments, commits, and CI checks.
|
||||
- Write PR comments and inline review comments.
|
||||
|
||||
Avoid granting:
|
||||
|
||||
- Merge permission.
|
||||
- Branch push permission.
|
||||
- Repository administration.
|
||||
- Secret management.
|
||||
- Production deployment permissions.
|
||||
|
||||
Target repositories:
|
||||
|
||||
- `MeshCore-Tower/tower-server`
|
||||
- `MeshCore-Tower/tower-web`
|
||||
- `MeshCore-Tower/tower-mobile`
|
||||
- `MeshCore-Tower/tower-docs`
|
||||
|
||||
## Recommended Automation Behavior
|
||||
|
||||
Run a scheduled review job that checks open PRs and recent commits.
|
||||
|
||||
Default policy:
|
||||
|
||||
- Review all open PRs.
|
||||
- Review recent commits only when they are not already covered by an open PR, or when the human explicitly requests commit-level review.
|
||||
- Comment only on actionable findings.
|
||||
- Prefer one top-level review comment per PR pass.
|
||||
- Use inline comments only for line-specific issues.
|
||||
- Stay silent when there are no actionable findings unless the human asks for explicit "no findings" comments.
|
||||
- Never edit repository files as part of the automation.
|
||||
|
||||
## Review Priorities
|
||||
|
||||
Codex should prioritize:
|
||||
|
||||
1. Privacy/security boundary violations, especially `/internal`, PII, channel keys, public pprof, and secrets in logs.
|
||||
2. Data model correctness: packets vs observations, dedupe, observation uniqueness, IATA scope.
|
||||
3. Path truth: no guessing, no fake high-confidence route drawing, ambiguity visible.
|
||||
4. Firmware inference rules: only from qualifying unambiguous observations, never downgrade.
|
||||
5. REST and WebSocket contract: `/api/v1`, camelCase, epoch milliseconds, hex bytes, live-only WS, `afterId` backfill.
|
||||
6. Operational behavior: broker reconnect, Redis degradation, Postgres failure behavior, bounded WS buffers, retention jobs.
|
||||
7. Frontend/mobile behavior: virtualization, server-enforced filters, uncertainty shown, mobile foreground/background reconnect.
|
||||
8. Tests around risky behavior.
|
||||
|
||||
## Suggested Automation Prompt
|
||||
|
||||
```text
|
||||
Review open PRs and recent commits in MeshCore-Tower/tower-server, MeshCore-Tower/tower-web, MeshCore-Tower/tower-mobile, and MeshCore-Tower/tower-docs. Use E:\MCT\codexmemory.md plus tower-docs/codex-thoughts as standing guidance. Read PR metadata, diffs, commits, comments, reviews, and CI status. Do not modify repository files, push branches, open PRs, merge PRs, or change live Git state. Comment only when there is actionable guidance tied to correctness, Tower design invariants, privacy/security, API contract, operational behavior, performance, UI/mobile behavior, or missing tests. Keep feedback scoped and non-overbearing. The human maintainer is the final authority.
|
||||
```
|
||||
|
||||
## Open Policy Choices
|
||||
|
||||
The human should decide:
|
||||
|
||||
- Schedule: hourly during active work, daily, or manual only.
|
||||
- Whether "no actionable findings" should be commented or silent.
|
||||
- Whether commit-level comments should be disabled when the commit is already part of an open PR.
|
||||
- Whether Codex should post comments directly or draft findings here first.
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# Copy from app_config/.env.example and fill in your values.
|
||||
# See the README for instructions.
|
||||
@@ -0,0 +1,13 @@
|
||||
{$DOMAIN} {
|
||||
handle /api/* {
|
||||
reverse_proxy tower-app:8080
|
||||
}
|
||||
|
||||
handle /ws {
|
||||
reverse_proxy tower-app:8080
|
||||
}
|
||||
|
||||
handle {
|
||||
reverse_proxy tower-web:80
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
# Tower configuration file
|
||||
# Copy to config.yaml and adjust as needed.
|
||||
|
||||
iatas:
|
||||
YVR:
|
||||
name: Vancouver International
|
||||
lat: 49.1967
|
||||
lng: -123.1815
|
||||
YYJ:
|
||||
name: Victoria International
|
||||
lat: 48.6469
|
||||
lng: -123.4260
|
||||
YYC:
|
||||
name: Calgary International
|
||||
lat: 51.1139
|
||||
lng: -114.0200
|
||||
YEG:
|
||||
name: Edmonton International
|
||||
lat: 53.3097
|
||||
lng: -113.5797
|
||||
YOW:
|
||||
name: Ottawa International
|
||||
lat: 45.3225
|
||||
lng: -75.6692
|
||||
YYZ:
|
||||
name: Toronto Pearson
|
||||
lat: 43.6777
|
||||
lng: -79.6248
|
||||
XCM:
|
||||
name: Chatham-Kent Airport
|
||||
lat: 42.3064
|
||||
lng: -82.0819
|
||||
YCD:
|
||||
name: Nanaimo Airport
|
||||
lat: 49.0544
|
||||
lng: -123.8700
|
||||
YKF:
|
||||
name: Region of Waterloo International
|
||||
lat: 43.4608
|
||||
lng: -80.3786
|
||||
YLK:
|
||||
name: Lake Simcoe Regional
|
||||
lat: 44.4853
|
||||
lng: -79.5556
|
||||
YPA:
|
||||
name: Prince Albert (Glass Field)
|
||||
lat: 53.2144
|
||||
lng: -105.6731
|
||||
YQA:
|
||||
name: Muskoka Airport
|
||||
lat: 44.9764
|
||||
lng: -79.3067
|
||||
YQB:
|
||||
name: Quebec City Jean Lesage International
|
||||
lat: 46.7911
|
||||
lng: -71.3933
|
||||
YQL:
|
||||
name: Lethbridge Airport
|
||||
lat: 49.6303
|
||||
lng: -112.7997
|
||||
YSJ:
|
||||
name: Saint John Airport
|
||||
lat: 45.3161
|
||||
lng: -65.8903
|
||||
YTR:
|
||||
name: CFB Trenton
|
||||
lat: 44.1189
|
||||
lng: -77.5281
|
||||
YUL:
|
||||
name: Montreal-Trudeau International
|
||||
lat: 45.4706
|
||||
lng: -73.7408
|
||||
|
||||
regions:
|
||||
- slug: western-canada
|
||||
name: Western Canada
|
||||
display_order: 1
|
||||
center_lat: 51.0
|
||||
center_lng: -114.0
|
||||
zoom_level: 5
|
||||
iatas: [YVR, YYJ, YYC, YEG]
|
||||
|
||||
- slug: eastern-canada
|
||||
name: Eastern Canada
|
||||
display_order: 2
|
||||
center_lat: 45.0
|
||||
center_lng: -75.0
|
||||
zoom_level: 5
|
||||
iatas: [YOW, YYZ]
|
||||
|
||||
channel_keys:
|
||||
# Hashtag channels: Tower derives the PSK automatically from the tag name.
|
||||
# secret = SHA256("#tag")[:16], channel_hash = SHA256(secret)[0]
|
||||
# Hashtag names should be provided without the # prefix.
|
||||
# Tower prepends # automatically before deriving the key.
|
||||
hashtags:
|
||||
- meshcore
|
||||
- ottawa
|
||||
- testing
|
||||
- towertest
|
||||
|
||||
# Explicit keys: provide the channel hash (hex) and key (hex) directly.
|
||||
# An optional name can be set for display purposes.
|
||||
keys:
|
||||
"11":
|
||||
key: "8b3387e9c5cdea6ac9e5edbaa115cd72"
|
||||
name: "Public"
|
||||
|
||||
|
||||
# Regional transport scopes for matching TRANSPORT_FLOOD packets.
|
||||
# Plain names have # prepended automatically (e.g. "bc" → "#bc").
|
||||
scopes:
|
||||
- name: bc
|
||||
- name: "#west"
|
||||
|
||||
telemetry:
|
||||
retention: 672h # 4 weeks
|
||||
resolution: 1h # store one snapshot per observer per hour
|
||||
|
||||
packets:
|
||||
retention: 720h # 30 days
|
||||
|
||||
websocket:
|
||||
max_connections_per_ip: 5 # default: 5
|
||||
|
||||
# Geographic ingest filter (optional).
|
||||
# Drop packets from observers outside the specified area at ingest time.
|
||||
# Country codes are ISO 3166-1 alpha-2 (e.g. CA, US, GB).
|
||||
# Continent codes: AF (Africa), AN (Antarctica), AS (Asia),
|
||||
# EU (Europe), NA (North America), OC (Oceania), SA (South America).
|
||||
# If both are set an IATA passes if it matches either (OR semantics).
|
||||
# Omit this section entirely to accept packets from all IATAs (default).
|
||||
ingest:
|
||||
allow_countries: [CA]
|
||||
# allow_continents: [NA]
|
||||
@@ -0,0 +1,76 @@
|
||||
services:
|
||||
app:
|
||||
image: ghcr.io/meshcore-beacon/beacon-server:dev
|
||||
env_file: .env
|
||||
ports:
|
||||
- "127.0.0.1:8080:8080"
|
||||
volumes:
|
||||
- ./data/app/config.yaml:/app/config.yaml:ro
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_USER: tower
|
||||
POSTGRES_PASSWORD: CHANGE_PASS
|
||||
POSTGRES_DB: tower
|
||||
volumes:
|
||||
- ./data/postgres/:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "127.0.0.1:5432:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U tower"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
volumes:
|
||||
- ./data/redis/:/data
|
||||
ports:
|
||||
- "127.0.0.1:6379:6379"
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
|
||||
caddy:
|
||||
image: caddy:2-alpine
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
environment:
|
||||
- DOMAIN=${DOMAIN:?DOMAIN environment variable is required}
|
||||
env_file: .env
|
||||
volumes:
|
||||
- ./data/Caddy/CaddyFile/Caddyfile.proxy:/etc/caddy/Caddyfile
|
||||
- ./data/Caddy/data:/data/caddy/
|
||||
- ./data/Caddy/config:/config/caddy/
|
||||
depends_on:
|
||||
web:
|
||||
condition: service_started
|
||||
restart: unless-stopped
|
||||
|
||||
web:
|
||||
image: ghcr.io/meshcore-beacon/beacon-web:latest
|
||||
env_file: .env
|
||||
environment:
|
||||
- VITE_API_BASE=${VITE_API_BASE:?VITE_API_BASE environment variable is required}
|
||||
- VITE_WS_URL=${VITE_WS_URL:?VITE_WS_URL environment variable is required}
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
app:
|
||||
condition: service_started
|
||||
restart: unless-stopped
|
||||
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 71 KiB |
|
After Width: | Height: | Size: 60 KiB |
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100" fill="none">
|
||||
<polygon points="90,50 70,84.64 30,84.64 10,50 30,15.36 70,15.36" fill="none" stroke="#3B82F6" stroke-width="4.5" stroke-linejoin="round" opacity="0.3"/>
|
||||
<polygon points="78,50 64,74.25 36,74.25 22,50 36,25.75 64,25.75" fill="none" stroke="#3B82F6" stroke-width="4.5" stroke-linejoin="round" opacity="0.6"/>
|
||||
<polygon points="66,50 58,63.86 42,63.86 34,50 42,36.14 58,36.14" fill="none" stroke="#3B82F6" stroke-width="4.5" stroke-linejoin="round" opacity="0.95"/>
|
||||
<circle cx="50" cy="50" r="6.5" fill="#3B82F6"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 627 B |
@@ -0,0 +1,24 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<symbol id="bluesky-icon" viewBox="0 0 16 17">
|
||||
<g clip-path="url(#bluesky-clip)"><path fill="#08060d" d="M7.75 7.735c-.693-1.348-2.58-3.86-4.334-5.097-1.68-1.187-2.32-.981-2.74-.79C.188 2.065.1 2.812.1 3.251s.241 3.602.398 4.13c.52 1.744 2.367 2.333 4.07 2.145-2.495.37-4.71 1.278-1.805 4.512 3.196 3.309 4.38-.71 4.987-2.746.608 2.036 1.307 5.91 4.93 2.746 2.72-2.746.747-4.143-1.747-4.512 1.702.189 3.55-.4 4.07-2.145.156-.528.397-3.691.397-4.13s-.088-1.186-.575-1.406c-.42-.19-1.06-.395-2.741.79-1.755 1.24-3.64 3.752-4.334 5.099"/></g>
|
||||
<defs><clipPath id="bluesky-clip"><path fill="#fff" d="M.1.85h15.3v15.3H.1z"/></clipPath></defs>
|
||||
</symbol>
|
||||
<symbol id="discord-icon" viewBox="0 0 20 19">
|
||||
<path fill="#08060d" d="M16.224 3.768a14.5 14.5 0 0 0-3.67-1.153c-.158.286-.343.67-.47.976a13.5 13.5 0 0 0-4.067 0c-.128-.306-.317-.69-.476-.976A14.4 14.4 0 0 0 3.868 3.77C1.546 7.28.916 10.703 1.231 14.077a14.7 14.7 0 0 0 4.5 2.306q.545-.748.965-1.587a9.5 9.5 0 0 1-1.518-.74q.191-.14.372-.293c2.927 1.369 6.107 1.369 8.999 0q.183.152.372.294-.723.437-1.52.74.418.838.963 1.588a14.6 14.6 0 0 0 4.504-2.308c.37-3.911-.63-7.302-2.644-10.309m-9.13 8.234c-.878 0-1.599-.82-1.599-1.82 0-.998.705-1.82 1.6-1.82.894 0 1.614.82 1.599 1.82.001 1-.705 1.82-1.6 1.82m5.91 0c-.878 0-1.599-.82-1.599-1.82 0-.998.705-1.82 1.6-1.82.893 0 1.614.82 1.599 1.82 0 1-.706 1.82-1.6 1.82"/>
|
||||
</symbol>
|
||||
<symbol id="documentation-icon" viewBox="0 0 21 20">
|
||||
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="m15.5 13.333 1.533 1.322c.645.555.967.833.967 1.178s-.322.623-.967 1.179L15.5 18.333m-3.333-5-1.534 1.322c-.644.555-.966.833-.966 1.178s.322.623.966 1.179l1.534 1.321"/>
|
||||
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M17.167 10.836v-4.32c0-1.41 0-2.117-.224-2.68-.359-.906-1.118-1.621-2.08-1.96-.599-.21-1.349-.21-2.848-.21-2.623 0-3.935 0-4.983.369-1.684.591-3.013 1.842-3.641 3.428C3 6.449 3 7.684 3 10.154v2.122c0 2.558 0 3.838.706 4.726q.306.383.713.671c.76.536 1.79.64 3.581.66"/>
|
||||
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M3 10a2.78 2.78 0 0 1 2.778-2.778c.555 0 1.209.097 1.748-.047.48-.129.854-.503.982-.982.145-.54.048-1.194.048-1.749a2.78 2.78 0 0 1 2.777-2.777"/>
|
||||
</symbol>
|
||||
<symbol id="github-icon" viewBox="0 0 19 19">
|
||||
<path fill="#08060d" fill-rule="evenodd" d="M9.356 1.85C5.05 1.85 1.57 5.356 1.57 9.694a7.84 7.84 0 0 0 5.324 7.44c.387.079.528-.168.528-.376 0-.182-.013-.805-.013-1.454-2.165.467-2.616-.935-2.616-.935-.349-.91-.864-1.143-.864-1.143-.71-.48.051-.48.051-.48.787.051 1.2.805 1.2.805.695 1.194 1.817.857 2.268.649.064-.507.27-.857.49-1.052-1.728-.182-3.545-.857-3.545-3.87 0-.857.31-1.558.8-2.104-.078-.195-.349-1 .077-2.078 0 0 .657-.208 2.14.805a7.5 7.5 0 0 1 1.946-.26c.657 0 1.328.092 1.946.26 1.483-1.013 2.14-.805 2.14-.805.426 1.078.155 1.883.078 2.078.502.546.799 1.247.799 2.104 0 3.013-1.818 3.675-3.558 3.87.284.247.528.714.528 1.454 0 1.052-.012 1.896-.012 2.156 0 .208.142.455.528.377a7.84 7.84 0 0 0 5.324-7.441c.013-4.338-3.48-7.844-7.773-7.844" clip-rule="evenodd"/>
|
||||
</symbol>
|
||||
<symbol id="social-icon" viewBox="0 0 20 20">
|
||||
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M12.5 6.667a4.167 4.167 0 1 0-8.334 0 4.167 4.167 0 0 0 8.334 0"/>
|
||||
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M2.5 16.667a5.833 5.833 0 0 1 8.75-5.053m3.837.474.513 1.035c.07.144.257.282.414.309l.93.155c.596.1.736.536.307.965l-.723.73a.64.64 0 0 0-.152.531l.207.903c.164.715-.213.991-.84.618l-.872-.52a.63.63 0 0 0-.577 0l-.872.52c-.624.373-1.003.094-.84-.618l.207-.903a.64.64 0 0 0-.152-.532l-.723-.729c-.426-.43-.289-.864.306-.964l.93-.156a.64.64 0 0 0 .412-.31l.513-1.034c.28-.562.735-.562 1.012 0"/>
|
||||
</symbol>
|
||||
<symbol id="x-icon" viewBox="0 0 19 19">
|
||||
<path fill="#08060d" fill-rule="evenodd" d="M1.893 1.98c.052.072 1.245 1.769 2.653 3.77l2.892 4.114c.183.261.333.48.333.486s-.068.089-.152.183l-.522.593-.765.867-3.597 4.087c-.375.426-.734.834-.798.905a1 1 0 0 0-.118.148c0 .01.236.017.664.017h.663l.729-.83c.4-.457.796-.906.879-.999a692 692 0 0 0 1.794-2.038c.034-.037.301-.34.594-.675l.551-.624.345-.392a7 7 0 0 1 .34-.374c.006 0 .93 1.306 2.052 2.903l2.084 2.965.045.063h2.275c1.87 0 2.273-.003 2.266-.021-.008-.02-1.098-1.572-3.894-5.547-2.013-2.862-2.28-3.246-2.273-3.266.008-.019.282-.332 2.085-2.38l2-2.274 1.567-1.782c.022-.028-.016-.03-.65-.03h-.674l-.3.342a871 871 0 0 1-1.782 2.025c-.067.075-.405.458-.75.852a100 100 0 0 1-.803.91c-.148.172-.299.344-.99 1.127-.304.343-.32.358-.345.327-.015-.019-.904-1.282-1.976-2.808L6.365 1.85H1.8zm1.782.91 8.078 11.294c.772 1.08 1.413 1.973 1.425 1.984.016.017.241.02 1.05.017l1.03-.004-2.694-3.766L7.796 5.75 5.722 2.852l-1.039-.004-1.039-.004z" clip-rule="evenodd"/>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100" fill="none">
|
||||
<polygon points="90,50 70,84.64 30,84.64 10,50 30,15.36 70,15.36" fill="none" stroke="#d61f86" stroke-width="4.5" stroke-linejoin="round" opacity="0.3"/>
|
||||
<polygon points="78,50 64,74.25 36,74.25 22,50 36,25.75 64,25.75" fill="none" stroke="#d61f86" stroke-width="4.5" stroke-linejoin="round" opacity="0.6"/>
|
||||
<polygon points="66,50 58,63.86 42,63.86 34,50 42,36.14 58,36.14" fill="none" stroke="#d61f86" stroke-width="4.5" stroke-linejoin="round" opacity="0.95"/>
|
||||
<circle cx="50" cy="50" r="6.5" fill="#d61f86"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 627 B |
@@ -0,0 +1,9 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 340 100" width="340" height="100" fill="none">
|
||||
<!-- beacon icon -->
|
||||
<polygon points="90,50 70,84.64 30,84.64 10,50 30,15.36 70,15.36" fill="none" stroke="#d61f86" stroke-width="4.5" stroke-linejoin="round" opacity="0.3"/>
|
||||
<polygon points="78,50 64,74.25 36,74.25 22,50 36,25.75 64,25.75" fill="none" stroke="#d61f86" stroke-width="4.5" stroke-linejoin="round" opacity="0.6"/>
|
||||
<polygon points="66,50 58,63.86 42,63.86 34,50 42,36.14 58,36.14" fill="none" stroke="#d61f86" stroke-width="4.5" stroke-linejoin="round" opacity="0.95"/>
|
||||
<circle cx="50" cy="50" r="6.5" fill="#d61f86"/>
|
||||
<!-- wordmark -->
|
||||
<text x="112" y="64" font-family="'Chakra Petch', sans-serif" font-weight="500" font-size="44" letter-spacing="6" fill="#d61f86">BEACON</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 815 B |