Skip to content

Conversation

@amrit3701
Copy link
Member

@amrit3701 amrit3701 commented Nov 23, 2025

Summary

This PR updates the codebase to be fully brand-agnostic and aligns the default configuration with FreeCAD branding. It includes UI updates, backend changes, migrations, and improvements to the download and admin systems.


Changes Included

🖼️ Branding Updates

  • Updated logo files to FreeCAD branding using brand-agnostic filenames
    • Removed ondsel_logo.svg, added logo.svg
  • Updated default homepage content:
    • Added backend proxy endpoint for FreeCAD blog RSS feed
    • Updated default RSS feed URL to use the new proxy
    • Updated default banner content to a maintenance notice (disabled by default)
  • Renamed initial sample model filenames to brand-agnostic names (e.g., ondsel.FCStdsample.FCStd)
  • Injected site title dynamically in email templates
  • Added configurable social links in the Branding Hub
    • Replaced hardcoded Ondsel references in templates

👤 Admin & Permissions

  • Changed default admin username to a brand-agnostic value
  • Updated related error messages and function names
  • Implemented consistent site-admin permission checks:
    • Removed hardcoded @ondsel.com admin logic
    • Replaced with organization-based admin permission checks across backend & frontend
    • Replaced isTripe logic with new organization-based admin checks

📦 Download Section Enhancements

  • Made the download section fully configurable with support for external download URLs
  • Redesigned XavierUpdateSoftwareReleases admin page (improved UI/UX)
  • Added ability to save release info from GitHub Releases JSON into the database
  • Added migration to set default FreeCAD downloads
  • Added admin options to configure:
    • Desktop app name
    • Version
    • Protocol
    • Enable/disable “Open in Desktop App”
  • Added Download section to the left sidebar menu

🏗️ Platform-Wide Refactor: Brand-Agnostic

  • Renamed organization type from Ondsel → Admin
    • Added migration to update existing organizations
  • Replaced Ondsel-specific TOS & Privacy Policy with placeholder TBD content (admin editable)
    • Removed Ondsel-specific extra TOS/PP migration
  • Updated copyright text to FreeCAD
  • Replaced Ondsel references across the codebase with generic “Lens platform” terminology
  • Changed BREP file prefix from ondsel_lens_ (with backward compatibility)
  • Updated Docker image names to brand-agnostic names

TODO (Before Merge)


Notes

This PR ensures that the platform can be deployed under any brand while using FreeCAD as the default configuration.


Output Screenshots

image image image image image image image image

updates default rss url to freecad blogs
updates default banner content
and updates related error messages & function names
…ecks

- Remove isTripe field from backend schema, resolvers, and hooks
- Replace isTripe checks with verifySiteAdministrativePower in backend
- Add isSiteAdministrator Vuex action to frontend
- Update all Xavier admin views to use new action

Ensures consistent permission checking using Admin organization membership
and isAdmin flag instead of deprecated isTripe field.
…nal download URLs

- Redesign XavierUpdateSoftwareReleases admin page with improved UI and bulk operations
- Add migration to set default FreeCAD downloads
@amrit3701 amrit3701 changed the title Feature/add dynamic branding system Make Entire Codebase Brand-Agnostic and Apply Default FreeCAD Branding Nov 23, 2025
@amrit3701 amrit3701 marked this pull request as ready for review November 23, 2025 18:03
@amrit3701 amrit3701 self-assigned this Nov 23, 2025
@amrit3701
Copy link
Member Author

@pieterhijma @prokoudine

Feel free to review the PR and share your feedback.

@chennes chennes requested a review from pieterhijma November 23, 2025 18:55
Copy link
Collaborator

@pieterhijma pieterhijma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

I have only a couple of remarks:

The README could have more information:

  • Running the backend for the first time could mention entry.sh. I totally missed this script with the necessasry migrations.
  • It would also good to mention this in the README: http://localhost:3000/xavier-68373833

The REUSE information is not up to date any longer. It would be good to have that up-to-date. If you want, I can submit a PR for this as well.

$ reuse lint
# MISSING COPYRIGHT AND LICENSING INFORMATION

