feat: Add packaging and deployment targets to architecture documentation; update roadmap with container packaging details and review policy

This commit is contained in:
2026-05-23 18:15:31 -05:00
parent e20669e42a
commit 94c7cadcd7
4 changed files with 77 additions and 26 deletions
+13
View File
@@ -17,6 +17,19 @@ Out of scope for early phases:
- Rich social graph features beyond project-oriented interactions. - Rich social graph features beyond project-oriented interactions.
- Highly customized recommendation systems. - Highly customized recommendation systems.
## Packaging and Deployment Targets
FeDIY is intended to be shipped and operated through a small set of first-class packaging targets so instance operators can choose the deployment style that fits their environment:
- **Nix flake/devShell**: reproducible development and build environment for contributors and operators who prefer Nix.
- **Flatpak**: desktop-friendly distribution path for bundled client or companion tooling where applicable.
- **OCI/Docker container image**: a standard containerized deployment path for managed hosting, Kubernetes, and simple `docker compose` installs.
- **NixOS module**: optional system integration for operators already using NixOS.
These targets should share the same application artifact and configuration model where possible. Packaging differences should be limited to how the binary is delivered, configured, and run; they should not fork the core runtime behavior.
The flake and related packaging shells should be reviewed periodically so the included tools stay aligned with current phase needs. The default posture is to keep the dev environment lean and add tools only when they directly support active work such as building, testing, localization, accessibility validation, container packaging, or release tasks.
## Core Domains ## Core Domains
- Identity and actors. - Identity and actors.
+2
View File
@@ -24,6 +24,8 @@ Exit criteria:
- ADR for project revision lifecycle (draft/publish/supersede). - ADR for project revision lifecycle (draft/publish/supersede).
- ADR for composable extension mechanism (shape, namespacing, discovery). - ADR for composable extension mechanism (shape, namespacing, discovery).
- ADR for persistence layer architecture (PostgreSQL as primary target; repository abstraction pattern; query library selection; SQLite future-option strategy). - ADR for persistence layer architecture (PostgreSQL as primary target; repository abstraction pattern; query library selection; SQLite future-option strategy).
- Documented container packaging path (OCI/Docker image build/run flow and configuration contract) alongside existing Nix and Flatpak targets.
- Periodic packaging/tooling review policy so the flake and shell environments stay aligned with active roadmap phases and do not accumulate stale dependencies.
- Initial repository layout includes dedicated locations for API contracts and extension schemas. - Initial repository layout includes dedicated locations for API contracts and extension schemas.
- Documented answer to Q38: personal data categories and lawful basis for each (prerequisite for any user data model work). - Documented answer to Q38: personal data categories and lawful basis for each (prerequisite for any user data model work).
- Draft privacy notice template and operator guidance (prerequisite for any public-facing instance). - Draft privacy notice template and operator guidance (prerequisite for any public-facing instance).
+44 -9
View File
@@ -36,7 +36,7 @@
templates = { templates = {
default = { default = {
path = ./.; path = ./.;
description = "FeDIY Rust development environment and package outputs"; description = "FeDIY Rust development environment and package outputs for Nix and non-Nix contributors";
}; };
}; };
@@ -59,7 +59,9 @@
{ pkgs }: { pkgs }:
{ {
default = pkgs.mkShell { default = pkgs.mkShell {
packages = with pkgs; [ packages =
with pkgs;
[
# Rust toolchain (managed by fenix overlay) # Rust toolchain (managed by fenix overlay)
rustToolchain rustToolchain
rust-analyzer rust-analyzer
@@ -68,6 +70,13 @@
gnumake gnumake
openssl openssl
pkg-config pkg-config
# Local database tooling
postgresql
# Localization tooling
gettext
# Browser and accessibility testing
chromium
playwright
# Cargo productivity tools # Cargo productivity tools
cargo-deny cargo-deny
cargo-edit cargo-edit
@@ -76,6 +85,12 @@
pre-commit pre-commit
# Packaging # Packaging
flatpak-builder flatpak-builder
]
++ lib.optionals pkgs.stdenv.isLinux [
# OCI/container tooling (Linux host only)
podman
podman-compose
buildah
]; ];
env = { env = {
@@ -91,8 +106,14 @@
fi fi
echo "[FeDIY] Welcome to the dev shell!" echo "[FeDIY] Welcome to the dev shell!"
echo "Tools: cargo, rustc, clippy, rustfmt, rust-analyzer, flatpak-builder" echo "If you're new to Nix: this shell gives you the exact tools this repo expects."
echo "Run 'cargo build' to build, 'make flatpak-build' for Flatpak, or 'nix run .#dev-helper' for a tool summary." echo "Start with 'cargo build'. Use 'nix run .#dev-helper' for a quick tool summary."
echo "Tools: cargo, rustc, clippy, rustfmt, rust-analyzer, flatpak-builder, psql, gettext, chromium, playwright"
echo "Packaging note: the shell is intentionally reviewed and trimmed as the roadmap changes."
if command -v podman >/dev/null 2>&1; then
echo "OCI tools: podman, podman-compose, buildah"
fi
echo "Run 'cargo build' to build, 'cargo test' to test, or 'make flatpak-build' for Flatpak."
echo "See README.md for usage." echo "See README.md for usage."
''; '';
}; };
@@ -113,11 +134,25 @@
devHelper = pkgs.writeShellScriptBin "dev-helper" '' devHelper = pkgs.writeShellScriptBin "dev-helper" ''
echo "=== FeDIY dev shell tools ===" echo "=== FeDIY dev shell tools ==="
command -v cargo >/dev/null 2>&1 && echo "cargo: $(cargo --version)" || echo "cargo: not found" echo "Build + Rust"
command -v rustc >/dev/null 2>&1 && echo "rustc: $(rustc --version)" || echo "rustc: not found" command -v cargo >/dev/null 2>&1 && echo " cargo: $(cargo --version)" || echo " cargo: not found"
command -v rust-analyzer >/dev/null 2>&1 && echo "rust-analyzer: $(rust-analyzer --version)" || echo "rust-analyzer: not found" command -v rustc >/dev/null 2>&1 && echo " rustc: $(rustc --version)" || echo " rustc: not found"
command -v flatpak-builder >/dev/null 2>&1 && echo "flatpak-builder: $(flatpak-builder --version)" || echo "flatpak-builder: not found" command -v rust-analyzer >/dev/null 2>&1 && echo " rust-analyzer: $(rust-analyzer --version)" || echo " rust-analyzer: not found"
command -v pre-commit >/dev/null 2>&1 && echo "pre-commit: $(pre-commit --version)" || echo "pre-commit: not found" echo "Testing + quality"
command -v pre-commit >/dev/null 2>&1 && echo " pre-commit: $(pre-commit --version)" || echo " pre-commit: not found"
command -v flatpak-builder >/dev/null 2>&1 && echo " flatpak-builder: $(flatpak-builder --version)" || echo " flatpak-builder: not found"
echo "Data + localization"
command -v psql >/dev/null 2>&1 && echo " psql: $(psql --version)" || echo " psql: not found"
command -v gettext >/dev/null 2>&1 && echo " gettext: $(gettext --version | head -n 1)" || echo " gettext: not found"
echo "Accessibility + browser checks"
command -v chromium >/dev/null 2>&1 && echo " chromium: $(chromium --version)" || echo " chromium: not found"
command -v playwright >/dev/null 2>&1 && echo " playwright: $(playwright --version)" || echo " playwright: not found"
if command -v podman >/dev/null 2>&1; then
echo "Container tooling"
echo " podman: $(podman --version)"
command -v podman-compose >/dev/null 2>&1 && echo " podman-compose: $(podman-compose --version)" || echo " podman-compose: not found"
command -v buildah >/dev/null 2>&1 && echo " buildah: $(buildah --version)" || echo " buildah: not found"
fi
''; '';
} }
); );
+1
View File
@@ -8,6 +8,7 @@ pkgs.mkShell {
pkgs.rustfmt pkgs.rustfmt
pkgs.clippy pkgs.clippy
pkgs.rust-analyzer pkgs.rust-analyzer
pkgs.postgresql
]; ];
shellHook = '' shellHook = ''
echo "[shell.nix] Legacy shell for Rust dev. Use 'nix develop' for full flake support." echo "[shell.nix] Legacy shell for Rust dev. Use 'nix develop' for full flake support."