diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 00000000..0a443c1c --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,29 @@ +# Changes from upstream (DiD, LLC) + +This is a branding patch layer on top of docusealco/docuseal, maintained +as a separate `did-branding` branch so it can be rebased against future +upstream releases without editing upstream files directly. Base license +is unchanged: AGPLv3, including the original DocuSeal attribution +requirement in `LICENSE_ADDITIONAL_TERMS`. + +## did-branding branch + +- `tailwind.config.js`, `tailwind.dynamic.config.js`: replaced the default + daisyui theme's color palette with DiD's brand palette (Deep Navy + #022647, Lime Green #9BC73C, Light Blue #75B9FC, Soft Grey #CCD6D0), + and added a `heading` font family slot. +- `app/views/layouts/_head_tags.html.erb`: added Google Fonts links for + Monda and Montserrat. +- `app/javascript/application.scss`, `app/javascript/form.scss`: applied + the Monda/Montserrat heading font to h1-h6. +- `app/views/shared/_logo.html.erb`: recolored the DocuSeal logo mark + from its default orange (#e97a42) to DiD's lime green (#9BC73C). The + logo shape and "DocuSeal" text attribution are unchanged, per + `LICENSE_ADDITIONAL_TERMS`. +- `config/routes.rb`, `app/controllers/source_controller.rb`, + `app/views/source/index.html.erb`: added an unauthenticated `/source` + route publishing this instance's corresponding source (AGPLv3 ยง13), + this CHANGES.md, and the bundled LICENSE / LICENSE_ADDITIONAL_TERMS text. + +No application logic, data handling, or upstream file content was +otherwise modified. diff --git a/app/controllers/source_controller.rb b/app/controllers/source_controller.rb new file mode 100644 index 00000000..f64238ff --- /dev/null +++ b/app/controllers/source_controller.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +# AGPLv3 Section 13 (network use) compliance: this route stays reachable +# without sign-in or setup, unauthenticated, so the corresponding source +# is available before any user interacts with the deployed instance. +class SourceController < ApplicationController + skip_before_action :authenticate_user!, raise: false + skip_before_action :maybe_redirect_to_setup, raise: false + skip_authorization_check + + layout 'plain' + + SOURCE_REPO_URL = ENV.fetch('DID_SOURCE_REPO_URL', 'https://repo.diditvi.com/didadmin/docuseal') + SOURCE_COMMIT = ENV.fetch('DID_SOURCE_COMMIT', 'unknown') + + def index + @source_repo_url = SOURCE_REPO_URL + @source_commit = SOURCE_COMMIT + @license = File.read(Rails.root.join('LICENSE')) + @additional_terms = File.read(Rails.root.join('LICENSE_ADDITIONAL_TERMS')) + @changes = File.read(Rails.root.join('CHANGES.md')) + end +end diff --git a/app/views/source/index.html.erb b/app/views/source/index.html.erb new file mode 100644 index 00000000..b9c24bcf --- /dev/null +++ b/app/views/source/index.html.erb @@ -0,0 +1,31 @@ +
+
+

Source Code

+

+ This is a DiD-branded build of + DocuSeal, + licensed under the GNU Affero General Public License v3 (AGPLv3). + In accordance with AGPLv3 Section 13, the complete corresponding source + for this exact running instance is published here: +

+

+ <%= @source_repo_url %> +

+

Running commit: <%= @source_commit %>

+
+ +
+

Changes from upstream

+
<%= @changes %>
+
+ +
+

License (AGPLv3)

+
<%= @license %>
+
+ +
+

Additional Terms

+
<%= @additional_terms %>
+
+
diff --git a/config/routes.rb b/config/routes.rb index ad8505e5..81fa99f3 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -11,6 +11,8 @@ Rails.application.routes.draw do root 'dashboard#index' + get '/source', to: 'source#index' + get 'up' => 'rails/health#show' get 'manifest' => 'pwa#manifest'