The following files have no copyright and licensing information:
* .gitmodules
* backend/entry.sh
* backend/uploads/.gitignore
* backend/uploads/public/.gitignore
* backend/uploads/public/branding/.gitignore
* backend/uploads/public/sample_thumbnail.PNG
* backend/uploads/sample.FCStd
* backend/uploads/sample_generated.FCSTD
* docker-compose.dev.yml
* docker-compose.prebuilds.yml
* docker-compose.yml
* docs/services.md
* docs/technical.md
* docs/test-models/assembly.zip
* docs/upgrade.md
* docs/workflows.md
* env.example
* env.with-aws.example
* frontend/entry.sh
* frontend/public/img/icon-apple.svg
* frontend/public/img/icon-linux.svg
* frontend/public/img/icon-windows.svg

# SUMMARY

* Bad licenses: 0
* Deprecated licenses: 0
* Licenses without file extension: 0
* Missing licenses: 0
* Unused licenses: 0
* Used licenses: AGPL-3.0-or-later, BSD-2-Clause, CC-BY-SA-4.0, LGPL-2.1-only
* Read errors: 0
* Invalid SPDX License Expressions: 0
* Files with copyright information: 507 / 529
* Files with license information: 507 / 529

Unfortunately, your project is not compliant with version 3.3 of the REUSE Specification :-(


# RECOMMENDATIONS

* Fix missing copyright/licensing information: For one or more files, the tool
  cannot find copyright and/or licensing information. You typically do this by
  adding 'SPDX-FileCopyrightText' and 'SPDX-License-Identifier' tags to each
  file. The tutorial explains additional ways to do this:
  <https://reuse.software/tutorial/>

amrit3701 and others added 2 commits November 26, 2025 11:14
@amrit3701
Copy link
Member Author

@pieterhijma

Earlier, when Ondsel was handling the development, we were using the following text as the file header:

// SPDX-FileCopyrightText: 2024 Ondsel <[email protected]>
//
// SPDX-License-Identifier: AGPL-3.0-or-later

Now that FreeCAD is sponsoring the project, so for the new files should I continue using the same license and file copyright text? What are your thoughts?

cc @yorikvanhavre @chennes @prokoudine

@pieterhijma
Copy link
Collaborator

@pieterhijma

Earlier, when Ondsel was handling the development, we were using the following text as the file header:

// SPDX-FileCopyrightText: 2024 Ondsel <[email protected]>
//
// SPDX-License-Identifier: AGPL-3.0-or-later

Now that FreeCAD is sponsoring the project, so for the new files should I continue using the same license and file copyright text? What are your thoughts?

cc @yorikvanhavre @chennes @prokoudine

Hi @amrit3701,

In principle, you should use the same license. For copyright holder I would advise to use your own name, own email address (not strictly necessary), and the current year.

I'm not a lawyer of course, but I believe that the creative output is the thing on which you can claim copyright. So, I use the following rules:

If there is only a minor change that does not change any logic, for example rename functions, add an if-statement here and there: This is not enough for me to claim copyright, so I leave the copyright text as is.

If there is a major change that adds new logic, so there is a creative process behind it, I would add myself as copyright holder, so:

// SPDX-FileCopyrightText: 2024 Ondsel <[email protected]>
// SPDX-FileCopyrightText: 2025 Your name <[email protected]>
//
// SPDX-License-Identifier: AGPL-3.0-or-later

If you introduce new files, you claim full copyright:

// SPDX-FileCopyrightText: 2025 Your name <[email protected]>
//
// SPDX-License-Identifier: AGPL-3.0-or-later

Although the FPA is sponsoring the project, what you do is not prescribed by the FPA. Additionally, the proposal that you submitted is your own creative process. Finally, I'm pretty sure that you don't have a contract that tells you to transfer copyright to the FPA. It would be different if the FPA hires you for a thing that they specifically want. An example is Ondsel itself that hired me to work on the Addon and I had a contract which stated that copyright would be Ondsel's.

In any case, I claimed copyright in FreeCAD on the projects sponsored by the FPA and this is a new file I introduced in the Addon where I claimed copyright:

https://github.com/FreeCAD/Ondsel-Lens-Addon/blob/develop/components/edit_profile_dialog.py

This is an example where I added myself a second time with a new email address (for a different project):
https://codeberg.org/osh-autodoc/osh-autodoc-workbench/pulls/84/files#diff-8a24b162ee3c5a2647db13ff1bd0dc8525862ae1

I now realize that I should probably also update the addon with more precise copyright info.

@amrit3701
Copy link
Member Author

@pieterhijma please have another look at the PR. I’ve added the copyright headers to the new files:
dea2663

I’ve also updated the FC-Worker revision. I’m currently working on the documentation and will create a separate PR for that.

Pieter, in my earlier PRs I changed the root organization from OndselOrganization to AdminOrganization (https://github.com/FreeCAD/Ondsel-Server/pull/31/files#diff-99d0459864cb56d07854c761d9ae6f04fc48694ca39fecb31c626c320ec30a09R61). Could you please confirm that the latest Ondsel-Addon will not crash with the latest Ondsel-Server? If there’s any issue, I’ll prepare a fix for that.

@pieterhijma
Copy link
Collaborator

Thanks, sorry for the delay, I will try to look at it the coming days.

@pieterhijma
Copy link
Collaborator

Pieter, in my earlier PRs I changed the root organization from OndselOrganization to AdminOrganization (https://github.com/FreeCAD/Ondsel-Server/pull/31/files#diff-99d0459864cb56d07854c761d9ae6f04fc48694ca39fecb31c626c320ec30a09R61). Could you please confirm that the latest Ondsel-Addon will not crash with the latest Ondsel-Server? If there’s any issue, I’ll prepare a fix for that.

I believe this is indeed problematic. I have the following in the addon:

15:41:44  DEBUG: APIClient:382 XXXXXX Call Data XXXXXX
15:41:44  DEBUG: APIClient:384 endpoint organizations
15:41:44  DEBUG: APIClient:384 headers {'Authorization': 'Bearer None', 'Accept': 'application/json', 'X-Lens-Source': 'freecad', 'X-Lens-Version': '1.0.2, 39319 (Git), Unknown, 2025/08/05 20:19:07, makepkg, 256fc7eff3379911ab5daf88e10182c509aa8052, addon: 2025.11.21.01'}
15:41:44  DEBUG: APIClient:384 params {'type': 'Ondsel', 'publicInfo': 'true'}
15:41:44  DEBUG: APIClient:385 XXXXXXXXXXXXXXXXXXXXXXX
15:41:44  DEBUG: APIClient:387 <Response [400]>
15:41:44  DEBUG: APIClient:388 Status code: 400
15:41:44  DEBUG: APIClient:391 Content-Type: application/json; charset=utf-8
15:41:44  DEBUG: APIClient:394 Response body (text): {"name":"BadRequest","message":"validation failed","code":400,"className":"bad-request","data":[{"instancePath":"/type","schemaPath":"#/properties/type/anyOf/0/enum","keyword":"enum","params":{"allowedValues":["Personal","Open","Private","Admin"]},"message":"must be equal to one of the allowed values"},{"instancePath":"/type","schemaPath":"#/properties/type/anyOf/1/type","keyword":"type","params":{"type":"object"},"message":"must be object"},{"instancePath":"/type","schemaPath":"#/properties/type/anyOf","keyword":"anyOf","params":{},"message":"must match a schema in anyOf"}]}
15:41:44  DEBUG: APIClient:398 Response body (JSON): {'name': 'BadRequest', 'message': 'validation failed', 'code': 400, 'className': 'bad-request', 'data': [{'instancePath': '/type', 'schemaPath': '#/properties/type/anyOf/0/enum', 'keyword': 'enum', 'params': {'allowedValues': ['Personal', 'Open', 'Private', 'Admin']}, 'message': 'must be equal to one of the allowed values'}, {'instancePath': '/type', 'schemaPath': '#/properties/type/anyOf/1/type', 'keyword': 'type', 'params': {'type': 'object'}, 'message': 'must be object'}, {'instancePath': '/type', 'schemaPath': '#/properties/type/anyOf', 'keyword': 'anyOf', 'params': {}, 'message': 'must match a schema in anyOf'}]}
15:41:44  ERROR: APIClient:1075 API request failed with status code 400: validation failed

However, I can try to adapt to this as well.

@pieterhijma
Copy link
Collaborator

I fixed this error with FreeCAD/Ondsel-Lens-Addon#23.

Copy link
Collaborator

@pieterhijma pieterhijma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Would still like to have the thing below in the README though (or is there any reason not to include it?)

The README could have more information:

Running the backend for the first time could mention entry.sh. I totally missed this script with the necessasry migrations.
It would also good to mention this in the README: http://localhost:3000/xavier-68373833

There is a PR for the change of the Ondsel/Admin organization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants