diff --git a/.cursor/.cursorrules b/.cursor/.cursorrules index 3f9d8425..244a3eec 100644 --- a/.cursor/.cursorrules +++ b/.cursor/.cursorrules @@ -9,7 +9,7 @@ - React Query hooks are auto-generated from the API's Swagger documentation - After adding/modifying API endpoints, regenerate the client: `pnpm nx build react-query-client --skipNxCache` -- The hooks will be available in `@attraccess/react-query-client` after regeneration +- The hooks will be available in `@fabaccess/react-query-client` after regeneration - Use naming pattern: `useUsersService` (e.g., `useUsersServiceRequestEmailChange`) ## Project Structure @@ -77,7 +77,7 @@ ### React Query Usage -- Import hooks from `@attraccess/react-query-client` +- Import hooks from `@fabaccess/react-query-client` - Use mutation callbacks: `onSuccess`, `onError` - Pass `requestBody` parameter for POST/PATCH requests - Use `id` parameter for route params diff --git a/.env-export-swagger b/.env-export-swagger index a2e1c577..e6bacd5a 100644 --- a/.env-export-swagger +++ b/.env-export-swagger @@ -5,9 +5,9 @@ AUTH_SESSION_SECRET=super-secret-key # DB_TYPE=postgres # DB_HOST=localhost # DB_PORT=2345 -# DB_USERNAME=attraccess -# DB_PASSWORD=attraccess -# DB_DATABASE=attraccess +# DB_USERNAME=fabaccess +# DB_PASSWORD=fabaccess +# DB_DATABASE=fabaccess DB_TYPE=sqlite @@ -19,7 +19,7 @@ SMTP_HOST=localhost SMTP_PORT=1025 SMTP_USER= SMTP_PASS= -SMTP_FROM=no-reply@attraccess.org +SMTP_FROM=no-reply@fabaccess.org # Comma-separated list of enabled log levels: error,warn,log,debug,verbose LOG_LEVELS=error,warn,log,debug diff --git a/.env.example b/.env.example index 5de8f1a2..fc6dcead 100644 --- a/.env.example +++ b/.env.example @@ -5,9 +5,9 @@ AUTH_SESSION_SECRET= # DB_TYPE=postgres # DB_HOST=localhost # DB_PORT=2345 -# DB_USERNAME=attraccess -# DB_PASSWORD=attraccess -# DB_DATABASE=attraccess +# DB_USERNAME=fabaccess +# DB_PASSWORD=fabaccess +# DB_DATABASE=fabaccess DB_TYPE=sqlite diff --git a/.env.serve b/.env.serve index 6765cfba..ee347f82 100644 --- a/.env.serve +++ b/.env.serve @@ -5,9 +5,9 @@ AUTH_SESSION_SECRET=super-secret-key # DB_TYPE=postgres # DB_HOST=localhost # DB_PORT=2345 -# DB_USERNAME=attraccess -# DB_PASSWORD=attraccess -# DB_DATABASE=attraccess +# DB_USERNAME=fabaccess +# DB_PASSWORD=fabaccess +# DB_DATABASE=fabaccess DB_TYPE=sqlite @@ -23,7 +23,7 @@ SMTP_HOST=localhost SMTP_PORT=1025 SMTP_USER= SMTP_PASS= -SMTP_FROM=no-reply@attraccess.org +SMTP_FROM=no-reply@fabaccess.org # Comma-separated list of enabled log levels: error,warn,log,debug,verbose LOG_LEVELS=error,warn,log,debug,verbose diff --git a/.github/workflows/send-issue-to-openhands.yml b/.github/workflows/send-issue-to-openhands.yml deleted file mode 100644 index a80f6d4a..00000000 --- a/.github/workflows/send-issue-to-openhands.yml +++ /dev/null @@ -1,194 +0,0 @@ -name: Send Issue to OpenHands AI - -on: - issue_comment: - types: [created] - -jobs: - send_to_openhands: - runs-on: ubuntu-latest - steps: - - name: Check if user is authorized and comment contains trigger - id: check_authorization - env: - ALLOWED_TRIGGER_USERS: ${{ secrets.OPENHANDS_ALLOWED_TRIGGER_USERS }} - COMMENT_BODY: ${{ github.event.comment.body }} - COMMENTER_LOGIN: ${{ github.event.comment.user.login }} - run: | - # Check if required secrets are available - if [[ -z "${{ secrets.OPENHANDS_AUTHENTIK_BASE_URL }}" || \ - -z "${{ secrets.OPENHANDS_AUTHENTIK_CLIENT_ID }}" || \ - -z "${{ secrets.OPENHANDS_AUTHENTIK_SERVICE_ACCOUNT_USERNAME }}" || \ - -z "${{ secrets.OPENHANDS_AUTHENTIK_SERVICE_ACCOUNT_TOKEN }}" || \ - -z "${{ secrets.OPENHANDS_API_HOSTNAME }}" || \ - -z "${ALLOWED_TRIGGER_USERS}" ]]; then - echo "Required secrets are not configured. Skipping workflow." - echo "authorized=false" >> "$GITHUB_OUTPUT" - exit 0 - fi - - # Check if comment contains #ai trigger - if [[ ! "${COMMENT_BODY}" == *"#ai"* ]]; then - echo "Comment does not contain #ai trigger. Skipping workflow." - echo "authorized=false" >> "$GITHUB_OUTPUT" - exit 0 - fi - - # Check if user is in allowed list - if [[ ",${ALLOWED_TRIGGER_USERS}," == *",${COMMENTER_LOGIN},"* ]]; then - echo "User ${COMMENTER_LOGIN} is authorized to trigger this workflow." - echo "authorized=true" >> "$GITHUB_OUTPUT" - else - echo "User ${COMMENTER_LOGIN} is not authorized to trigger this workflow." - echo "authorized=false" >> "$GITHUB_OUTPUT" - fi - - - name: Get Authentik Access Token - if: steps.check_authorization.outputs.authorized == 'true' - id: get_token - env: - AUTHENTIK_BASE_URL: ${{ secrets.OPENHANDS_AUTHENTIK_BASE_URL }} - AUTHENTIK_CLIENT_ID: ${{ secrets.OPENHANDS_AUTHENTIK_CLIENT_ID }} - AUTHENTIK_SERVICE_ACCOUNT_USERNAME: ${{ secrets.OPENHANDS_AUTHENTIK_SERVICE_ACCOUNT_USERNAME }} - AUTHENTIK_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OPENHANDS_AUTHENTIK_SERVICE_ACCOUNT_TOKEN }} - run: | - echo "Attempting to retrieve Authentik access token..." - echo "Base URL: ${AUTHENTIK_BASE_URL}" - echo "Client ID: ${AUTHENTIK_CLIENT_ID}" - echo "Service Account: ${AUTHENTIK_SERVICE_ACCOUNT_USERNAME}" - - # Authentik uses client_credentials grant with username/password for service accounts - # The service account token is created as an "App Password" type token in Authentik - TOKEN_ENDPOINT="${AUTHENTIK_BASE_URL}/application/o/token/" - - # Make the token request - echo "Making request to: ${TOKEN_ENDPOINT}" - - # Use curl with separate output for body and write HTTP code to stderr - HTTP_CODE=$(curl -s -o /tmp/response_body.json -w "%{http_code}" -X POST "${TOKEN_ENDPOINT}" \ - -H "Content-Type: application/x-www-form-urlencoded" \ - -d "grant_type=client_credentials" \ - -d "client_id=${AUTHENTIK_CLIENT_ID}" \ - -d "username=${AUTHENTIK_SERVICE_ACCOUNT_USERNAME}" \ - -d "password=${AUTHENTIK_SERVICE_ACCOUNT_TOKEN}" \ - -d "scope=openid profile") - - # Read the response body - RESPONSE_BODY=$(cat /tmp/response_body.json) - - echo "HTTP Status Code: ${HTTP_CODE}" - - # Check if request was successful - if [[ "${HTTP_CODE}" != "200" ]]; then - echo "::error::Token request failed with HTTP ${HTTP_CODE}" - echo "::error::Response: ${RESPONSE_BODY}" - exit 1 - fi - - echo "✅ Authentication request successful!" - - # Extract access token - if ! ACCESS_TOKEN=$(echo "${RESPONSE_BODY}" | jq -r '.access_token // empty'); then - echo "::error::Failed to parse JSON response from Authentik." - echo "::error::Response was: ${RESPONSE_BODY}" - exit 1 - fi - - if [[ -z "${ACCESS_TOKEN}" || "${ACCESS_TOKEN}" == "null" ]]; then - echo "::error::Failed to retrieve access token from Authentik response." - echo "::error::Response body: ${RESPONSE_BODY}" - exit 1 - fi - - # Show success message - echo "✅ Successfully retrieved access token from Authentik!" - echo "Token type: $(echo "${RESPONSE_BODY}" | jq -r '.token_type // "unknown"')" - echo "Scope: $(echo "${RESPONSE_BODY}" | jq -r '.scope // "unknown"')" - echo "Expires in: $(echo "${RESPONSE_BODY}" | jq -r '.expires_in // "unknown"') seconds" - - # Set output - echo "access_token=${ACCESS_TOKEN}" >> "$GITHUB_OUTPUT" - echo "Successfully authenticated with Authentik!" - - # Clean up - rm -f /tmp/response_body.json - - - name: Send Issue to OpenHands - if: steps.check_authorization.outputs.authorized == 'true' - env: - AUTHENTIK_ACCESS_TOKEN: ${{ steps.get_token.outputs.access_token }} - OPENHANDS_API_HOSTNAME: ${{ secrets.OPENHANDS_API_HOSTNAME }} - ISSUE_TITLE: ${{ github.event.issue.title }} - ISSUE_BODY: ${{ github.event.issue.body }} - ISSUE_URL: ${{ github.event.issue.html_url }} - COMMENTER_LOGIN: ${{ github.event.comment.user.login }} - COMMENT_BODY: ${{ github.event.comment.body }} - REPOSITORY_FULL_NAME: ${{ github.event.repository.full_name }} - run: | - echo "Sending issue to OpenHands..." - echo "Repository: ${REPOSITORY_FULL_NAME}" - echo "Triggered by: ${COMMENTER_LOGIN}" - - # Extract custom instruction from comment - COMMENT_BODY_TRIMMED=$(echo "${COMMENT_BODY}" | xargs) - COMMENT_BODY_LOWER=$(echo "${COMMENT_BODY_TRIMMED}" | tr '[:upper:]' '[:lower:]') - - if [[ "${COMMENT_BODY_LOWER}" == "#ai" ]]; then - TASK_INSTRUCTION="Please analyze the following GitHub issue and provide a solution or implement the requested feature/task." - else - # Remove #ai prefix and extract custom instruction - CUSTOM_INSTRUCTION=$(echo "${COMMENT_BODY_TRIMMED}" | sed -E 's/^[[:space:]]*#[Aa][Ii][[:space:]]+//') - - if [[ -z "${CUSTOM_INSTRUCTION}" || "${CUSTOM_INSTRUCTION}" == "${COMMENT_BODY_TRIMMED}" ]]; then - TASK_INSTRUCTION="Please analyze the following GitHub issue and provide a solution or implement the requested feature/task." - else - TASK_INSTRUCTION="${CUSTOM_INSTRUCTION}" - fi - fi - - PROGRESS_UPDATE_INSTRUCTION=" Periodically post/comment updates about your progress to the GitHub issue." - TASK_INSTRUCTION="${TASK_INSTRUCTION}${PROGRESS_UPDATE_INSTRUCTION}" - - PUSH_TO_GITHUB_INSTRUCTION=" After implementing the solution, please push your changes to a new branch on GitHub and create a pull request." - TASK_INSTRUCTION="${TASK_INSTRUCTION}${PUSH_TO_GITHUB_INSTRUCTION}" - - # Create the complete message - INITIAL_USER_MSG=$(jq -n \ - --arg task "${TASK_INSTRUCTION}" \ - --arg title "${ISSUE_TITLE}" \ - --arg body "${ISSUE_BODY}" \ - --arg url "${ISSUE_URL}" \ - --arg user "${COMMENTER_LOGIN}" \ - '$task + "\n\n--- Issue Details ---\nIssue Title: " + $title + "\nIssue Body:\n" + $body + "\nLink to issue: " + $url + "\nTriggered by GitHub user: " + $user') - - # Create JSON payload - JSON_PAYLOAD=$(jq -n \ - --argjson msg "${INITIAL_USER_MSG}" \ - --arg repo "${REPOSITORY_FULL_NAME}" \ - '{initial_user_msg: $msg, repository: $repo, git_provider: "github"}') - - # Send to OpenHands API - echo "Sending request to: ${OPENHANDS_API_HOSTNAME}/api/conversations" - - HTTP_CODE=$(curl -s -o /tmp/openhands_response.json -w "%{http_code}" -X POST "${OPENHANDS_API_HOSTNAME}/api/conversations" \ - -H "Authorization: Bearer ${AUTHENTIK_ACCESS_TOKEN}" \ - -H "Content-Type: application/json" \ - -d "${JSON_PAYLOAD}") - - # Read the response - RESPONSE_BODY=$(cat /tmp/openhands_response.json) - - echo "HTTP Status Code: ${HTTP_CODE}" - - if [[ "${HTTP_CODE}" =~ ^2[0-9][0-9]$ ]]; then - echo "✅ Successfully sent issue to OpenHands!" - echo "Response: ${RESPONSE_BODY}" - # Clean up - rm -f /tmp/openhands_response.json - else - echo "::error::OpenHands API request failed with HTTP ${HTTP_CODE}" - echo "::error::Response: ${RESPONSE_BODY}" - # Clean up - rm -f /tmp/openhands_response.json - exit 1 - fi diff --git a/.openhands/microagents/repo.md b/.openhands/microagents/repo.md index 3a956298..299b94bc 100644 --- a/.openhands/microagents/repo.md +++ b/.openhands/microagents/repo.md @@ -1,34 +1,34 @@ --- -name: Attraccess Repository Guidelines -description: Provides general information and guidelines for working with the Attraccess monorepo. +name: FabAccess Repository Guidelines +description: Provides general information and guidelines for working with the FabAccess monorepo. --- -# Attraccess Repository Guidelines +# FabAccess Repository Guidelines ## 1. Project Overview -* **What is Attraccess?** Attraccess is a comprehensive management application designed for makerspaces, FabLabs, and other shared workspaces. It allows administrators to define and manage 'resources,' which can represent physical machines (like 3D printers or laser cutters), tools, access points (like doors), or any other shared asset. The system controls user access to these resources. Users can initiate and terminate usage sessions, which can trigger IoT integrations (via MQTT, webhooks, etc.) to physically unlock, start, or open the corresponding resource. All usage is logged, providing administrators with data for usage analysis, billing (with a dedicated payment module planned for the future), and a future maintenance module that will manage resource availability based on maintenance schedules. -* **Main Purpose/Goal:** To provide a centralized and automated system for managing access to shared resources in collaborative workspaces, improving operational efficiency, ensuring fair usage, and enabling data-driven insights for administration and future planning (e.g., billing, maintenance). -* **Key Features:** - * Web application (React frontend, NestJS backend) - * Hardware component (FabReader NFC card reader/writer/terminal located in `apps/fabreader-firmware`) - * Monorepo structure managed by NX - * Plugin architecture (see `libs/plugins-*`) +- **What is FabAccess?** FabAccess is a comprehensive management application designed for makerspaces, FabLabs, and other shared workspaces. It allows administrators to define and manage 'resources,' which can represent physical machines (like 3D printers or laser cutters), tools, access points (like doors), or any other shared asset. The system controls user access to these resources. Users can initiate and terminate usage sessions, which can trigger IoT integrations (via MQTT, webhooks, etc.) to physically unlock, start, or open the corresponding resource. All usage is logged, providing administrators with data for usage analysis, billing (with a dedicated payment module planned for the future), and a future maintenance module that will manage resource availability based on maintenance schedules. +- **Main Purpose/Goal:** To provide a centralized and automated system for managing access to shared resources in collaborative workspaces, improving operational efficiency, ensuring fair usage, and enabling data-driven insights for administration and future planning (e.g., billing, maintenance). +- **Key Features:** + - Web application (React frontend, NestJS backend) + - Hardware component (FabReader NFC card reader/writer/terminal located in `apps/fabreader-firmware`) + - Monorepo structure managed by NX + - Plugin architecture (see `libs/plugins-*`) ## 2. Tech Stack -* **Monorepo Management:** NX -* **Package Manager:** pnpm -* **Frontend:** React, TypeScript -* **Backend (API):** NestJS, TypeScript -* **Hardware (FabReader Firmware):** C++, PlatformIO -* **Database:** TypeORM, supporting SQLite (default) and PostgreSQL. Configuration in `apps/api/src/database/datasource.ts`. Entities in `libs/database-entities`. -* **Other Key Libraries/Frameworks:** - * React Query (client-side data fetching and caching, see `libs/react-query-client`) - * HeroUI (primary frontend component library, aiming for minimal custom styling for a unified UX) - * i18next (frontend internationalization/translations) - * Passport.js (authentication middleware for NestJS backend) - * Zustand (client-side state management, often used with React Query) +- **Monorepo Management:** NX +- **Package Manager:** pnpm +- **Frontend:** React, TypeScript +- **Backend (API):** NestJS, TypeScript +- **Hardware (FabReader Firmware):** C++, PlatformIO +- **Database:** TypeORM, supporting SQLite (default) and PostgreSQL. Configuration in `apps/api/src/database/datasource.ts`. Entities in `libs/database-entities`. +- **Other Key Libraries/Frameworks:** + - React Query (client-side data fetching and caching, see `libs/react-query-client`) + - HeroUI (primary frontend component library, aiming for minimal custom styling for a unified UX) + - i18next (frontend internationalization/translations) + - Passport.js (authentication middleware for NestJS backend) + - Zustand (client-side state management, often used with React Query) ## 3. Common Commands @@ -38,54 +38,54 @@ You can discover all available commands (targets) for a specific NX-managed proj Common commands are run via `pnpm nx [options]` or `pnpm nx run : [options]`. -* **Running Development Servers:** - * API (NestJS): `pnpm nx serve api` - * Frontend (React/Vite): `pnpm nx serve frontend` - * both together: `pnpm nx run-many -t serve --projects=api,frontend` -* **Building for Production:** - * API: `pnpm nx build api` - * Frontend: `pnpm nx build frontend` - * Build all changed projects: `pnpm nx run-many --target=build` -* **Running Tests:** - * API (unit tests): `pnpm nx test api` - * API (e2e tests): `pnpm nx e2e api` - * Frontend: `pnpm nx test frontend` - * Run tests for all projects: `pnpm nx run-many --target=test` -* **Linting:** - * API: `pnpm nx lint api` - * Frontend: `pnpm nx lint frontend` - * Lint all projects: `pnpm nx run-many --target=lint` -* **Database Migrations (API project, TypeORM):** - * Generate a new migration: `pnpm nx migration-generate api --name ` (Note: you should run the pending migrations first, also this only picks up changes to entities, so you should modify them to your needs before running this.) - * Run pending migrations: `pnpm nx migrations-run api` -* **Frontend React-Query-Client:** - * regenerate from current api openapi spec: `pnpm nx build react-query-client --skipNxCache` -* **Viewing Project Graph:** - * `pnpm nx graph` +- **Running Development Servers:** + - API (NestJS): `pnpm nx serve api` + - Frontend (React/Vite): `pnpm nx serve frontend` + - both together: `pnpm nx run-many -t serve --projects=api,frontend` +- **Building for Production:** + - API: `pnpm nx build api` + - Frontend: `pnpm nx build frontend` + - Build all changed projects: `pnpm nx run-many --target=build` +- **Running Tests:** + - API (unit tests): `pnpm nx test api` + - API (e2e tests): `pnpm nx e2e api` + - Frontend: `pnpm nx test frontend` + - Run tests for all projects: `pnpm nx run-many --target=test` +- **Linting:** + - API: `pnpm nx lint api` + - Frontend: `pnpm nx lint frontend` + - Lint all projects: `pnpm nx run-many --target=lint` +- **Database Migrations (API project, TypeORM):** + - Generate a new migration: `pnpm nx migration-generate api --name ` (Note: you should run the pending migrations first, also this only picks up changes to entities, so you should modify them to your needs before running this.) + - Run pending migrations: `pnpm nx migrations-run api` +- **Frontend React-Query-Client:** + - regenerate from current api openapi spec: `pnpm nx build react-query-client --skipNxCache` +- **Viewing Project Graph:** + - `pnpm nx graph` For FabReader firmware commands (PlatformIO), see section 8. These are not run via NX. ## 4. Directory Structure Overview (Monorepo) -* `apps/`: Contains the applications. -* `libs/`: Contains shared libraries used by applications (e.g., `api-client`, `database-entities`, `plugins-*`, `react-query-client`). -* `tools/`: Contains workspace-specific tooling, scripts. -* `nx.json`: NX workspace configuration. -* `package.json`: Root package configuration, including pnpm version. +- `apps/`: Contains the applications. +- `libs/`: Contains shared libraries used by applications (e.g., `api-client`, `database-entities`, `plugins-*`, `react-query-client`). +- `tools/`: Contains workspace-specific tooling, scripts. +- `nx.json`: NX workspace configuration. +- `package.json`: Root package configuration, including pnpm version. ## 5. Coding Conventions/Style Guide -* **Commit Messages:** Follow Conventional Commits format. The scope of the commit should be the issue identifier (e.g., `feat(PROJ-123): `, `fix(GH-45): `). +- **Commit Messages:** Follow Conventional Commits format. The scope of the commit should be the issue identifier (e.g., `feat(PROJ-123): `, `fix(GH-45): `). ## 6. Deployment -* Deployment is automated via GitHub Actions. Pushing to any Pull Request branch will trigger actions that build and push Docker images for relevant applications (e.g., `api`, `frontend`). The success of these actions indicates a successful deployment/build of the pushed changes. +- Deployment is automated via GitHub Actions. Pushing to any Pull Request branch will trigger actions that build and push Docker images for relevant applications (e.g., `api`, `frontend`). The success of these actions indicates a successful deployment/build of the pushed changes. ## 7. FabReader Hardware Component -* **Location:** `apps/fabreader-firmware` -* **Build System:** PlatformIO (config: `apps/fabreader-firmware/platformio.ini`) -* **Key tasks** (run from `/workspace/Attraccess/apps/fabreader-firmware/`): - * Building firmware: `platformio run` - * Uploading firmware: `platformio run --target upload` - * Monitoring serial output: `platformio device monitor` +- **Location:** `apps/fabreader-firmware` +- **Build System:** PlatformIO (config: `apps/fabreader-firmware/platformio.ini`) +- **Key tasks** (run from `/workspace/FabAccess/apps/fabreader-firmware/`): + - Building firmware: `platformio run` + - Uploading firmware: `platformio run --target upload` + - Monitoring serial output: `platformio device monitor` diff --git a/CHANGELOG.md b/CHANGELOG.md index 569858e5..32a62af6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,11 +18,11 @@ This was a version bump only, there were no code changes. ### 🩹 Fixes -- **plugins:** fabreader now bundling deps ([e1764e6](https://github.com/FabInfra/Attraccess/commit/e1764e6)) -- **plugins:** fabreader now bundling deps ([f8b2f9e](https://github.com/FabInfra/Attraccess/commit/f8b2f9e)) -- **plugins:** correct artifact download link ([32d2cfc](https://github.com/FabInfra/Attraccess/commit/32d2cfc)) -- **plugins:** correctly bundle and resolve deps ([3c85010](https://github.com/FabInfra/Attraccess/commit/3c85010)) -- **plugins:** correctly bundle and resolve deps ([ffce4c7](https://github.com/FabInfra/Attraccess/commit/ffce4c7)) +- **plugins:** fabreader now bundling deps ([e1764e6](https://github.com/FabInfra/FabAccess/commit/e1764e6)) +- **plugins:** fabreader now bundling deps ([f8b2f9e](https://github.com/FabInfra/FabAccess/commit/f8b2f9e)) +- **plugins:** correct artifact download link ([32d2cfc](https://github.com/FabInfra/FabAccess/commit/32d2cfc)) +- **plugins:** correctly bundle and resolve deps ([3c85010](https://github.com/FabInfra/FabAccess/commit/3c85010)) +- **plugins:** correctly bundle and resolve deps ([ffce4c7](https://github.com/FabInfra/FabAccess/commit/ffce4c7)) ### ❤️ Thank You @@ -72,35 +72,35 @@ This was a version bump only, there were no code changes. ### 🚀 Features -- create react-query client and refactor frontend to use it ([f814076](https://github.com/FabInfra/Attraccess/commit/f814076)) -- implement resource groups management and UI enhancements ([8e02c3f](https://github.com/FabInfra/Attraccess/commit/8e02c3f)) -- docker images per pr ([38365f4](https://github.com/FabInfra/Attraccess/commit/38365f4)) -- docker images per pr -> comment to pr ([0152b71](https://github.com/FabInfra/Attraccess/commit/0152b71)) -- docker images per pr ([b7e1d45](https://github.com/FabInfra/Attraccess/commit/b7e1d45)) -- docker images per pr ([616eb16](https://github.com/FabInfra/Attraccess/commit/616eb16)) -- docker images for main ([ec75146](https://github.com/FabInfra/Attraccess/commit/ec75146)) -- basic plugin system foundation for api, frontend still missing ([d67849b](https://github.com/FabInfra/Attraccess/commit/d67849b)) -- pwa install prompt ([74672ce](https://github.com/FabInfra/Attraccess/commit/74672ce)) -- **docs:** added docsify docs ([dd27e34](https://github.com/FabInfra/Attraccess/commit/dd27e34)) -- **fabreader:** it works ([680c3c1](https://github.com/FabInfra/Attraccess/commit/680c3c1)) -- **fabreader:** card enrollment, reset and auth for machine control works ([e029259](https://github.com/FabInfra/Attraccess/commit/e029259)) -- **plugins:** set plugins dir in docker ([8173d6d](https://github.com/FabInfra/Attraccess/commit/8173d6d)) -- **plugins:** management ui and release ([28c192d](https://github.com/FabInfra/Attraccess/commit/28c192d)) -- **plugins:** management ui and release ([25d24c6](https://github.com/FabInfra/Attraccess/commit/25d24c6)) -- **plugins:** management ui and release ([736a617](https://github.com/FabInfra/Attraccess/commit/736a617)) +- create react-query client and refactor frontend to use it ([f814076](https://github.com/FabInfra/FabAccess/commit/f814076)) +- implement resource groups management and UI enhancements ([8e02c3f](https://github.com/FabInfra/FabAccess/commit/8e02c3f)) +- docker images per pr ([38365f4](https://github.com/FabInfra/FabAccess/commit/38365f4)) +- docker images per pr -> comment to pr ([0152b71](https://github.com/FabInfra/FabAccess/commit/0152b71)) +- docker images per pr ([b7e1d45](https://github.com/FabInfra/FabAccess/commit/b7e1d45)) +- docker images per pr ([616eb16](https://github.com/FabInfra/FabAccess/commit/616eb16)) +- docker images for main ([ec75146](https://github.com/FabInfra/FabAccess/commit/ec75146)) +- basic plugin system foundation for api, frontend still missing ([d67849b](https://github.com/FabInfra/FabAccess/commit/d67849b)) +- pwa install prompt ([74672ce](https://github.com/FabInfra/FabAccess/commit/74672ce)) +- **docs:** added docsify docs ([dd27e34](https://github.com/FabInfra/FabAccess/commit/dd27e34)) +- **fabreader:** it works ([680c3c1](https://github.com/FabInfra/FabAccess/commit/680c3c1)) +- **fabreader:** card enrollment, reset and auth for machine control works ([e029259](https://github.com/FabInfra/FabAccess/commit/e029259)) +- **plugins:** set plugins dir in docker ([8173d6d](https://github.com/FabInfra/FabAccess/commit/8173d6d)) +- **plugins:** management ui and release ([28c192d](https://github.com/FabInfra/FabAccess/commit/28c192d)) +- **plugins:** management ui and release ([25d24c6](https://github.com/FabInfra/FabAccess/commit/25d24c6)) +- **plugins:** management ui and release ([736a617](https://github.com/FabInfra/FabAccess/commit/736a617)) ### 🩹 Fixes -- enhance resource usage session management and UI updates ([cecdf05](https://github.com/FabInfra/Attraccess/commit/cecdf05)) -- dockerfile now compatible with plugins ([e32c1ea](https://github.com/FabInfra/Attraccess/commit/e32c1ea)) -- shared deps ([c08b795](https://github.com/FabInfra/Attraccess/commit/c08b795)) -- i18n does not like to be federated ([fe46549](https://github.com/FabInfra/Attraccess/commit/fe46549)) -- **SSO:** delete and edit providers ([1351f18](https://github.com/FabInfra/Attraccess/commit/1351f18)) -- **plugins:** module federation now working in production build ([47c9d17](https://github.com/FabInfra/Attraccess/commit/47c9d17)) -- **plugins:** release of fabreader plugin use correct name ([241cdd1](https://github.com/FabInfra/Attraccess/commit/241cdd1)) -- **plugins:** release of fabreader plugin use correct name ([b5e3cdc](https://github.com/FabInfra/Attraccess/commit/b5e3cdc)) -- **plugins:** plugin artifact url ([056a0d9](https://github.com/FabInfra/Attraccess/commit/056a0d9)) -- **plugins:** plugin artifact url ([df1c016](https://github.com/FabInfra/Attraccess/commit/df1c016)) +- enhance resource usage session management and UI updates ([cecdf05](https://github.com/FabInfra/FabAccess/commit/cecdf05)) +- dockerfile now compatible with plugins ([e32c1ea](https://github.com/FabInfra/FabAccess/commit/e32c1ea)) +- shared deps ([c08b795](https://github.com/FabInfra/FabAccess/commit/c08b795)) +- i18n does not like to be federated ([fe46549](https://github.com/FabInfra/FabAccess/commit/fe46549)) +- **SSO:** delete and edit providers ([1351f18](https://github.com/FabInfra/FabAccess/commit/1351f18)) +- **plugins:** module federation now working in production build ([47c9d17](https://github.com/FabInfra/FabAccess/commit/47c9d17)) +- **plugins:** release of fabreader plugin use correct name ([241cdd1](https://github.com/FabInfra/FabAccess/commit/241cdd1)) +- **plugins:** release of fabreader plugin use correct name ([b5e3cdc](https://github.com/FabInfra/FabAccess/commit/b5e3cdc)) +- **plugins:** plugin artifact url ([056a0d9](https://github.com/FabInfra/FabAccess/commit/056a0d9)) +- **plugins:** plugin artifact url ([df1c016](https://github.com/FabInfra/FabAccess/commit/df1c016)) ### ❤️ Thank You @@ -110,35 +110,35 @@ This was a version bump only, there were no code changes. ### 🚀 Features -- create react-query client and refactor frontend to use it ([f814076](https://github.com/FabInfra/Attraccess/commit/f814076)) -- implement resource groups management and UI enhancements ([8e02c3f](https://github.com/FabInfra/Attraccess/commit/8e02c3f)) -- docker images per pr ([38365f4](https://github.com/FabInfra/Attraccess/commit/38365f4)) -- docker images per pr -> comment to pr ([0152b71](https://github.com/FabInfra/Attraccess/commit/0152b71)) -- docker images per pr ([b7e1d45](https://github.com/FabInfra/Attraccess/commit/b7e1d45)) -- docker images per pr ([616eb16](https://github.com/FabInfra/Attraccess/commit/616eb16)) -- docker images for main ([ec75146](https://github.com/FabInfra/Attraccess/commit/ec75146)) -- basic plugin system foundation for api, frontend still missing ([d67849b](https://github.com/FabInfra/Attraccess/commit/d67849b)) -- pwa install prompt ([74672ce](https://github.com/FabInfra/Attraccess/commit/74672ce)) -- **docs:** added docsify docs ([dd27e34](https://github.com/FabInfra/Attraccess/commit/dd27e34)) -- **fabreader:** it works ([680c3c1](https://github.com/FabInfra/Attraccess/commit/680c3c1)) -- **fabreader:** card enrollment, reset and auth for machine control works ([e029259](https://github.com/FabInfra/Attraccess/commit/e029259)) -- **plugins:** set plugins dir in docker ([8173d6d](https://github.com/FabInfra/Attraccess/commit/8173d6d)) -- **plugins:** management ui and release ([28c192d](https://github.com/FabInfra/Attraccess/commit/28c192d)) -- **plugins:** management ui and release ([25d24c6](https://github.com/FabInfra/Attraccess/commit/25d24c6)) -- **plugins:** management ui and release ([736a617](https://github.com/FabInfra/Attraccess/commit/736a617)) +- create react-query client and refactor frontend to use it ([f814076](https://github.com/FabInfra/FabAccess/commit/f814076)) +- implement resource groups management and UI enhancements ([8e02c3f](https://github.com/FabInfra/FabAccess/commit/8e02c3f)) +- docker images per pr ([38365f4](https://github.com/FabInfra/FabAccess/commit/38365f4)) +- docker images per pr -> comment to pr ([0152b71](https://github.com/FabInfra/FabAccess/commit/0152b71)) +- docker images per pr ([b7e1d45](https://github.com/FabInfra/FabAccess/commit/b7e1d45)) +- docker images per pr ([616eb16](https://github.com/FabInfra/FabAccess/commit/616eb16)) +- docker images for main ([ec75146](https://github.com/FabInfra/FabAccess/commit/ec75146)) +- basic plugin system foundation for api, frontend still missing ([d67849b](https://github.com/FabInfra/FabAccess/commit/d67849b)) +- pwa install prompt ([74672ce](https://github.com/FabInfra/FabAccess/commit/74672ce)) +- **docs:** added docsify docs ([dd27e34](https://github.com/FabInfra/FabAccess/commit/dd27e34)) +- **fabreader:** it works ([680c3c1](https://github.com/FabInfra/FabAccess/commit/680c3c1)) +- **fabreader:** card enrollment, reset and auth for machine control works ([e029259](https://github.com/FabInfra/FabAccess/commit/e029259)) +- **plugins:** set plugins dir in docker ([8173d6d](https://github.com/FabInfra/FabAccess/commit/8173d6d)) +- **plugins:** management ui and release ([28c192d](https://github.com/FabInfra/FabAccess/commit/28c192d)) +- **plugins:** management ui and release ([25d24c6](https://github.com/FabInfra/FabAccess/commit/25d24c6)) +- **plugins:** management ui and release ([736a617](https://github.com/FabInfra/FabAccess/commit/736a617)) ### 🩹 Fixes -- enhance resource usage session management and UI updates ([cecdf05](https://github.com/FabInfra/Attraccess/commit/cecdf05)) -- dockerfile now compatible with plugins ([e32c1ea](https://github.com/FabInfra/Attraccess/commit/e32c1ea)) -- shared deps ([c08b795](https://github.com/FabInfra/Attraccess/commit/c08b795)) -- i18n does not like to be federated ([fe46549](https://github.com/FabInfra/Attraccess/commit/fe46549)) -- **SSO:** delete and edit providers ([1351f18](https://github.com/FabInfra/Attraccess/commit/1351f18)) -- **plugins:** module federation now working in production build ([47c9d17](https://github.com/FabInfra/Attraccess/commit/47c9d17)) -- **plugins:** release of fabreader plugin use correct name ([241cdd1](https://github.com/FabInfra/Attraccess/commit/241cdd1)) -- **plugins:** release of fabreader plugin use correct name ([b5e3cdc](https://github.com/FabInfra/Attraccess/commit/b5e3cdc)) -- **plugins:** plugin artifact url ([056a0d9](https://github.com/FabInfra/Attraccess/commit/056a0d9)) -- **plugins:** plugin artifact url ([df1c016](https://github.com/FabInfra/Attraccess/commit/df1c016)) +- enhance resource usage session management and UI updates ([cecdf05](https://github.com/FabInfra/FabAccess/commit/cecdf05)) +- dockerfile now compatible with plugins ([e32c1ea](https://github.com/FabInfra/FabAccess/commit/e32c1ea)) +- shared deps ([c08b795](https://github.com/FabInfra/FabAccess/commit/c08b795)) +- i18n does not like to be federated ([fe46549](https://github.com/FabInfra/FabAccess/commit/fe46549)) +- **SSO:** delete and edit providers ([1351f18](https://github.com/FabInfra/FabAccess/commit/1351f18)) +- **plugins:** module federation now working in production build ([47c9d17](https://github.com/FabInfra/FabAccess/commit/47c9d17)) +- **plugins:** release of fabreader plugin use correct name ([241cdd1](https://github.com/FabInfra/FabAccess/commit/241cdd1)) +- **plugins:** release of fabreader plugin use correct name ([b5e3cdc](https://github.com/FabInfra/FabAccess/commit/b5e3cdc)) +- **plugins:** plugin artifact url ([056a0d9](https://github.com/FabInfra/FabAccess/commit/056a0d9)) +- **plugins:** plugin artifact url ([df1c016](https://github.com/FabInfra/FabAccess/commit/df1c016)) ### ❤️ Thank You diff --git a/README.md b/README.md index 69a1f686..781411ea 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Attraccess +# FabAccess A comprehensive resource management system for tracking and managing access to shared resources. @@ -13,7 +13,7 @@ A comprehensive resource management system for tracking and managing access to s ## ESPHome Integration -Attraccess provides [ESPHome components](https://github.com/FabInfra/Attraccess-esphome-components) for easily integrating IoT devices with your access control system: +FabAccess provides [ESPHome components](https://github.com/FabInfra/FabAccess-esphome-components) for easily integrating IoT devices with your access control system: - Real-time resource status monitoring via Server-Sent Events (SSE) - No polling required - uses persistent connections for efficient updates @@ -22,17 +22,17 @@ Attraccess provides [ESPHome components](https://github.com/FabInfra/Attraccess- - Enables automation based on resource status (availability, usage, etc.) - Provides both sensors and binary sensors for monitoring -To integrate your IoT devices with Attraccess, add this to your ESPHome configuration: +To integrate your IoT devices with FabAccess, add this to your ESPHome configuration: ```yaml external_components: - source: type: git - url: https://github.com/FabInfra/Attraccess-esphome-components.git - components: [attraccess_resource] + url: https://github.com/FabInfra/FabAccess-esphome-components.git + components: [fabaccess_resource] ``` -See the [Attraccess ESPHome Components repository](https://github.com/FabInfra/Attraccess-esphome-components) for detailed documentation and examples. +See the [FabAccess ESPHome Components repository](https://github.com/FabInfra/FabAccess-esphome-components) for detailed documentation and examples. ## Image Support diff --git a/apps/api/package.json b/apps/api/package.json index f847092b..c3ceaa07 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -1,5 +1,5 @@ { - "name": "@attraccess/api", + "name": "@fabaccess/api", "dependencies": { "@nestjs-modules/mailer": "^2.0.2", "@nestjs/common": "^11.1.0", diff --git a/apps/api/project.json b/apps/api/project.json index 2aa96c23..4eda7284 100644 --- a/apps/api/project.json +++ b/apps/api/project.json @@ -65,7 +65,7 @@ "cache": true, "outputs": ["{workspaceRoot}/dist/apps/{projectName}-swagger/swagger.json"], "options": { - "command": "AUTH_SESSION_SECRET=super-secret VITE_ATTRACCESS_URL=http://localhost:3000 AUTH_JWT_ORIGIN=ENV AUTH_JWT_SECRET=swagger-export-dummy-jwt-secret123 SMTP_SERVICE=SMTP SMTP_HOST=not-a-host SMTP_PORT=1234 SMTP_FROM=mail@attraccess.org FRONTEND_URL=http://localhost:4200 node dist/apps/api-swagger/main.js" + "command": "AUTH_SESSION_SECRET=super-secret VITE_ATTRACCESS_URL=http://localhost:3000 AUTH_JWT_ORIGIN=ENV AUTH_JWT_SECRET=swagger-export-dummy-jwt-secret123 SMTP_SERVICE=SMTP SMTP_HOST=not-a-host SMTP_PORT=1234 SMTP_FROM=mail@fabaccess.org FRONTEND_URL=http://localhost:4200 node dist/apps/api-swagger/main.js" } }, "test": { diff --git a/apps/api/src/__test__/test-setup.ts b/apps/api/src/__test__/test-setup.ts index 78659c8b..ad5a88b7 100644 --- a/apps/api/src/__test__/test-setup.ts +++ b/apps/api/src/__test__/test-setup.ts @@ -1,7 +1,7 @@ import { INestApplication } from '@nestjs/common'; import { bootstrap } from '../main.bootstrap'; import request from 'supertest'; -import { AuthenticationType, User } from '@attraccess/database-entities'; +import { AuthenticationType, User } from '@fabaccess/database-entities'; import { UsersService } from '../users-and-auth/users/users.service'; import { AuthService } from '../users-and-auth/auth/auth.service'; import { nanoid } from 'nanoid'; @@ -52,7 +52,7 @@ export class TestSetup { async createUser(username: string, permissions?: User['systemPermissions']) { let user = await TestSetup.usersService.createOne({ username: `${username}-${this.testInstanceIdentifier}`, - email: `${username}-${this.testInstanceIdentifier}@attraccess.org`, + email: `${username}-${this.testInstanceIdentifier}@fabaccess.org`, externalIdentifier: null, }); diff --git a/apps/api/src/analytics/analytics.controller.ts b/apps/api/src/analytics/analytics.controller.ts index f6d12d7f..6e559ed6 100644 --- a/apps/api/src/analytics/analytics.controller.ts +++ b/apps/api/src/analytics/analytics.controller.ts @@ -1,7 +1,7 @@ import { Controller, Get, Query } from '@nestjs/common'; import { DateRangeValue } from './dtos/dateRangeValue'; import { AnalyticsService } from './analytics.service'; -import { Auth, ResourceUsage } from '@attraccess/plugins-backend-sdk'; +import { Auth, ResourceUsage } from '@fabaccess/plugins-backend-sdk'; import { ApiResponse, ApiTags } from '@nestjs/swagger'; @ApiTags('Analytics') diff --git a/apps/api/src/analytics/analytics.module.ts b/apps/api/src/analytics/analytics.module.ts index 7cb15734..2230e9a6 100644 --- a/apps/api/src/analytics/analytics.module.ts +++ b/apps/api/src/analytics/analytics.module.ts @@ -2,7 +2,7 @@ import { Module } from '@nestjs/common'; import { AnalyticsController } from './analytics.controller'; import { AnalyticsService } from './analytics.service'; import { TypeOrmModule } from '@nestjs/typeorm'; -import { ResourceUsage } from '@attraccess/database-entities'; +import { ResourceUsage } from '@fabaccess/database-entities'; @Module({ imports: [TypeOrmModule.forFeature([ResourceUsage])], diff --git a/apps/api/src/analytics/analytics.service.spec.ts b/apps/api/src/analytics/analytics.service.spec.ts index df24bf5d..4b950d8b 100644 --- a/apps/api/src/analytics/analytics.service.spec.ts +++ b/apps/api/src/analytics/analytics.service.spec.ts @@ -1,7 +1,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { AnalyticsService } from './analytics.service'; import { getRepositoryToken } from '@nestjs/typeorm'; -import { ResourceUsage } from '@attraccess/database-entities'; +import { ResourceUsage } from '@fabaccess/database-entities'; import { Between, Repository } from 'typeorm'; import { DateRangeValue } from './dtos/dateRangeValue'; diff --git a/apps/api/src/analytics/analytics.service.ts b/apps/api/src/analytics/analytics.service.ts index 4f2dac32..1625b2e0 100644 --- a/apps/api/src/analytics/analytics.service.ts +++ b/apps/api/src/analytics/analytics.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { DateRangeValue } from './dtos/dateRangeValue'; -import { ResourceUsage } from '@attraccess/database-entities'; +import { ResourceUsage } from '@fabaccess/database-entities'; import { InjectRepository } from '@nestjs/typeorm'; import { Between, FindManyOptions, Repository } from 'typeorm'; diff --git a/apps/api/src/app/app.controller.spec.ts b/apps/api/src/app/app.controller.spec.ts index d83881ca..b7c1e045 100644 --- a/apps/api/src/app/app.controller.spec.ts +++ b/apps/api/src/app/app.controller.spec.ts @@ -15,7 +15,7 @@ describe('AppController', () => { describe('/info', () => { it('should return api information', () => { const appController = app.get(AppController); - expect(appController.getInfo()).toEqual({ name: 'Attraccess API', status: 'ok' }); + expect(appController.getInfo()).toEqual({ name: 'FabAccess API', status: 'ok' }); }); }); }); diff --git a/apps/api/src/app/app.controller.ts b/apps/api/src/app/app.controller.ts index c7999b9a..0796666b 100644 --- a/apps/api/src/app/app.controller.ts +++ b/apps/api/src/app/app.controller.ts @@ -15,7 +15,7 @@ export class AppController { schema: { type: 'object', properties: { - name: { type: 'string', example: 'Attraccess API' }, + name: { type: 'string', example: 'FabAccess API' }, status: { type: 'string', example: 'ok' }, }, }, diff --git a/apps/api/src/app/app.service.spec.ts b/apps/api/src/app/app.service.spec.ts index 91698932..6bc7fc05 100644 --- a/apps/api/src/app/app.service.spec.ts +++ b/apps/api/src/app/app.service.spec.ts @@ -14,7 +14,7 @@ describe('AppService', () => { describe('getInfo', () => { it('should return api information', () => { - expect(service.getInfo()).toEqual({ name: 'Attraccess API', status: 'ok' }); + expect(service.getInfo()).toEqual({ name: 'FabAccess API', status: 'ok' }); }); }); }); diff --git a/apps/api/src/app/app.service.ts b/apps/api/src/app/app.service.ts index b05035bf..e95674bd 100644 --- a/apps/api/src/app/app.service.ts +++ b/apps/api/src/app/app.service.ts @@ -3,6 +3,6 @@ import { Injectable } from '@nestjs/common'; @Injectable() export class AppService { getInfo(): { name: string; status: string } { - return { name: 'Attraccess API', status: 'ok' }; + return { name: 'FabAccess API', status: 'ok' }; } } diff --git a/apps/api/src/database/datasource.ts b/apps/api/src/database/datasource.ts index ed70d0c3..7b3b9e1c 100644 --- a/apps/api/src/database/datasource.ts +++ b/apps/api/src/database/datasource.ts @@ -1,10 +1,11 @@ // typeorm.config.ts import { DataSource, DataSourceOptions } from 'typeorm'; -import { loadEnv } from '@attraccess/env'; +import { loadEnv } from '@fabaccess/env'; import { join, resolve } from 'path'; -import { entities } from '@attraccess/database-entities'; +import { entities } from '@fabaccess/database-entities'; import * as migrations from './migrations'; +import { existsSync } from 'fs'; const envType = loadEnv((z) => ({ DB_TYPE: z.enum(['postgres', 'sqlite']).default('sqlite'), @@ -44,7 +45,13 @@ function loadPostgresConfig() { function loadSqliteConfig() { const storageEnv = loadEnv((z) => ({ STORAGE_ROOT: z.string().default(join(process.cwd(), 'storage')) })); - const dbFile = resolve(join(storageEnv.STORAGE_ROOT, 'attraccess.sqlite')); + const fabaccessDbFile = resolve(join(storageEnv.STORAGE_ROOT, 'attraccess.sqlite')); + const attraccessDbFile = resolve(join(storageEnv.STORAGE_ROOT, 'attraccess.sqlite')); + + let dbFile = fabaccessDbFile; + if (existsSync(attraccessDbFile)) { + dbFile = attraccessDbFile; + } console.log('dbFile', dbFile); diff --git a/apps/api/src/database/migrations/1748886859855-seed-email-templates.ts b/apps/api/src/database/migrations/1748886859855-seed-email-templates.ts index f664958e..6c41f02f 100644 --- a/apps/api/src/database/migrations/1748886859855-seed-email-templates.ts +++ b/apps/api/src/database/migrations/1748886859855-seed-email-templates.ts @@ -30,7 +30,7 @@ export const RESET_PASSWORD_MJML_TEMPLATE = ` - Attraccess + FabAccess @@ -87,7 +87,7 @@ export const RESET_PASSWORD_MJML_TEMPLATE = ` Visit us: {{host.frontend}} | - GitHub + GitHub @@ -95,7 +95,7 @@ export const RESET_PASSWORD_MJML_TEMPLATE = ` `; -// /workspace/Attraccess/apps/api/src/email/templates/verify-email.template.ts +// /workspace/FabAccess/apps/api/src/email/templates/verify-email.template.ts export const VERIFY_EMAIL_MJML_TEMPLATE = ` @@ -126,7 +126,7 @@ export const VERIFY_EMAIL_MJML_TEMPLATE = ` - Attraccess + FabAccess @@ -183,7 +183,7 @@ export const VERIFY_EMAIL_MJML_TEMPLATE = ` Visit us: {{host.frontend}} | - GitHub + GitHub diff --git a/apps/api/src/email-template/email-template.controller.ts b/apps/api/src/email-template/email-template.controller.ts index 6a6d49d9..a4adee4d 100644 --- a/apps/api/src/email-template/email-template.controller.ts +++ b/apps/api/src/email-template/email-template.controller.ts @@ -1,7 +1,7 @@ import { Controller, Get, Post, Body, Patch, Param } from '@nestjs/common'; import { ApiTags, ApiBearerAuth, ApiOperation, ApiResponse, ApiBody, ApiParam } from '@nestjs/swagger'; -import { Auth } from '@attraccess/plugins-backend-sdk'; -import { SystemPermission, EmailTemplate, EmailTemplateType } from '@attraccess/database-entities'; +import { Auth } from '@fabaccess/plugins-backend-sdk'; +import { SystemPermission, EmailTemplate, EmailTemplateType } from '@fabaccess/database-entities'; import { EmailTemplateService } from './email-template.service'; import { MjmlService } from './mjml.service'; import { UpdateEmailTemplateDto } from './dto/update-email-template.dto'; diff --git a/apps/api/src/email-template/email-template.module.ts b/apps/api/src/email-template/email-template.module.ts index 4b30d245..e492fc71 100644 --- a/apps/api/src/email-template/email-template.module.ts +++ b/apps/api/src/email-template/email-template.module.ts @@ -1,6 +1,6 @@ import { Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; -import { EmailTemplate } from '@attraccess/database-entities'; +import { EmailTemplate } from '@fabaccess/database-entities'; import { EmailTemplateService } from './email-template.service'; import { EmailTemplateController } from './email-template.controller'; import { MjmlService } from './mjml.service'; diff --git a/apps/api/src/email-template/email-template.service.ts b/apps/api/src/email-template/email-template.service.ts index e760d19b..6790d845 100644 --- a/apps/api/src/email-template/email-template.service.ts +++ b/apps/api/src/email-template/email-template.service.ts @@ -1,6 +1,6 @@ import { Injectable, NotFoundException } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; -import { EmailTemplate, EmailTemplateType } from '@attraccess/database-entities'; +import { EmailTemplate, EmailTemplateType } from '@fabaccess/database-entities'; import { Repository } from 'typeorm'; import { UpdateEmailTemplateDto } from './dto/update-email-template.dto'; import { MjmlService } from './mjml.service'; diff --git a/apps/api/src/email/email.service.ts b/apps/api/src/email/email.service.ts index c12efb8c..fcd06b39 100644 --- a/apps/api/src/email/email.service.ts +++ b/apps/api/src/email/email.service.ts @@ -2,7 +2,7 @@ import { Injectable, Logger } from '@nestjs/common'; import { EmailTemplateService } from '../email-template/email-template.service'; import { MailerService } from '@nestjs-modules/mailer'; import { ConfigService } from '@nestjs/config'; -import { User, EmailTemplateType, EmailTemplate } from '@attraccess/database-entities'; +import { User, EmailTemplateType, EmailTemplate } from '@fabaccess/database-entities'; import * as Handlebars from 'handlebars'; import { MjmlService } from '../email-template/mjml.service'; import { AppConfigType } from '../config/app.config'; diff --git a/apps/api/src/fabreader/card.controller.ts b/apps/api/src/fabreader/card.controller.ts index eba8b917..2d0d75ff 100644 --- a/apps/api/src/fabreader/card.controller.ts +++ b/apps/api/src/fabreader/card.controller.ts @@ -1,6 +1,6 @@ import { Controller, Get, Inject, Post, Req, Body } from '@nestjs/common'; import { FabreaderGateway } from './modules/websockets/websocket.gateway'; -import { Auth, AuthenticatedRequest, NFCCard } from '@attraccess/plugins-backend-sdk'; +import { Auth, AuthenticatedRequest, NFCCard } from '@fabaccess/plugins-backend-sdk'; import { ApiOperation, ApiResponse, ApiTags, ApiBody } from '@nestjs/swagger'; import { FabreaderService } from './fabreader.service'; import { AppKeyRequestDto } from './dtos/app-key-request.dto'; diff --git a/apps/api/src/fabreader/dtos/update-reader-response.dto.ts b/apps/api/src/fabreader/dtos/update-reader-response.dto.ts index ae273ed8..1c47cfd7 100644 --- a/apps/api/src/fabreader/dtos/update-reader-response.dto.ts +++ b/apps/api/src/fabreader/dtos/update-reader-response.dto.ts @@ -1,5 +1,5 @@ import { ApiProperty } from '@nestjs/swagger'; -import { FabReader } from '@attraccess/plugins-backend-sdk'; +import { FabReader } from '@fabaccess/plugins-backend-sdk'; export class UpdateReaderResponseDto { @ApiProperty({ diff --git a/apps/api/src/fabreader/events.ts b/apps/api/src/fabreader/events.ts index bb769ced..ded62144 100644 --- a/apps/api/src/fabreader/events.ts +++ b/apps/api/src/fabreader/events.ts @@ -1,4 +1,4 @@ -import { FabReader } from '@attraccess/database-entities'; +import { FabReader } from '@fabaccess/database-entities'; export class ReaderUpdatedEvent { constructor(public readonly reader: FabReader) {} diff --git a/apps/api/src/fabreader/fabreader.module.ts b/apps/api/src/fabreader/fabreader.module.ts index 0288d758..fca07254 100644 --- a/apps/api/src/fabreader/fabreader.module.ts +++ b/apps/api/src/fabreader/fabreader.module.ts @@ -9,7 +9,7 @@ import 'sqlite3'; import '@nestjs/common'; import { WebSocketEventService } from './modules/websockets/websocket-event.service'; import { EventEmitterModule } from '@nestjs/event-emitter'; -import { FabReader, NFCCard } from '@attraccess/database-entities'; +import { FabReader, NFCCard } from '@fabaccess/database-entities'; import { UsersAndAuthModule } from '../users-and-auth/users-and-auth.module'; import { ResourcesModule } from '../resources/resources.module'; import { ResourceUsageModule } from '../resources/usage/resourceUsage.module'; diff --git a/apps/api/src/fabreader/fabreader.service.ts b/apps/api/src/fabreader/fabreader.service.ts index 376acfc6..30c90bf4 100644 --- a/apps/api/src/fabreader/fabreader.service.ts +++ b/apps/api/src/fabreader/fabreader.service.ts @@ -1,6 +1,6 @@ import { Inject, Injectable, Logger } from '@nestjs/common'; import { subtle } from 'crypto'; -import { NFCCard, FabReader } from '@attraccess/database-entities'; +import { NFCCard, FabReader } from '@fabaccess/database-entities'; import { DeleteResult, FindManyOptions, Repository } from 'typeorm'; import { InjectRepository } from '@nestjs/typeorm'; import { nanoid } from 'nanoid'; diff --git a/apps/api/src/fabreader/modules/websockets/reader-states/enroll-ntag424.state.ts b/apps/api/src/fabreader/modules/websockets/reader-states/enroll-ntag424.state.ts index 6c36217f..8bd8e7e2 100644 --- a/apps/api/src/fabreader/modules/websockets/reader-states/enroll-ntag424.state.ts +++ b/apps/api/src/fabreader/modules/websockets/reader-states/enroll-ntag424.state.ts @@ -1,7 +1,7 @@ import { Logger } from '@nestjs/common'; import { ReaderState } from './reader-state.interface'; import { InitialReaderState } from './initial.state'; -import { User } from '@attraccess/plugins-backend-sdk'; +import { User } from '@fabaccess/plugins-backend-sdk'; import { AuthenticatedWebSocket, FabreaderEvent, FabreaderEventType, FabreaderResponse } from '../websocket.types'; import { GatewayServices } from '../websocket.gateway'; diff --git a/apps/api/src/fabreader/modules/websockets/reader-states/reset-ntag424.state.ts b/apps/api/src/fabreader/modules/websockets/reader-states/reset-ntag424.state.ts index 439c97c3..c2c29c45 100644 --- a/apps/api/src/fabreader/modules/websockets/reader-states/reset-ntag424.state.ts +++ b/apps/api/src/fabreader/modules/websockets/reader-states/reset-ntag424.state.ts @@ -3,7 +3,7 @@ import { ReaderState } from './reader-state.interface'; import { InitialReaderState } from './initial.state'; import { AuthenticatedWebSocket, FabreaderEvent, FabreaderEventType, FabreaderResponse } from '../websocket.types'; import { GatewayServices } from '../websocket.gateway'; -import { NFCCard } from '@attraccess/database-entities'; +import { NFCCard } from '@fabaccess/database-entities'; export class ResetNTAG424State implements ReaderState { private readonly logger = new Logger(ResetNTAG424State.name); diff --git a/apps/api/src/fabreader/modules/websockets/reader-states/wait-for-nfc-tap.state.ts b/apps/api/src/fabreader/modules/websockets/reader-states/wait-for-nfc-tap.state.ts index e6b4a5f5..32a69909 100644 --- a/apps/api/src/fabreader/modules/websockets/reader-states/wait-for-nfc-tap.state.ts +++ b/apps/api/src/fabreader/modules/websockets/reader-states/wait-for-nfc-tap.state.ts @@ -3,7 +3,7 @@ import { GatewayServices } from '../websocket.gateway'; import { AuthenticatedWebSocket, FabreaderEventType, FabreaderResponse } from '../websocket.types'; import { FabreaderEvent } from '../websocket.types'; import { ReaderState } from './reader-state.interface'; -import { NFCCard } from '@attraccess/database-entities'; +import { NFCCard } from '@fabaccess/database-entities'; export class WaitForNFCTapState implements ReaderState { private readonly logger = new Logger(WaitForNFCTapState.name); diff --git a/apps/api/src/fabreader/modules/websockets/reader-states/wait-for-resource-selection.state.ts b/apps/api/src/fabreader/modules/websockets/reader-states/wait-for-resource-selection.state.ts index 684ddf0d..83bc2b80 100644 --- a/apps/api/src/fabreader/modules/websockets/reader-states/wait-for-resource-selection.state.ts +++ b/apps/api/src/fabreader/modules/websockets/reader-states/wait-for-resource-selection.state.ts @@ -3,7 +3,7 @@ import { AuthenticatedWebSocket, FabreaderEvent, FabreaderEventType } from '../w import { ReaderState } from './reader-state.interface'; import { WaitForNFCTapState } from './wait-for-nfc-tap.state'; import { GatewayServices } from '../websocket.gateway'; -import { Resource } from '@attraccess/plugins-backend-sdk'; +import { Resource } from '@fabaccess/plugins-backend-sdk'; export class WaitForResourceSelectionState implements ReaderState { private readonly logger = new Logger(WaitForResourceSelectionState.name); diff --git a/apps/api/src/fabreader/modules/websockets/websocket.types.ts b/apps/api/src/fabreader/modules/websockets/websocket.types.ts index 2b1e21e8..d65eacc1 100644 --- a/apps/api/src/fabreader/modules/websockets/websocket.types.ts +++ b/apps/api/src/fabreader/modules/websockets/websocket.types.ts @@ -1,4 +1,4 @@ -import { FabReader } from '@attraccess/database-entities'; +import { FabReader } from '@fabaccess/database-entities'; import { ReaderState } from './reader-states/reader-state.interface'; interface FabreaderMessageBaseData { diff --git a/apps/api/src/fabreader/reader.controller.ts b/apps/api/src/fabreader/reader.controller.ts index 5fd99695..58ffdf8c 100644 --- a/apps/api/src/fabreader/reader.controller.ts +++ b/apps/api/src/fabreader/reader.controller.ts @@ -14,7 +14,7 @@ import { UseInterceptors, } from '@nestjs/common'; import { FabreaderGateway } from './modules/websockets/websocket.gateway'; -import { AuthenticatedRequest, Auth, FabReader } from '@attraccess/plugins-backend-sdk'; +import { AuthenticatedRequest, Auth, FabReader } from '@fabaccess/plugins-backend-sdk'; import { ApiOperation, ApiResponse, ApiParam, ApiTags, ApiBody } from '@nestjs/swagger'; import { WebsocketService } from './modules/websockets/websocket.service'; import { FabreaderService } from './fabreader.service'; diff --git a/apps/api/src/main.bootstrap.ts b/apps/api/src/main.bootstrap.ts index f99dfb05..a180f028 100644 --- a/apps/api/src/main.bootstrap.ts +++ b/apps/api/src/main.bootstrap.ts @@ -19,7 +19,7 @@ import { StorageConfigType } from './config/storage.config'; async function generateSelfSignedCertificates(storageDir: string, domain: string) { const ca = await createCA({ - organization: 'Attraccess', + organization: 'FabAccess', countryCode: 'DE', state: 'Hamburg', locality: 'Hamburg', @@ -164,8 +164,8 @@ export async function bootstrap() { app.useGlobalInterceptors(new ClassSerializerInterceptor(app.get('Reflector'))); const config = new DocumentBuilder() - .setTitle('Attraccess API') - .setDescription('The Attraccess API used to manage machine and tool access in a Makerspace or FabLab') + .setTitle('FabAccess API') + .setDescription('The FabAccess API used to manage machine and tool access in a Makerspace or FabLab') .setVersion(appConfig.VERSION) .addBearerAuth() .addApiKey({ diff --git a/apps/api/src/mqtt/mqtt-client.service.spec.ts b/apps/api/src/mqtt/mqtt-client.service.spec.ts index c3071a5f..f542b3f4 100644 --- a/apps/api/src/mqtt/mqtt-client.service.spec.ts +++ b/apps/api/src/mqtt/mqtt-client.service.spec.ts @@ -1,7 +1,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { getRepositoryToken } from '@nestjs/typeorm'; import { MqttClientService } from './mqtt-client.service'; -import { MqttServer } from '@attraccess/database-entities'; +import { MqttServer } from '@fabaccess/database-entities'; import { Repository } from 'typeorm'; import * as mqtt from 'mqtt'; import { Logger } from '@nestjs/common'; @@ -101,12 +101,7 @@ describe('MqttClientService', () => { jest.spyOn(Logger.prototype, 'warn').mockImplementation(jest.fn()); // Mock the getOrCreateClient method to avoid actual connection attempts - jest - .spyOn( - service as unknown as MqttClientServicePrivate, - 'getOrCreateClient' - ) - .mockResolvedValue(mqtt.connect({})); + jest.spyOn(service as unknown as MqttClientServicePrivate, 'getOrCreateClient').mockResolvedValue(mqtt.connect({})); }); afterEach(() => { @@ -120,10 +115,7 @@ describe('MqttClientService', () => { describe('publish', () => { it('should successfully publish a message', async () => { // Arrange - mock the internal methods to avoid actual connections - const getOrCreateClientSpy = jest.spyOn( - service as unknown as MqttClientServicePrivate, - 'getOrCreateClient' - ); + const getOrCreateClientSpy = jest.spyOn(service as unknown as MqttClientServicePrivate, 'getOrCreateClient'); const mockClient = mqtt.connect({}); getOrCreateClientSpy.mockResolvedValue(mockClient); @@ -142,36 +134,26 @@ describe('MqttClientService', () => { it('should throw an error if publishing fails', async () => { // Arrange - mock the client to throw an error on publish - const getOrCreateClientSpy = jest.spyOn( - service as unknown as MqttClientServicePrivate, - 'getOrCreateClient' - ); + const getOrCreateClientSpy = jest.spyOn(service as unknown as MqttClientServicePrivate, 'getOrCreateClient'); const mockClient = mqtt.connect({}); getOrCreateClientSpy.mockResolvedValue(mockClient); // Make publish callback throw an error - mockClient.publish = jest - .fn() - .mockImplementation((topic, message, callback) => { - if (typeof callback === 'function') { - callback(new Error('Publish error')); - } - }); + mockClient.publish = jest.fn().mockImplementation((topic, message, callback) => { + if (typeof callback === 'function') { + callback(new Error('Publish error')); + } + }); // Act & Assert - await expect( - service.publish(1, 'test/topic', 'test message') - ).rejects.toThrow('Publish error'); + await expect(service.publish(1, 'test/topic', 'test message')).rejects.toThrow('Publish error'); }); }); describe('testConnection', () => { it('should return success if connection is successful', async () => { // Arrange - mock the internal methods - const getOrCreateClientSpy = jest.spyOn( - service as unknown as MqttClientServicePrivate, - 'getOrCreateClient' - ); + const getOrCreateClientSpy = jest.spyOn(service as unknown as MqttClientServicePrivate, 'getOrCreateClient'); const mockClient = mqtt.connect({}); getOrCreateClientSpy.mockResolvedValue(mockClient); @@ -195,10 +177,7 @@ describe('MqttClientService', () => { it('should disconnect all clients', async () => { // Arrange - mock the clients map to have a client const mockClient = mqtt.connect({}); - (service as unknown as MqttClientServicePrivate).clients.set( - 1, - mockClient - ); + (service as unknown as MqttClientServicePrivate).clients.set(1, mockClient); // Act await service.onModuleDestroy(); diff --git a/apps/api/src/mqtt/mqtt-client.service.ts b/apps/api/src/mqtt/mqtt-client.service.ts index 2085e1e5..552a90f3 100644 --- a/apps/api/src/mqtt/mqtt-client.service.ts +++ b/apps/api/src/mqtt/mqtt-client.service.ts @@ -1,19 +1,11 @@ -import { - Injectable, - OnModuleInit, - OnModuleDestroy, - Logger, -} from '@nestjs/common'; +import { Injectable, OnModuleInit, OnModuleDestroy, Logger } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; -import { MqttServer } from '@attraccess/database-entities'; +import { MqttServer } from '@fabaccess/database-entities'; import * as mqtt from 'mqtt'; import { MqttClient } from 'mqtt'; import { MqttMonitoringService } from './mqtt-monitoring.service'; -import { - TestConnectionResponseDto, - MqttServerStatusDto, -} from './servers/dtos/mqtt-server.dto'; +import { TestConnectionResponseDto, MqttServerStatusDto } from './servers/dtos/mqtt-server.dto'; @Injectable() export class MqttClientService implements OnModuleInit, OnModuleDestroy { @@ -85,14 +77,10 @@ export class MqttClientService implements OnModuleInit, OnModuleDestroy { this.monitoringService.onConnectAttempt(serverId); return new Promise((resolve, reject) => { - const url = `${server.useTls ? 'mqtts' : 'mqtt'}://${server.host}:${ - server.port - }`; + const url = `${server.useTls ? 'mqtts' : 'mqtt'}://${server.host}:${server.port}`; const options: mqtt.IClientOptions = { - clientId: - server.clientId || - `attraccess-api-${Math.random().toString(16).slice(2, 10)}`, + clientId: server.clientId || `fabaccess-api-${Math.random().toString(16).slice(2, 10)}`, clean: true, reconnectPeriod: 5000, }; @@ -114,9 +102,7 @@ export class MqttClientService implements OnModuleInit, OnModuleDestroy { }); client.on('error', (error) => { - this.logger.error( - `MQTT connection error for server ${server.name}: ${error.message}` - ); + this.logger.error(`MQTT connection error for server ${server.name}: ${error.message}`); this.monitoringService.onConnectFailure(serverId, error.message); // Don't reject as the client will try to reconnect }); @@ -153,19 +139,13 @@ export class MqttClientService implements OnModuleInit, OnModuleDestroy { }); } - async publish( - serverId: number, - topic: string, - message: string - ): Promise { + async publish(serverId: number, topic: string, message: string): Promise { try { const client = await this.getOrCreateClient(serverId); return new Promise((resolve, reject) => { client.publish(topic, message, (error) => { if (error) { - this.logger.error( - `Failed to publish to topic ${topic}: ${error.message}` - ); + this.logger.error(`Failed to publish to topic ${topic}: ${error.message}`); this.monitoringService.onPublishFailure(serverId, error.message); reject(error); } else { @@ -186,8 +166,7 @@ export class MqttClientService implements OnModuleInit, OnModuleDestroy { async testConnection(serverId: number): Promise { try { await this.getOrCreateClient(serverId); - const healthStatus = - this.monitoringService.getConnectionHealthStatus(serverId); + const healthStatus = this.monitoringService.getConnectionHealthStatus(serverId); return { success: true, message: `Connection successful. ${healthStatus.details}`, @@ -195,9 +174,7 @@ export class MqttClientService implements OnModuleInit, OnModuleDestroy { } catch (error) { return { success: false, - message: `Connection failed: ${ - error instanceof Error ? error.message : String(error) - }`, + message: `Connection failed: ${error instanceof Error ? error.message : String(error)}`, }; } } @@ -205,8 +182,7 @@ export class MqttClientService implements OnModuleInit, OnModuleDestroy { async getStatusOfOne(serverId: number): Promise { const client = this.clients.get(serverId); const connected = client?.connected || false; - const healthStatus = - this.monitoringService.getConnectionHealthStatus(serverId); + const healthStatus = this.monitoringService.getConnectionHealthStatus(serverId); return { connected, diff --git a/apps/api/src/mqtt/mqtt.module.ts b/apps/api/src/mqtt/mqtt.module.ts index 5ef27364..6e0dc248 100644 --- a/apps/api/src/mqtt/mqtt.module.ts +++ b/apps/api/src/mqtt/mqtt.module.ts @@ -1,6 +1,6 @@ import { Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; -import { MqttServer, MqttResourceConfig } from '@attraccess/database-entities'; +import { MqttServer, MqttResourceConfig } from '@fabaccess/database-entities'; import { MqttServerController } from './servers/mqtt-server.controller'; import { MqttServerService } from './servers/mqtt-server.service'; import { MqttClientService } from './mqtt-client.service'; @@ -8,10 +8,7 @@ import { MqttMonitoringService } from './mqtt-monitoring.service'; import { ConfigModule } from '@nestjs/config'; @Module({ - imports: [ - TypeOrmModule.forFeature([MqttServer, MqttResourceConfig]), - ConfigModule, - ], + imports: [TypeOrmModule.forFeature([MqttServer, MqttResourceConfig]), ConfigModule], controllers: [MqttServerController], providers: [MqttServerService, MqttClientService, MqttMonitoringService], exports: [MqttClientService, MqttMonitoringService], diff --git a/apps/api/src/mqtt/servers/mqtt-server.controller.ts b/apps/api/src/mqtt/servers/mqtt-server.controller.ts index b87c3e6b..cf445b9b 100644 --- a/apps/api/src/mqtt/servers/mqtt-server.controller.ts +++ b/apps/api/src/mqtt/servers/mqtt-server.controller.ts @@ -1,6 +1,6 @@ import { Controller, Get, Post, Put, Delete, Body, Param, ParseIntPipe } from '@nestjs/common'; import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger'; -import { MqttServer } from '@attraccess/database-entities'; +import { MqttServer } from '@fabaccess/database-entities'; import { MqttServerService } from './mqtt-server.service'; import { CreateMqttServerDto, @@ -9,7 +9,7 @@ import { MqttServerStatusDto, AllMqttServerStatusesDto, } from './dtos/mqtt-server.dto'; -import { Auth } from '@attraccess/plugins-backend-sdk'; +import { Auth } from '@fabaccess/plugins-backend-sdk'; import { MqttClientService } from '../mqtt-client.service'; @ApiTags('MQTT') diff --git a/apps/api/src/mqtt/servers/mqtt-server.service.ts b/apps/api/src/mqtt/servers/mqtt-server.service.ts index 3309161a..48962937 100644 --- a/apps/api/src/mqtt/servers/mqtt-server.service.ts +++ b/apps/api/src/mqtt/servers/mqtt-server.service.ts @@ -1,11 +1,8 @@ import { Injectable, NotFoundException } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; -import { MqttServer } from '@attraccess/database-entities'; -import { - CreateMqttServerDto, - UpdateMqttServerDto, -} from './dtos/mqtt-server.dto'; +import { MqttServer } from '@fabaccess/database-entities'; +import { CreateMqttServerDto, UpdateMqttServerDto } from './dtos/mqtt-server.dto'; @Injectable() export class MqttServerService { @@ -48,10 +45,7 @@ export class MqttServerService { /** * Update an existing MQTT server */ - async update( - id: number, - updateMqttServerDto: UpdateMqttServerDto - ): Promise { + async update(id: number, updateMqttServerDto: UpdateMqttServerDto): Promise { const server = await this.findOne(id); // Update the server with the new values diff --git a/apps/api/src/plugin-system/plugin.controller.ts b/apps/api/src/plugin-system/plugin.controller.ts index f351cc25..707bd44a 100644 --- a/apps/api/src/plugin-system/plugin.controller.ts +++ b/apps/api/src/plugin-system/plugin.controller.ts @@ -18,7 +18,7 @@ import { LoadedPluginManifest } from './plugin.manifest'; import { join } from 'path'; import { FileInterceptor } from '@nestjs/platform-express'; import { FileUpload } from '../common/types/file-upload.types'; -import { Auth } from '@attraccess/plugins-backend-sdk'; +import { Auth } from '@fabaccess/plugins-backend-sdk'; import { UploadPluginDto } from './dto/uploadPlugin.dto'; @ApiTags('Plugins') diff --git a/apps/api/src/plugin-system/plugin.manifest.ts b/apps/api/src/plugin-system/plugin.manifest.ts index aca9c301..a71f6e7b 100644 --- a/apps/api/src/plugin-system/plugin.manifest.ts +++ b/apps/api/src/plugin-system/plugin.manifest.ts @@ -49,7 +49,7 @@ export class PluginMain { backend?: PluginMainBackend; } -export class PluginAttraccessVersion { +export class PluginFabAccessVersion { @ApiProperty({ description: 'The minimum version of the plugin', example: '1.0.0', @@ -88,9 +88,9 @@ export class PluginManifest { version: string; @ApiProperty({ - type: PluginAttraccessVersion, + type: PluginFabAccessVersion, }) - attraccessVersion: PluginAttraccessVersion; + fabaccessVersion: PluginFabAccessVersion; } export class LoadedPluginManifest extends PluginManifest { @@ -119,7 +119,7 @@ export const PluginManifestSchema = z.object({ backend: mainSchema, }), version: z.string(), - attraccessVersion: z + fabaccessVersion: z .object({ min: z.string().optional(), max: z.string().optional(), diff --git a/apps/api/src/resources/dtos/createResource.dto.ts b/apps/api/src/resources/dtos/createResource.dto.ts index 4cb98a53..6e121873 100644 --- a/apps/api/src/resources/dtos/createResource.dto.ts +++ b/apps/api/src/resources/dtos/createResource.dto.ts @@ -1,7 +1,7 @@ import { ApiProperty } from '@nestjs/swagger'; import { IsString, IsOptional, MinLength, IsEnum, IsUrl, ValidateIf, IsBoolean } from 'class-validator'; import { FileUpload } from '../../common/types/file-upload.types'; -import { DocumentationType } from '@attraccess/database-entities'; +import { DocumentationType } from '@fabaccess/database-entities'; import { ToBoolean } from '../../common/request-transformers'; export class CreateResourceDto { diff --git a/apps/api/src/resources/dtos/paginatedResourceResponse.dto.ts b/apps/api/src/resources/dtos/paginatedResourceResponse.dto.ts index 189e2947..ff6699e3 100644 --- a/apps/api/src/resources/dtos/paginatedResourceResponse.dto.ts +++ b/apps/api/src/resources/dtos/paginatedResourceResponse.dto.ts @@ -1,4 +1,4 @@ -import { Resource } from '@attraccess/database-entities'; +import { Resource } from '@fabaccess/database-entities'; import { PaginatedResponse } from '../../types/response'; import { ApiProperty } from '@nestjs/swagger'; diff --git a/apps/api/src/resources/dtos/updateResource.dto.ts b/apps/api/src/resources/dtos/updateResource.dto.ts index 899ae3b1..0fb4781c 100644 --- a/apps/api/src/resources/dtos/updateResource.dto.ts +++ b/apps/api/src/resources/dtos/updateResource.dto.ts @@ -1,7 +1,7 @@ import { ApiProperty } from '@nestjs/swagger'; import { IsString, IsOptional, IsEnum, IsUrl, ValidateIf, IsBoolean } from 'class-validator'; import { FileUpload } from '../../common/types/file-upload.types'; -import { DocumentationType } from '@attraccess/database-entities'; +import { DocumentationType } from '@fabaccess/database-entities'; import { ToBoolean } from '../../common/request-transformers'; export class UpdateResourceDto { diff --git a/apps/api/src/resources/groups/errors/groupNotFound.error.ts b/apps/api/src/resources/groups/errors/groupNotFound.error.ts index 78e65128..b4bcad95 100644 --- a/apps/api/src/resources/groups/errors/groupNotFound.error.ts +++ b/apps/api/src/resources/groups/errors/groupNotFound.error.ts @@ -1,4 +1,4 @@ -import { ResourceGroup } from '@attraccess/database-entities'; +import { ResourceGroup } from '@fabaccess/database-entities'; import { NotFoundException } from '@nestjs/common'; import { FindOneOptions } from 'typeorm'; diff --git a/apps/api/src/resources/groups/introducers/resourceGroups.introducers.controller.ts b/apps/api/src/resources/groups/introducers/resourceGroups.introducers.controller.ts index 82b8ec17..639fbf6e 100644 --- a/apps/api/src/resources/groups/introducers/resourceGroups.introducers.controller.ts +++ b/apps/api/src/resources/groups/introducers/resourceGroups.introducers.controller.ts @@ -1,8 +1,8 @@ import { Controller, Get, Param, ParseIntPipe, Post } from '@nestjs/common'; import { ApiOperation, ApiParam, ApiResponse, ApiTags } from '@nestjs/swagger'; -import { ResourceIntroducer } from '@attraccess/database-entities'; +import { ResourceIntroducer } from '@fabaccess/database-entities'; import { ResourceGroupsIntroducersService } from './resourceGroups.introducers.service'; -import { Auth } from '@attraccess/plugins-backend-sdk'; +import { Auth } from '@fabaccess/plugins-backend-sdk'; import { IsResourceGroupIntroducerResponseDto } from './dtos/isIntroducer.response.dto'; @ApiTags('Access Control') diff --git a/apps/api/src/resources/groups/introducers/resourceGroups.introducers.service.ts b/apps/api/src/resources/groups/introducers/resourceGroups.introducers.service.ts index 56be60bd..58255f55 100644 --- a/apps/api/src/resources/groups/introducers/resourceGroups.introducers.service.ts +++ b/apps/api/src/resources/groups/introducers/resourceGroups.introducers.service.ts @@ -1,6 +1,6 @@ import { InjectRepository } from '@nestjs/typeorm'; import { Injectable } from '@nestjs/common'; -import { ResourceIntroducer } from '@attraccess/database-entities'; +import { ResourceIntroducer } from '@fabaccess/database-entities'; import { Repository } from 'typeorm'; @Injectable() diff --git a/apps/api/src/resources/groups/introductions/isIntroducer.decorator.ts b/apps/api/src/resources/groups/introductions/isIntroducer.decorator.ts index bf49ee26..c0ea8777 100644 --- a/apps/api/src/resources/groups/introductions/isIntroducer.decorator.ts +++ b/apps/api/src/resources/groups/introductions/isIntroducer.decorator.ts @@ -1,6 +1,6 @@ import { UseGuards, applyDecorators } from '@nestjs/common'; import { ApiBearerAuth, ApiForbiddenResponse, ApiUnauthorizedResponse } from '@nestjs/swagger'; -import { JwtGuard } from '@attraccess/plugins-backend-sdk'; +import { JwtGuard } from '@fabaccess/plugins-backend-sdk'; import { IsResourceGroupIntroducerGuard } from './isIntroducerGuard'; /** diff --git a/apps/api/src/resources/groups/introductions/isIntroducerGuard.ts b/apps/api/src/resources/groups/introductions/isIntroducerGuard.ts index f9b9e99f..88a866be 100644 --- a/apps/api/src/resources/groups/introductions/isIntroducerGuard.ts +++ b/apps/api/src/resources/groups/introductions/isIntroducerGuard.ts @@ -8,7 +8,7 @@ import { } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; -import { ResourceIntroducer, User } from '@attraccess/database-entities'; +import { ResourceIntroducer, User } from '@fabaccess/database-entities'; @Injectable() export class IsResourceGroupIntroducerGuard implements CanActivate { diff --git a/apps/api/src/resources/groups/introductions/resourceGroups.introductions.controller.ts b/apps/api/src/resources/groups/introductions/resourceGroups.introductions.controller.ts index 71e9cba1..45e2c644 100644 --- a/apps/api/src/resources/groups/introductions/resourceGroups.introductions.controller.ts +++ b/apps/api/src/resources/groups/introductions/resourceGroups.introductions.controller.ts @@ -1,7 +1,7 @@ import { Body, Controller, Get, Param, ParseIntPipe, Post } from '@nestjs/common'; import { ResourceGroupsIntroductionsService } from './resourceGroups.introductions.service'; import { ApiOperation, ApiParam, ApiResponse, ApiTags } from '@nestjs/swagger'; -import { ResourceIntroduction, ResourceIntroductionHistoryItem } from '@attraccess/database-entities'; +import { ResourceIntroduction, ResourceIntroductionHistoryItem } from '@fabaccess/database-entities'; import { IsResourceGroupIntroducer } from './isIntroducer.decorator'; import { UpdateResourceGroupIntroductionDto } from './dtos/update.request.dto'; diff --git a/apps/api/src/resources/groups/introductions/resourceGroups.introductions.service.ts b/apps/api/src/resources/groups/introductions/resourceGroups.introductions.service.ts index 7f6fb291..24a35a62 100644 --- a/apps/api/src/resources/groups/introductions/resourceGroups.introductions.service.ts +++ b/apps/api/src/resources/groups/introductions/resourceGroups.introductions.service.ts @@ -6,7 +6,7 @@ import { ResourceGroup, ResourceIntroduction, ResourceIntroductionHistoryItem, -} from '@attraccess/database-entities'; +} from '@fabaccess/database-entities'; import { Repository } from 'typeorm'; import { UpdateResourceGroupIntroductionDto } from './dtos/update.request.dto'; diff --git a/apps/api/src/resources/groups/resourceGroups.controller.ts b/apps/api/src/resources/groups/resourceGroups.controller.ts index ce5a05f0..af3a52b4 100644 --- a/apps/api/src/resources/groups/resourceGroups.controller.ts +++ b/apps/api/src/resources/groups/resourceGroups.controller.ts @@ -1,10 +1,10 @@ import { Body, Controller, Delete, Get, Param, ParseIntPipe, Post, Put } from '@nestjs/common'; import { ResourceGroupsService } from './resourceGroups.service'; import { ApiOperation, ApiParam, ApiResponse, ApiTags } from '@nestjs/swagger'; -import { ResourceGroup } from '@attraccess/database-entities'; +import { ResourceGroup } from '@fabaccess/database-entities'; import { CreateResourceGroupDto } from './dto/createGroup.dto'; import { UpdateResourceGroupDto } from './dto/updateGroup.dto'; -import { Auth } from '@attraccess/plugins-backend-sdk'; +import { Auth } from '@fabaccess/plugins-backend-sdk'; @ApiTags('Resources') @Controller('resource-groups') diff --git a/apps/api/src/resources/groups/resourceGroups.module.ts b/apps/api/src/resources/groups/resourceGroups.module.ts index 3f064059..ee512470 100644 --- a/apps/api/src/resources/groups/resourceGroups.module.ts +++ b/apps/api/src/resources/groups/resourceGroups.module.ts @@ -6,7 +6,7 @@ import { ResourceIntroducer, ResourceIntroduction, ResourceIntroductionHistoryItem, -} from '@attraccess/database-entities'; +} from '@fabaccess/database-entities'; import { ResourceGroupsController } from './resourceGroups.controller'; import { ResourceGroupsService } from './resourceGroups.service'; import { ResourceGroupsIntroductionsController } from './introductions/resourceGroups.introductions.controller'; diff --git a/apps/api/src/resources/groups/resourceGroups.service.ts b/apps/api/src/resources/groups/resourceGroups.service.ts index 6aea9006..b77bbb11 100644 --- a/apps/api/src/resources/groups/resourceGroups.service.ts +++ b/apps/api/src/resources/groups/resourceGroups.service.ts @@ -1,6 +1,6 @@ import { InjectRepository } from '@nestjs/typeorm'; import { Injectable } from '@nestjs/common'; -import { Resource, ResourceGroup } from '@attraccess/database-entities'; +import { Resource, ResourceGroup } from '@fabaccess/database-entities'; import { Repository } from 'typeorm'; import { CreateResourceGroupDto } from './dto/createGroup.dto'; import { UpdateResourceGroupDto } from './dto/updateGroup.dto'; diff --git a/apps/api/src/resources/introducers/resourceIntroducers.controller.ts b/apps/api/src/resources/introducers/resourceIntroducers.controller.ts index d9a42db5..cc10f509 100644 --- a/apps/api/src/resources/introducers/resourceIntroducers.controller.ts +++ b/apps/api/src/resources/introducers/resourceIntroducers.controller.ts @@ -1,8 +1,8 @@ import { Controller, Delete, Get, Param, ParseIntPipe, Post } from '@nestjs/common'; import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger'; import { ResourceIntroducersService } from './resourceIntroducers.service'; -import { ResourceIntroducer } from '@attraccess/database-entities'; -import { Auth } from '@attraccess/plugins-backend-sdk'; +import { ResourceIntroducer } from '@fabaccess/database-entities'; +import { Auth } from '@fabaccess/plugins-backend-sdk'; import { IsResourceIntroducerResponseDto } from './dtos/isIntroducer.response.dto'; @ApiTags('Access Control') diff --git a/apps/api/src/resources/introducers/resourceIntroducers.module.ts b/apps/api/src/resources/introducers/resourceIntroducers.module.ts index d99d1afc..dbb7a1f7 100644 --- a/apps/api/src/resources/introducers/resourceIntroducers.module.ts +++ b/apps/api/src/resources/introducers/resourceIntroducers.module.ts @@ -1,7 +1,7 @@ import { Module } from '@nestjs/common'; import { ResourceIntroducersService } from './resourceIntroducers.service'; import { TypeOrmModule } from '@nestjs/typeorm'; -import { ResourceIntroducer } from '@attraccess/database-entities'; +import { ResourceIntroducer } from '@fabaccess/database-entities'; import { ResourceIntroducersController } from './resourceIntroducers.controller'; @Module({ diff --git a/apps/api/src/resources/introducers/resourceIntroducers.service.ts b/apps/api/src/resources/introducers/resourceIntroducers.service.ts index 45bcd3ac..2251f303 100644 --- a/apps/api/src/resources/introducers/resourceIntroducers.service.ts +++ b/apps/api/src/resources/introducers/resourceIntroducers.service.ts @@ -1,4 +1,4 @@ -import { ResourceIntroducer } from '@attraccess/database-entities'; +import { ResourceIntroducer } from '@fabaccess/database-entities'; import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; diff --git a/apps/api/src/resources/introductions/isIntroducer.decorator.ts b/apps/api/src/resources/introductions/isIntroducer.decorator.ts index f0cd2aa1..44e020f8 100644 --- a/apps/api/src/resources/introductions/isIntroducer.decorator.ts +++ b/apps/api/src/resources/introductions/isIntroducer.decorator.ts @@ -1,6 +1,6 @@ import { UseGuards, applyDecorators } from '@nestjs/common'; import { ApiBearerAuth, ApiForbiddenResponse, ApiUnauthorizedResponse } from '@nestjs/swagger'; -import { JwtGuard } from '@attraccess/plugins-backend-sdk'; +import { JwtGuard } from '@fabaccess/plugins-backend-sdk'; import { IsResourceIntroducerGuard } from './isIntroducerGuard'; /** diff --git a/apps/api/src/resources/introductions/isIntroducerGuard.ts b/apps/api/src/resources/introductions/isIntroducerGuard.ts index 8d2203de..a3f74d45 100644 --- a/apps/api/src/resources/introductions/isIntroducerGuard.ts +++ b/apps/api/src/resources/introductions/isIntroducerGuard.ts @@ -8,8 +8,8 @@ import { } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; -import { ResourceIntroducer } from '@attraccess/database-entities'; -import { AuthenticatedUser } from '@attraccess/plugins-backend-sdk'; +import { ResourceIntroducer } from '@fabaccess/database-entities'; +import { AuthenticatedUser } from '@fabaccess/plugins-backend-sdk'; @Injectable() export class IsResourceIntroducerGuard implements CanActivate { diff --git a/apps/api/src/resources/introductions/resouceIntroductions.service.ts b/apps/api/src/resources/introductions/resouceIntroductions.service.ts index 206d8c80..2f10a665 100644 --- a/apps/api/src/resources/introductions/resouceIntroductions.service.ts +++ b/apps/api/src/resources/introductions/resouceIntroductions.service.ts @@ -2,7 +2,7 @@ import { IntroductionHistoryAction, ResourceIntroduction, ResourceIntroductionHistoryItem, -} from '@attraccess/database-entities'; +} from '@fabaccess/database-entities'; import { Injectable, Logger } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; diff --git a/apps/api/src/resources/introductions/resourceIntroductions.controller.ts b/apps/api/src/resources/introductions/resourceIntroductions.controller.ts index f1db5ae1..827574f4 100644 --- a/apps/api/src/resources/introductions/resourceIntroductions.controller.ts +++ b/apps/api/src/resources/introductions/resourceIntroductions.controller.ts @@ -1,7 +1,7 @@ import { Body, Controller, Delete, Get, Param, ParseIntPipe, Post } from '@nestjs/common'; import { ApiOperation, ApiParam, ApiResponse, ApiTags } from '@nestjs/swagger'; import { ResourceIntroductionsService } from './resouceIntroductions.service'; -import { ResourceIntroduction, ResourceIntroductionHistoryItem } from '@attraccess/database-entities'; +import { ResourceIntroduction, ResourceIntroductionHistoryItem } from '@fabaccess/database-entities'; import { IsResourceIntroducer } from './isIntroducer.decorator'; import { UpdateResourceIntroductionDto } from './dtos/update.request.dto'; diff --git a/apps/api/src/resources/introductions/resourceIntroductions.module.ts b/apps/api/src/resources/introductions/resourceIntroductions.module.ts index 0063ed35..0c82788e 100644 --- a/apps/api/src/resources/introductions/resourceIntroductions.module.ts +++ b/apps/api/src/resources/introductions/resourceIntroductions.module.ts @@ -5,7 +5,7 @@ import { ResourceIntroducer, ResourceIntroduction, ResourceIntroductionHistoryItem, -} from '@attraccess/database-entities'; +} from '@fabaccess/database-entities'; import { TypeOrmModule } from '@nestjs/typeorm'; @Module({ diff --git a/apps/api/src/resources/iot/iot.service.ts b/apps/api/src/resources/iot/iot.service.ts index de6346b7..83bda0c8 100644 --- a/apps/api/src/resources/iot/iot.service.ts +++ b/apps/api/src/resources/iot/iot.service.ts @@ -1,4 +1,4 @@ -import { Resource, User } from '@attraccess/database-entities'; +import { Resource, User } from '@fabaccess/database-entities'; import { Injectable } from '@nestjs/common'; import * as Handlebars from 'handlebars'; diff --git a/apps/api/src/resources/iot/mqtt/config/mqtt-resource-config.controller.ts b/apps/api/src/resources/iot/mqtt/config/mqtt-resource-config.controller.ts index 3c053ce0..01e09873 100644 --- a/apps/api/src/resources/iot/mqtt/config/mqtt-resource-config.controller.ts +++ b/apps/api/src/resources/iot/mqtt/config/mqtt-resource-config.controller.ts @@ -1,6 +1,6 @@ import { Controller, Get, Post, Put, Delete, Body, Param, ParseIntPipe } from '@nestjs/common'; import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger'; -import { MqttResourceConfig } from '@attraccess/database-entities'; +import { MqttResourceConfig } from '@fabaccess/database-entities'; import { MqttResourceConfigService } from './mqtt-resource-config.service'; import { CreateMqttResourceConfigDto, @@ -9,7 +9,7 @@ import { } from './dtos/mqtt-resource-config.dto'; import { MqttClientService } from '../../../../mqtt/mqtt-client.service'; import * as Handlebars from 'handlebars'; -import { Auth } from '@attraccess/plugins-backend-sdk'; +import { Auth } from '@fabaccess/plugins-backend-sdk'; @ApiTags('MQTT') @Auth('canManageResources') diff --git a/apps/api/src/resources/iot/mqtt/config/mqtt-resource-config.service.ts b/apps/api/src/resources/iot/mqtt/config/mqtt-resource-config.service.ts index c05370d6..457f43d8 100644 --- a/apps/api/src/resources/iot/mqtt/config/mqtt-resource-config.service.ts +++ b/apps/api/src/resources/iot/mqtt/config/mqtt-resource-config.service.ts @@ -1,7 +1,7 @@ import { Injectable, NotFoundException } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; -import { MqttResourceConfig, Resource } from '@attraccess/database-entities'; +import { MqttResourceConfig, Resource } from '@fabaccess/database-entities'; import { CreateMqttResourceConfigDto, UpdateMqttResourceConfigDto } from './dtos/mqtt-resource-config.dto'; @Injectable() diff --git a/apps/api/src/resources/iot/mqtt/mqtt-resource.module.ts b/apps/api/src/resources/iot/mqtt/mqtt-resource.module.ts index e9a79504..cb8774bb 100644 --- a/apps/api/src/resources/iot/mqtt/mqtt-resource.module.ts +++ b/apps/api/src/resources/iot/mqtt/mqtt-resource.module.ts @@ -1,6 +1,6 @@ import { Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; -import { MqttResourceConfig, Resource } from '@attraccess/database-entities'; +import { MqttResourceConfig, Resource } from '@fabaccess/database-entities'; import { MqttResourceConfigController } from './config/mqtt-resource-config.controller'; import { MqttResourceConfigService } from './config/mqtt-resource-config.service'; import { MqttPublisherService } from './publisher/mqtt-publisher.service'; diff --git a/apps/api/src/resources/iot/mqtt/publisher/mqtt-publisher.service.spec.ts b/apps/api/src/resources/iot/mqtt/publisher/mqtt-publisher.service.spec.ts index 03cc325e..f5952df6 100644 --- a/apps/api/src/resources/iot/mqtt/publisher/mqtt-publisher.service.spec.ts +++ b/apps/api/src/resources/iot/mqtt/publisher/mqtt-publisher.service.spec.ts @@ -1,7 +1,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { getRepositoryToken } from '@nestjs/typeorm'; import { MqttPublisherService } from './mqtt-publisher.service'; -import { MqttResourceConfig, Resource, User } from '@attraccess/database-entities'; +import { MqttResourceConfig, Resource, User } from '@fabaccess/database-entities'; import { Repository } from 'typeorm'; import { Logger } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; diff --git a/apps/api/src/resources/iot/mqtt/publisher/mqtt-publisher.service.ts b/apps/api/src/resources/iot/mqtt/publisher/mqtt-publisher.service.ts index e6654bec..e65708e2 100644 --- a/apps/api/src/resources/iot/mqtt/publisher/mqtt-publisher.service.ts +++ b/apps/api/src/resources/iot/mqtt/publisher/mqtt-publisher.service.ts @@ -2,7 +2,7 @@ import { Injectable, Logger } from '@nestjs/common'; import { OnEvent } from '@nestjs/event-emitter'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; -import { Resource, MqttResourceConfig, User } from '@attraccess/database-entities'; +import { Resource, MqttResourceConfig, User } from '@fabaccess/database-entities'; import { ConfigService } from '@nestjs/config'; import { MqttClientService } from '../../../../mqtt/mqtt-client.service'; import { diff --git a/apps/api/src/resources/iot/webhooks/config/webhook-config.controller.ts b/apps/api/src/resources/iot/webhooks/config/webhook-config.controller.ts index 3b3e8acd..bd02ad75 100644 --- a/apps/api/src/resources/iot/webhooks/config/webhook-config.controller.ts +++ b/apps/api/src/resources/iot/webhooks/config/webhook-config.controller.ts @@ -8,8 +8,8 @@ import { WebhookTestResponseDto, WebhookConfigResponseDto, } from './dtos/webhook-config.dto'; -import { WebhookConfig } from '@attraccess/database-entities'; -import { Auth } from '@attraccess/plugins-backend-sdk'; +import { WebhookConfig } from '@fabaccess/database-entities'; +import { Auth } from '@fabaccess/plugins-backend-sdk'; @ApiTags('Webhooks') @Controller('resources/:resourceId/webhooks') diff --git a/apps/api/src/resources/iot/webhooks/config/webhook-config.service.ts b/apps/api/src/resources/iot/webhooks/config/webhook-config.service.ts index 24ab07dc..a6ff3f20 100644 --- a/apps/api/src/resources/iot/webhooks/config/webhook-config.service.ts +++ b/apps/api/src/resources/iot/webhooks/config/webhook-config.service.ts @@ -1,7 +1,7 @@ import { Injectable, NotFoundException, Logger } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; -import { WebhookConfig, Resource } from '@attraccess/database-entities'; +import { WebhookConfig, Resource } from '@fabaccess/database-entities'; import { randomBytes, createHmac } from 'crypto'; @Injectable() diff --git a/apps/api/src/resources/iot/webhooks/publisher/webhook-publisher.service.spec.ts b/apps/api/src/resources/iot/webhooks/publisher/webhook-publisher.service.spec.ts index 0100e91c..1bb007b6 100644 --- a/apps/api/src/resources/iot/webhooks/publisher/webhook-publisher.service.spec.ts +++ b/apps/api/src/resources/iot/webhooks/publisher/webhook-publisher.service.spec.ts @@ -4,7 +4,7 @@ import { getRepositoryToken } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; import axios from 'axios'; import { WebhookPublisherService } from './webhook-publisher.service'; -import { WebhookConfig, Resource, User } from '@attraccess/database-entities'; +import { WebhookConfig, Resource, User } from '@fabaccess/database-entities'; import { IotService } from '../../iot.service'; import { ResourceUsageStartedEvent, diff --git a/apps/api/src/resources/iot/webhooks/publisher/webhook-publisher.service.ts b/apps/api/src/resources/iot/webhooks/publisher/webhook-publisher.service.ts index 3b1e922c..5b6a6eb7 100644 --- a/apps/api/src/resources/iot/webhooks/publisher/webhook-publisher.service.ts +++ b/apps/api/src/resources/iot/webhooks/publisher/webhook-publisher.service.ts @@ -2,7 +2,7 @@ import { Injectable, Logger } from '@nestjs/common'; import { OnEvent } from '@nestjs/event-emitter'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; -import { WebhookConfig, Resource, User } from '@attraccess/database-entities'; +import { WebhookConfig, Resource, User } from '@fabaccess/database-entities'; import { ResourceUsageStartedEvent, ResourceUsageEndedEvent, diff --git a/apps/api/src/resources/iot/webhooks/webhooks.module.ts b/apps/api/src/resources/iot/webhooks/webhooks.module.ts index 3527eb0a..03e9b1ab 100644 --- a/apps/api/src/resources/iot/webhooks/webhooks.module.ts +++ b/apps/api/src/resources/iot/webhooks/webhooks.module.ts @@ -1,6 +1,6 @@ import { Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; -import { WebhookConfig, Resource } from '@attraccess/database-entities'; +import { WebhookConfig, Resource } from '@fabaccess/database-entities'; import { WebhookConfigController } from './config/webhook-config.controller'; import { WebhookConfigService } from './config/webhook-config.service'; import { WebhookPublisherService } from './publisher/webhook-publisher.service'; diff --git a/apps/api/src/resources/resources.controller.spec.ts b/apps/api/src/resources/resources.controller.spec.ts index 4f048f05..4019e2df 100644 --- a/apps/api/src/resources/resources.controller.spec.ts +++ b/apps/api/src/resources/resources.controller.spec.ts @@ -1,13 +1,13 @@ import { Test, TestingModule } from '@nestjs/testing'; import { ResourcesController } from './resources.controller'; import { ResourcesService } from './resources.service'; -import { Resource, DocumentationType } from '@attraccess/database-entities'; +import { Resource, DocumentationType } from '@fabaccess/database-entities'; import { CreateResourceDto } from './dtos/createResource.dto'; import { UpdateResourceDto } from './dtos/updateResource.dto'; import { NotFoundException } from '@nestjs/common'; import { PaginatedResponse } from '../types/response'; import { ResourceImageService } from './resourceImage.service'; -import { AuthenticatedRequest } from '@attraccess/plugins-backend-sdk'; +import { AuthenticatedRequest } from '@fabaccess/plugins-backend-sdk'; describe('ResourcesController', () => { let controller: ResourcesController; diff --git a/apps/api/src/resources/resources.controller.ts b/apps/api/src/resources/resources.controller.ts index 8e9c2139..d637dfb1 100644 --- a/apps/api/src/resources/resources.controller.ts +++ b/apps/api/src/resources/resources.controller.ts @@ -18,8 +18,8 @@ import { ResourcesService } from './resources.service'; import { UpdateResourceDto } from './dtos/updateResource.dto'; import { CreateResourceDto } from './dtos/createResource.dto'; import { ListResourcesDto } from './dtos/listResources.dto'; -import { Resource } from '@attraccess/database-entities'; -import { Auth, AuthenticatedRequest } from '@attraccess/plugins-backend-sdk'; +import { Resource } from '@fabaccess/database-entities'; +import { Auth, AuthenticatedRequest } from '@fabaccess/plugins-backend-sdk'; import { PaginatedResponse } from '../types/response'; import { FileUpload } from '../common/types/file-upload.types'; import { PaginatedResourceResponseDto } from './dtos/paginatedResourceResponse.dto'; diff --git a/apps/api/src/resources/resources.module.ts b/apps/api/src/resources/resources.module.ts index ae8baab3..3a344d1f 100644 --- a/apps/api/src/resources/resources.module.ts +++ b/apps/api/src/resources/resources.module.ts @@ -7,7 +7,7 @@ import { ResourceIntroducer, ResourceIntroductionHistoryItem, User, -} from '@attraccess/database-entities'; +} from '@fabaccess/database-entities'; import { ResourcesController } from './resources.controller'; import { ScheduleModule } from '@nestjs/schedule'; import { FileStorageModule } from '../common/modules/file-storage.module'; diff --git a/apps/api/src/resources/resources.service.spec.ts b/apps/api/src/resources/resources.service.spec.ts index 55f6ba15..1c588c81 100644 --- a/apps/api/src/resources/resources.service.spec.ts +++ b/apps/api/src/resources/resources.service.spec.ts @@ -1,7 +1,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { ResourcesService } from './resources.service'; import { getRepositoryToken } from '@nestjs/typeorm'; -import { Resource, DocumentationType } from '@attraccess/database-entities'; +import { Resource, DocumentationType } from '@fabaccess/database-entities'; import { Repository, SelectQueryBuilder, Brackets } from 'typeorm'; import { CreateResourceDto } from './dtos/createResource.dto'; import { UpdateResourceDto } from './dtos/updateResource.dto'; diff --git a/apps/api/src/resources/resources.service.ts b/apps/api/src/resources/resources.service.ts index ef86b210..77c111f9 100644 --- a/apps/api/src/resources/resources.service.ts +++ b/apps/api/src/resources/resources.service.ts @@ -1,7 +1,7 @@ import { BadRequestException, Injectable, Logger } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository, In, Brackets } from 'typeorm'; -import { Resource } from '@attraccess/database-entities'; +import { Resource } from '@fabaccess/database-entities'; import { CreateResourceDto } from './dtos/createResource.dto'; import { UpdateResourceDto } from './dtos/updateResource.dto'; import { PaginatedResponse } from '../types/response'; diff --git a/apps/api/src/resources/sse/sse.controller.ts b/apps/api/src/resources/sse/sse.controller.ts index acb239fe..04867f8f 100644 --- a/apps/api/src/resources/sse/sse.controller.ts +++ b/apps/api/src/resources/sse/sse.controller.ts @@ -12,7 +12,7 @@ import { Observable, Subject } from 'rxjs'; import { OnEvent } from '@nestjs/event-emitter'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; -import { Resource } from '@attraccess/database-entities'; +import { Resource } from '@fabaccess/database-entities'; import { ResourceUsageStartedEvent, ResourceUsageEndedEvent } from '../usage/events/resource-usage.events'; import { ApiTags } from '@nestjs/swagger'; diff --git a/apps/api/src/resources/sse/sse.module.ts b/apps/api/src/resources/sse/sse.module.ts index 7092e553..a4079c3c 100644 --- a/apps/api/src/resources/sse/sse.module.ts +++ b/apps/api/src/resources/sse/sse.module.ts @@ -1,6 +1,6 @@ import { Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; -import { Resource } from '@attraccess/database-entities'; +import { Resource } from '@fabaccess/database-entities'; import { SSEController } from './sse.controller'; @Module({ diff --git a/apps/api/src/resources/usage/dtos/GetResourceHistoryResponse.dto.ts b/apps/api/src/resources/usage/dtos/GetResourceHistoryResponse.dto.ts index c9d5e96a..3120bfec 100644 --- a/apps/api/src/resources/usage/dtos/GetResourceHistoryResponse.dto.ts +++ b/apps/api/src/resources/usage/dtos/GetResourceHistoryResponse.dto.ts @@ -1,4 +1,4 @@ -import { ResourceUsage } from '@attraccess/database-entities'; +import { ResourceUsage } from '@fabaccess/database-entities'; import { ApiProperty } from '@nestjs/swagger'; import { PaginatedResponse } from '../../../types/response'; diff --git a/apps/api/src/resources/usage/dtos/getActiveUsageSession.dto.ts b/apps/api/src/resources/usage/dtos/getActiveUsageSession.dto.ts index 42247a1d..6e8baa6c 100644 --- a/apps/api/src/resources/usage/dtos/getActiveUsageSession.dto.ts +++ b/apps/api/src/resources/usage/dtos/getActiveUsageSession.dto.ts @@ -1,5 +1,5 @@ import { ApiProperty } from '@nestjs/swagger'; -import { ResourceUsage } from '@attraccess/database-entities'; +import { ResourceUsage } from '@fabaccess/database-entities'; export class GetActiveUsageSessionDto { @ApiProperty({ diff --git a/apps/api/src/resources/usage/events/resource-usage.events.ts b/apps/api/src/resources/usage/events/resource-usage.events.ts index fe10a0b3..b3614496 100644 --- a/apps/api/src/resources/usage/events/resource-usage.events.ts +++ b/apps/api/src/resources/usage/events/resource-usage.events.ts @@ -2,7 +2,7 @@ * Events emitted when resource usage status changes */ -import { User } from '@attraccess/database-entities'; +import { User } from '@fabaccess/database-entities'; export class ResourceUsageStartedEvent { constructor(public readonly resourceId: number, public readonly startTime: Date, public readonly user: User) {} diff --git a/apps/api/src/resources/usage/resourceUsage.controller.ts b/apps/api/src/resources/usage/resourceUsage.controller.ts index e616c771..87606fdb 100644 --- a/apps/api/src/resources/usage/resourceUsage.controller.ts +++ b/apps/api/src/resources/usage/resourceUsage.controller.ts @@ -1,10 +1,10 @@ import { Controller, Post, Put, Get, Param, Body, Query, ParseIntPipe, Req, ForbiddenException } from '@nestjs/common'; import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger'; import { ResourceUsageService } from './resourceUsage.service'; -import { ResourceUsage } from '@attraccess/database-entities'; +import { ResourceUsage } from '@fabaccess/database-entities'; import { StartUsageSessionDto } from './dtos/startUsageSession.dto'; import { EndUsageSessionDto } from './dtos/endUsageSession.dto'; -import { Auth, AuthenticatedRequest } from '@attraccess/plugins-backend-sdk'; +import { Auth, AuthenticatedRequest } from '@fabaccess/plugins-backend-sdk'; import { GetResourceHistoryQueryDto } from './dtos/getResourceHistoryQuery.dto'; import { GetResourceHistoryResponseDto } from './dtos/GetResourceHistoryResponse.dto'; import { GetActiveUsageSessionDto } from './dtos/getActiveUsageSession.dto'; diff --git a/apps/api/src/resources/usage/resourceUsage.module.ts b/apps/api/src/resources/usage/resourceUsage.module.ts index 2971c812..ab8960c4 100644 --- a/apps/api/src/resources/usage/resourceUsage.module.ts +++ b/apps/api/src/resources/usage/resourceUsage.module.ts @@ -2,7 +2,7 @@ import { Module } from '@nestjs/common'; import { ResourceUsageController } from './resourceUsage.controller'; import { ResourceUsageService } from './resourceUsage.service'; import { TypeOrmModule } from '@nestjs/typeorm'; -import { Resource, ResourceUsage } from '@attraccess/database-entities'; +import { Resource, ResourceUsage } from '@fabaccess/database-entities'; import { ResourceIntroducersModule } from '../introducers/resourceIntroducers.module'; import { ResourceIntroductionsModule } from '../introductions/resourceIntroductions.module'; import { ResourceGroupsModule } from '../groups/resourceGroups.module'; diff --git a/apps/api/src/resources/usage/resourceUsage.service.spec.ts b/apps/api/src/resources/usage/resourceUsage.service.spec.ts index be23623e..e9ca951f 100644 --- a/apps/api/src/resources/usage/resourceUsage.service.spec.ts +++ b/apps/api/src/resources/usage/resourceUsage.service.spec.ts @@ -1,7 +1,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { ResourceUsageService } from './resourceUsage.service'; import { getRepositoryToken } from '@nestjs/typeorm'; -import { Resource, ResourceUsage, User } from '@attraccess/database-entities'; +import { Resource, ResourceUsage, User } from '@fabaccess/database-entities'; import { Repository, IsNull, SelectQueryBuilder } from 'typeorm'; import { EventEmitter2 } from '@nestjs/event-emitter'; import { BadRequestException } from '@nestjs/common'; diff --git a/apps/api/src/resources/usage/resourceUsage.service.ts b/apps/api/src/resources/usage/resourceUsage.service.ts index 78e292c6..22008dcc 100644 --- a/apps/api/src/resources/usage/resourceUsage.service.ts +++ b/apps/api/src/resources/usage/resourceUsage.service.ts @@ -1,7 +1,7 @@ import { Injectable, BadRequestException, ForbiddenException, Logger } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository, IsNull, FindOneOptions } from 'typeorm'; -import { Resource, ResourceUsage, User } from '@attraccess/database-entities'; +import { Resource, ResourceUsage, User } from '@fabaccess/database-entities'; import { StartUsageSessionDto } from './dtos/startUsageSession.dto'; import { EndUsageSessionDto } from './dtos/endUsageSession.dto'; import { ResourceNotFoundException } from '../../exceptions/resource.notFound.exception'; diff --git a/apps/api/src/users-and-auth/auth/auth.controller.spec.ts b/apps/api/src/users-and-auth/auth/auth.controller.spec.ts index 33c5893c..ef64cae8 100644 --- a/apps/api/src/users-and-auth/auth/auth.controller.spec.ts +++ b/apps/api/src/users-and-auth/auth/auth.controller.spec.ts @@ -1,8 +1,8 @@ import { Test, TestingModule } from '@nestjs/testing'; import { AuthController } from './auth.controller'; import { AuthService } from './auth.service'; -import { User } from '@attraccess/database-entities'; -import { AuthenticatedRequest } from '@attraccess/plugins-backend-sdk'; +import { User } from '@fabaccess/database-entities'; +import { AuthenticatedRequest } from '@fabaccess/plugins-backend-sdk'; describe('AuthController', () => { let authController: AuthController; diff --git a/apps/api/src/users-and-auth/auth/auth.controller.ts b/apps/api/src/users-and-auth/auth/auth.controller.ts index f27efbb5..c3d3d50f 100644 --- a/apps/api/src/users-and-auth/auth/auth.controller.ts +++ b/apps/api/src/users-and-auth/auth/auth.controller.ts @@ -1,7 +1,7 @@ import { Controller, Delete, Get, Post, Req, UseGuards } from '@nestjs/common'; import { AuthService } from './auth.service'; import { LoginGuard } from '../strategies/login.guard'; -import { Auth, AuthenticatedRequest } from '@attraccess/plugins-backend-sdk'; +import { Auth, AuthenticatedRequest } from '@fabaccess/plugins-backend-sdk'; import { CreateSessionResponse } from './auth.types'; import { ApiBody, ApiOkResponse, ApiResponse, ApiTags, ApiOperation } from '@nestjs/swagger'; diff --git a/apps/api/src/users-and-auth/auth/auth.service.spec.ts b/apps/api/src/users-and-auth/auth/auth.service.spec.ts index 234c8fc1..0268dfaf 100644 --- a/apps/api/src/users-and-auth/auth/auth.service.spec.ts +++ b/apps/api/src/users-and-auth/auth/auth.service.spec.ts @@ -1,7 +1,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { AuthService } from './auth.service'; import { UsersService } from '../users/users.service'; -import { AuthenticationDetail, AuthenticationType, User, RevokedToken } from '@attraccess/database-entities'; +import { AuthenticationDetail, AuthenticationType, User, RevokedToken } from '@fabaccess/database-entities'; import { getRepositoryToken } from '@nestjs/typeorm'; import { JwtService } from '@nestjs/jwt'; import { Repository } from 'typeorm'; diff --git a/apps/api/src/users-and-auth/auth/auth.service.ts b/apps/api/src/users-and-auth/auth/auth.service.ts index 109ec1c6..c95de520 100644 --- a/apps/api/src/users-and-auth/auth/auth.service.ts +++ b/apps/api/src/users-and-auth/auth/auth.service.ts @@ -3,7 +3,7 @@ import { UsersService } from '../users/users.service'; import { JwtService } from '@nestjs/jwt'; import { nanoid } from 'nanoid'; import { Repository } from 'typeorm'; -import { User, RevokedToken, AuthenticationDetail, AuthenticationType } from '@attraccess/database-entities'; +import { User, RevokedToken, AuthenticationDetail, AuthenticationType } from '@fabaccess/database-entities'; import { InjectRepository } from '@nestjs/typeorm'; import { EmailService } from '../../email/email.service'; import { addDays } from 'date-fns'; @@ -147,6 +147,7 @@ export class AuthService { options: AuthenticationOptions ): Promise { // First try to find user by username + console.log('usernameOrEmail', usernameOrEmail); let user = await this.usersService.findOne({ username: usernameOrEmail }); // If not found by username, try by email diff --git a/apps/api/src/users-and-auth/auth/auth.types.ts b/apps/api/src/users-and-auth/auth/auth.types.ts index fae1362e..839a154d 100644 --- a/apps/api/src/users-and-auth/auth/auth.types.ts +++ b/apps/api/src/users-and-auth/auth/auth.types.ts @@ -1,4 +1,4 @@ -import { User } from '@attraccess/database-entities'; +import { User } from '@fabaccess/database-entities'; import { ApiProperty } from '@nestjs/swagger'; export class CreateSessionResponse { diff --git a/apps/api/src/users-and-auth/auth/sso/dto/create-sso-provider.dto.ts b/apps/api/src/users-and-auth/auth/sso/dto/create-sso-provider.dto.ts index 3070e7c6..b73af501 100644 --- a/apps/api/src/users-and-auth/auth/sso/dto/create-sso-provider.dto.ts +++ b/apps/api/src/users-and-auth/auth/sso/dto/create-sso-provider.dto.ts @@ -1,12 +1,6 @@ import { ApiProperty } from '@nestjs/swagger'; -import { - IsNotEmpty, - IsObject, - IsOptional, - IsString, - ValidateNested, -} from 'class-validator'; -import { SSOProviderType } from '@attraccess/database-entities'; +import { IsNotEmpty, IsObject, IsOptional, IsString, ValidateNested } from 'class-validator'; +import { SSOProviderType } from '@fabaccess/database-entities'; import { Type } from 'class-transformer'; export class CreateOIDCConfigurationDto { @@ -20,8 +14,7 @@ export class CreateOIDCConfigurationDto { @ApiProperty({ description: 'The authorization URL of the provider', - example: - 'https://sso.example.com/auth/realms/example/protocol/openid-connect/auth', + example: 'https://sso.example.com/auth/realms/example/protocol/openid-connect/auth', }) @IsString() @IsNotEmpty() @@ -29,8 +22,7 @@ export class CreateOIDCConfigurationDto { @ApiProperty({ description: 'The token URL of the provider', - example: - 'https://sso.example.com/auth/realms/example/protocol/openid-connect/token', + example: 'https://sso.example.com/auth/realms/example/protocol/openid-connect/token', }) @IsString() @IsNotEmpty() @@ -38,8 +30,7 @@ export class CreateOIDCConfigurationDto { @ApiProperty({ description: 'The user info URL of the provider', - example: - 'https://sso.example.com/auth/realms/example/protocol/openid-connect/userinfo', + example: 'https://sso.example.com/auth/realms/example/protocol/openid-connect/userinfo', }) @IsString() @IsNotEmpty() @@ -47,7 +38,7 @@ export class CreateOIDCConfigurationDto { @ApiProperty({ description: 'The client ID of the provider', - example: 'attraccess-client', + example: 'fabaccess-client', }) @IsString() @IsNotEmpty() diff --git a/apps/api/src/users-and-auth/auth/sso/dto/update-sso-provider.dto.ts b/apps/api/src/users-and-auth/auth/sso/dto/update-sso-provider.dto.ts index 2143313b..fb11f1cf 100644 --- a/apps/api/src/users-and-auth/auth/sso/dto/update-sso-provider.dto.ts +++ b/apps/api/src/users-and-auth/auth/sso/dto/update-sso-provider.dto.ts @@ -1,10 +1,5 @@ import { ApiProperty } from '@nestjs/swagger'; -import { - IsObject, - IsOptional, - IsString, - ValidateNested, -} from 'class-validator'; +import { IsObject, IsOptional, IsString, ValidateNested } from 'class-validator'; import { Type } from 'class-transformer'; export class UpdateOIDCConfigurationDto { @@ -19,8 +14,7 @@ export class UpdateOIDCConfigurationDto { @ApiProperty({ description: 'The authorization URL of the provider', - example: - 'https://sso.example.com/auth/realms/example/protocol/openid-connect/auth', + example: 'https://sso.example.com/auth/realms/example/protocol/openid-connect/auth', required: false, }) @IsString() @@ -29,8 +23,7 @@ export class UpdateOIDCConfigurationDto { @ApiProperty({ description: 'The token URL of the provider', - example: - 'https://sso.example.com/auth/realms/example/protocol/openid-connect/token', + example: 'https://sso.example.com/auth/realms/example/protocol/openid-connect/token', required: false, }) @IsString() @@ -39,8 +32,7 @@ export class UpdateOIDCConfigurationDto { @ApiProperty({ description: 'The user info URL of the provider', - example: - 'https://sso.example.com/auth/realms/example/protocol/openid-connect/userinfo', + example: 'https://sso.example.com/auth/realms/example/protocol/openid-connect/userinfo', required: false, }) @IsString() @@ -49,7 +41,7 @@ export class UpdateOIDCConfigurationDto { @ApiProperty({ description: 'The client ID of the provider', - example: 'attraccess-client', + example: 'fabaccess-client', required: false, }) @IsString() diff --git a/apps/api/src/users-and-auth/auth/sso/oidc/exceptions/account-linking-required.exception.ts b/apps/api/src/users-and-auth/auth/sso/oidc/exceptions/account-linking-required.exception.ts index 841e706a..079b2eee 100644 --- a/apps/api/src/users-and-auth/auth/sso/oidc/exceptions/account-linking-required.exception.ts +++ b/apps/api/src/users-and-auth/auth/sso/oidc/exceptions/account-linking-required.exception.ts @@ -1,4 +1,4 @@ -import { SSOProviderType } from '@attraccess/database-entities'; +import { SSOProviderType } from '@fabaccess/database-entities'; import { BadRequestException } from '@nestjs/common'; export class AccountLinkingRequiredException extends BadRequestException { diff --git a/apps/api/src/users-and-auth/auth/sso/oidc/oidc.guard.ts b/apps/api/src/users-and-auth/auth/sso/oidc/oidc.guard.ts index 8278d920..6c80f9e3 100644 --- a/apps/api/src/users-and-auth/auth/sso/oidc/oidc.guard.ts +++ b/apps/api/src/users-and-auth/auth/sso/oidc/oidc.guard.ts @@ -4,7 +4,7 @@ import { AppConfigType } from '../../../../config/app.config'; import { SSOOIDCStrategy } from './oidc.strategy'; import { ModuleRef } from '@nestjs/core'; import { SSOService } from '../sso.service'; -import { SSOProviderType } from '@attraccess/database-entities'; +import { SSOProviderType } from '@fabaccess/database-entities'; import { InvalidSSOProviderIdException, InvalidSSOProviderTypeException, diff --git a/apps/api/src/users-and-auth/auth/sso/oidc/oidc.strategy.ts b/apps/api/src/users-and-auth/auth/sso/oidc/oidc.strategy.ts index 81f118bd..78a80f76 100644 --- a/apps/api/src/users-and-auth/auth/sso/oidc/oidc.strategy.ts +++ b/apps/api/src/users-and-auth/auth/sso/oidc/oidc.strategy.ts @@ -1,7 +1,7 @@ import { Profile, Strategy } from 'passport-openidconnect'; import { PassportStrategy } from '@nestjs/passport'; import { BadRequestException, Injectable, Logger, UnauthorizedException } from '@nestjs/common'; -import { SSOProviderOIDCConfiguration, SSOProviderType, User } from '@attraccess/database-entities'; +import { SSOProviderOIDCConfiguration, SSOProviderType, User } from '@fabaccess/database-entities'; import { UsersService } from '../../../users/users.service'; import { ModuleRef } from '@nestjs/core'; import { AccountLinkingRequiredException } from './exceptions/account-linking-required.exception'; diff --git a/apps/api/src/users-and-auth/auth/sso/sso.controller.spec.ts b/apps/api/src/users-and-auth/auth/sso/sso.controller.spec.ts index 6eea6fea..05302e37 100644 --- a/apps/api/src/users-and-auth/auth/sso/sso.controller.spec.ts +++ b/apps/api/src/users-and-auth/auth/sso/sso.controller.spec.ts @@ -2,7 +2,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { SSOController } from './sso.controller'; import { SSOService } from './sso.service'; import { AuthService } from '../auth.service'; -import { SSOProvider, SSOProviderType } from '@attraccess/database-entities'; +import { SSOProvider, SSOProviderType } from '@fabaccess/database-entities'; import { NotFoundException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { CreateSSOProviderDto } from './dto/create-sso-provider.dto'; diff --git a/apps/api/src/users-and-auth/auth/sso/sso.controller.ts b/apps/api/src/users-and-auth/auth/sso/sso.controller.ts index 4e887158..1ef31a04 100644 --- a/apps/api/src/users-and-auth/auth/sso/sso.controller.ts +++ b/apps/api/src/users-and-auth/auth/sso/sso.controller.ts @@ -17,8 +17,8 @@ import { } from '@nestjs/common'; import { SSOOIDCGuard } from './oidc/oidc.guard'; import { AuthGuard } from '@nestjs/passport'; -import { AuthenticationType, SSOProvider, SSOProviderType } from '@attraccess/database-entities'; -import { AuthenticatedRequest, Auth } from '@attraccess/plugins-backend-sdk'; +import { AuthenticationType, SSOProvider, SSOProviderType } from '@fabaccess/database-entities'; +import { AuthenticatedRequest, Auth } from '@fabaccess/plugins-backend-sdk'; import { CreateSessionResponse } from '../auth.types'; import { AuthService } from '../auth.service'; import { SSOService } from './sso.service'; diff --git a/apps/api/src/users-and-auth/auth/sso/sso.service.spec.ts b/apps/api/src/users-and-auth/auth/sso/sso.service.spec.ts index 8e7a0653..c578d1de 100644 --- a/apps/api/src/users-and-auth/auth/sso/sso.service.spec.ts +++ b/apps/api/src/users-and-auth/auth/sso/sso.service.spec.ts @@ -1,6 +1,6 @@ import { Test, TestingModule } from '@nestjs/testing'; import { SSOService } from './sso.service'; -import { SSOProvider, SSOProviderOIDCConfiguration, SSOProviderType } from '@attraccess/database-entities'; +import { SSOProvider, SSOProviderOIDCConfiguration, SSOProviderType } from '@fabaccess/database-entities'; import { getRepositoryToken } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; import { NotFoundException } from '@nestjs/common'; diff --git a/apps/api/src/users-and-auth/auth/sso/sso.service.ts b/apps/api/src/users-and-auth/auth/sso/sso.service.ts index e0dad67a..2f644efc 100644 --- a/apps/api/src/users-and-auth/auth/sso/sso.service.ts +++ b/apps/api/src/users-and-auth/auth/sso/sso.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; -import { SSOProvider, SSOProviderOIDCConfiguration, SSOProviderType } from '@attraccess/database-entities'; +import { SSOProvider, SSOProviderOIDCConfiguration, SSOProviderType } from '@fabaccess/database-entities'; import { CreateSSOProviderDto } from './dto/create-sso-provider.dto'; import { UpdateSSOProviderDto } from './dto/update-sso-provider.dto'; import { SSOProviderNotFoundException } from './errors'; diff --git a/apps/api/src/users-and-auth/strategies/jwt.strategy.spec.ts b/apps/api/src/users-and-auth/strategies/jwt.strategy.spec.ts index 8e4a11b4..16f305ef 100644 --- a/apps/api/src/users-and-auth/strategies/jwt.strategy.spec.ts +++ b/apps/api/src/users-and-auth/strategies/jwt.strategy.spec.ts @@ -4,7 +4,7 @@ import { UsersService } from '../users/users.service'; import { AuthService } from '../auth/auth.service'; import { UnauthorizedException } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -import { User } from '@attraccess/database-entities'; +import { User } from '@fabaccess/database-entities'; describe('JwtStrategy', () => { let jwtStrategy: JwtStrategy; @@ -61,9 +61,7 @@ describe('JwtStrategy', () => { jest.spyOn(authService, 'isJWTRevoked').mockResolvedValue(true); - await expect(jwtStrategy.validate(payload)).rejects.toThrow( - UnauthorizedException - ); + await expect(jwtStrategy.validate(payload)).rejects.toThrow(UnauthorizedException); }); it('should throw UnauthorizedException if user is not found', async () => { @@ -72,8 +70,6 @@ describe('JwtStrategy', () => { jest.spyOn(authService, 'isJWTRevoked').mockResolvedValue(false); jest.spyOn(usersService, 'findOne').mockResolvedValue(null); - await expect(jwtStrategy.validate(payload)).rejects.toThrow( - UnauthorizedException - ); + await expect(jwtStrategy.validate(payload)).rejects.toThrow(UnauthorizedException); }); }); diff --git a/apps/api/src/users-and-auth/strategies/jwt.strategy.ts b/apps/api/src/users-and-auth/strategies/jwt.strategy.ts index 3f99935f..776a3c5a 100644 --- a/apps/api/src/users-and-auth/strategies/jwt.strategy.ts +++ b/apps/api/src/users-and-auth/strategies/jwt.strategy.ts @@ -7,7 +7,7 @@ import { existsSync, readFileSync } from 'fs'; import { UsersService } from '../users/users.service'; import { AuthService } from '../auth/auth.service'; -import { AuthenticatedUser } from '@attraccess/plugins-backend-sdk'; +import { AuthenticatedUser } from '@fabaccess/plugins-backend-sdk'; interface JwtPayload { username: string; diff --git a/apps/api/src/users-and-auth/strategies/local.strategy.spec.ts b/apps/api/src/users-and-auth/strategies/local.strategy.spec.ts index e0a406a1..4bee8fa9 100644 --- a/apps/api/src/users-and-auth/strategies/local.strategy.spec.ts +++ b/apps/api/src/users-and-auth/strategies/local.strategy.spec.ts @@ -2,7 +2,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { UnauthorizedException } from '@nestjs/common'; import { LocalStrategy } from './local.strategy'; import { AuthService } from '../auth/auth.service'; -import { User } from '@attraccess/database-entities'; +import { User } from '@fabaccess/database-entities'; describe('LocalStrategy', () => { let localStrategy: LocalStrategy; diff --git a/apps/api/src/users-and-auth/strategies/local.strategy.ts b/apps/api/src/users-and-auth/strategies/local.strategy.ts index 43375845..f2d047ae 100644 --- a/apps/api/src/users-and-auth/strategies/local.strategy.ts +++ b/apps/api/src/users-and-auth/strategies/local.strategy.ts @@ -2,7 +2,7 @@ import { Strategy } from 'passport-local'; import { PassportStrategy } from '@nestjs/passport'; import { Injectable, Logger, UnauthorizedException } from '@nestjs/common'; import { AuthService } from '../auth/auth.service'; -import { AuthenticationType, User } from '@attraccess/database-entities'; +import { AuthenticationType, User } from '@fabaccess/database-entities'; class UnknownUserOrPasswordException extends UnauthorizedException { constructor() { diff --git a/apps/api/src/users-and-auth/users-and-auth.module.ts b/apps/api/src/users-and-auth/users-and-auth.module.ts index d50afccf..852f8535 100644 --- a/apps/api/src/users-and-auth/users-and-auth.module.ts +++ b/apps/api/src/users-and-auth/users-and-auth.module.ts @@ -23,7 +23,7 @@ import { RevokedToken, SSOProviderOIDCConfiguration, SSOProvider, -} from '@attraccess/database-entities'; +} from '@fabaccess/database-entities'; import { EmailModule } from '../email/email.module'; import { SSOService } from './auth/sso/sso.service'; import { SSOOIDCStrategy } from './auth/sso/oidc/oidc.strategy'; diff --git a/apps/api/src/users-and-auth/users/dtos/createUser.dto.ts b/apps/api/src/users-and-auth/users/dtos/createUser.dto.ts index eeb54dce..40a332e1 100644 --- a/apps/api/src/users-and-auth/users/dtos/createUser.dto.ts +++ b/apps/api/src/users-and-auth/users/dtos/createUser.dto.ts @@ -1,6 +1,6 @@ import { IsEmail, IsEnum, IsString, MinLength } from 'class-validator'; import { ApiProperty } from '@nestjs/swagger'; -import { AuthenticationType } from '@attraccess/database-entities'; +import { AuthenticationType } from '@fabaccess/database-entities'; export class CreateUserDto { @ApiProperty({ diff --git a/apps/api/src/users-and-auth/users/dtos/paginatedUsersResponse.dto.ts b/apps/api/src/users-and-auth/users/dtos/paginatedUsersResponse.dto.ts index 750fbe30..cf031278 100644 --- a/apps/api/src/users-and-auth/users/dtos/paginatedUsersResponse.dto.ts +++ b/apps/api/src/users-and-auth/users/dtos/paginatedUsersResponse.dto.ts @@ -1,4 +1,4 @@ -import { User } from '@attraccess/database-entities'; +import { User } from '@fabaccess/database-entities'; import { PaginatedResponse } from '../../../types/response'; import { ApiProperty } from '@nestjs/swagger'; diff --git a/apps/api/src/users-and-auth/users/users.controller.spec.ts b/apps/api/src/users-and-auth/users/users.controller.spec.ts index 49ed1475..18be364a 100644 --- a/apps/api/src/users-and-auth/users/users.controller.spec.ts +++ b/apps/api/src/users-and-auth/users/users.controller.spec.ts @@ -3,8 +3,8 @@ import { UsersController } from './users.controller'; import { UsersService } from './users.service'; import { AuthService } from '../auth/auth.service'; import { EmailService } from '../../email/email.service'; -import { User, AuthenticationType } from '@attraccess/database-entities'; -import { AuthenticatedRequest } from '@attraccess/plugins-backend-sdk'; +import { User, AuthenticationType } from '@fabaccess/database-entities'; +import { AuthenticatedRequest } from '@fabaccess/plugins-backend-sdk'; import { CreateUserDto } from './dtos/createUser.dto'; describe('UsersController', () => { diff --git a/apps/api/src/users-and-auth/users/users.controller.ts b/apps/api/src/users-and-auth/users/users.controller.ts index b1e8575f..41bb3fac 100644 --- a/apps/api/src/users-and-auth/users/users.controller.ts +++ b/apps/api/src/users-and-auth/users/users.controller.ts @@ -14,12 +14,12 @@ import { Patch, } from '@nestjs/common'; import { UsersService } from './users.service'; -import { AuthenticatedRequest, Auth } from '@attraccess/plugins-backend-sdk'; +import { AuthenticatedRequest, Auth } from '@fabaccess/plugins-backend-sdk'; import { AuthService } from '../auth/auth.service'; import { EmailService } from '../../email/email.service'; import { FindManyUsersQueryDto } from './dtos/findManyUsersQuery.dto'; import { VerifyEmailDto } from './dtos/verifyEmail.dto'; -import { AuthenticationDetail, User, SystemPermissions } from '@attraccess/database-entities'; +import { AuthenticationDetail, User, SystemPermissions } from '@fabaccess/database-entities'; import { ApiTags, ApiResponse, ApiOperation } from '@nestjs/swagger'; import { CreateUserDto } from './dtos/createUser.dto'; import { PaginatedUsersResponseDto } from './dtos/paginatedUsersResponse.dto'; diff --git a/apps/api/src/users-and-auth/users/users.service.spec.ts b/apps/api/src/users-and-auth/users/users.service.spec.ts index 0b69c62c..097d4362 100644 --- a/apps/api/src/users-and-auth/users/users.service.spec.ts +++ b/apps/api/src/users-and-auth/users/users.service.spec.ts @@ -1,7 +1,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { UsersService } from './users.service'; import { getRepositoryToken } from '@nestjs/typeorm'; -import { User } from '@attraccess/database-entities'; +import { User } from '@fabaccess/database-entities'; import { Repository, UpdateResult } from 'typeorm'; import { BadRequestException } from '@nestjs/common'; import { UserNotFoundException } from '../../exceptions/user.notFound.exception'; diff --git a/apps/api/src/users-and-auth/users/users.service.ts b/apps/api/src/users-and-auth/users/users.service.ts index b0c0d825..9bf13f40 100644 --- a/apps/api/src/users-and-auth/users/users.service.ts +++ b/apps/api/src/users-and-auth/users/users.service.ts @@ -1,6 +1,6 @@ import { BadRequestException, Injectable, Logger } from '@nestjs/common'; import { Repository, ILike, FindOneOptions as TypeormFindOneOptions, FindOptionsWhere, In } from 'typeorm'; -import { SystemPermissions, User } from '@attraccess/database-entities'; +import { SystemPermissions, User } from '@fabaccess/database-entities'; import { InjectRepository } from '@nestjs/typeorm'; import { PaginatedResponse } from '../../types/response'; import { PaginationOptions, PaginationOptionsSchema } from '../../types/request'; @@ -212,10 +212,10 @@ export class UsersService { }); this.logger.debug(`Found ${total} total users, returning page ${page} with ${users.length} results`); - + const totalPages = Math.ceil(total / limit); const nextPage = page < totalPages ? page + 1 : null; - + return { data: users, total, @@ -262,10 +262,10 @@ export class UsersService { this.logger.debug( `Found ${total} total users with permission "${permission}", returning page ${page} with ${users.length} results` ); - + const totalPages = Math.ceil(total / limit); const nextPage = page < totalPages ? page + 1 : null; - + return { data: users, total, diff --git a/apps/fabreader-firmware/README.md b/apps/fabreader-firmware/README.md index fe7d495a..c27121ae 100644 --- a/apps/fabreader-firmware/README.md +++ b/apps/fabreader-firmware/README.md @@ -15,7 +15,7 @@ You can install the firmware directly from your web browser using [ESP Web Tools ### Quick Installation 1. Connect your Fabreader device to your computer via USB -2. Visit our [firmware installation page](https://OWNER_NAME.github.io/Attraccess/) (replace OWNER_NAME with your GitHub username) +2. Visit our [firmware installation page](https://OWNER_NAME.github.io/FabAccess/) (replace OWNER_NAME with your GitHub username) 3. Click the "Install" button and follow the on-screen instructions 4. If prompted, select the correct serial port for your device 5. Wait for the installation to complete diff --git a/apps/fabreader-firmware/src/persistence.hpp b/apps/fabreader-firmware/src/persistence.hpp index a34b30bb..43bd63d9 100644 --- a/apps/fabreader-firmware/src/persistence.hpp +++ b/apps/fabreader-firmware/src/persistence.hpp @@ -27,7 +27,7 @@ struct WiFiConfig struct WebConfig { - char admin_password[33] = "attraccess"; // Default admin password + char admin_password[33] = "fabaccess"; // Default admin password }; struct PersistenceData diff --git a/apps/frontend/.DS_Store b/apps/frontend/.DS_Store index 175ed525..82ad545d 100644 Binary files a/apps/frontend/.DS_Store and b/apps/frontend/.DS_Store differ diff --git a/apps/frontend/Attraccess.icon/Assets/key-hole.png b/apps/frontend/Attraccess.icon/Assets/key-hole.png deleted file mode 100644 index b3263c5e..00000000 Binary files a/apps/frontend/Attraccess.icon/Assets/key-hole.png and /dev/null differ diff --git a/apps/frontend/Attraccess.icon/icon.json b/apps/frontend/Attraccess.icon/icon.json deleted file mode 100644 index ac9adb26..00000000 --- a/apps/frontend/Attraccess.icon/icon.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "fill" : { - "linear-gradient" : [ - "display-p3:0.41269,0.47191,0.63101,1.00000", - "srgb:0.21176,0.29804,0.48627,1.00000" - ] - }, - "groups" : [ - { - "layers" : [ - { - "image-name" : "key-hole.png", - "name" : "key-hole", - "position" : { - "scale" : 0.4, - "translation-in-points" : [ - -4.160812805768032, - -8.448852973170581 - ] - } - } - ], - "shadow" : { - "kind" : "neutral", - "opacity" : 0.5 - }, - "translucency" : { - "enabled" : true, - "value" : 0.5 - } - } - ], - "supported-platforms" : { - "circles" : [ - "watchOS" - ], - "squares" : "shared" - } -} \ No newline at end of file diff --git a/apps/frontend/index.html b/apps/frontend/index.html index ab08116e..2f5106b7 100644 --- a/apps/frontend/index.html +++ b/apps/frontend/index.html @@ -2,7 +2,7 @@ - Attraccess + FabAccess diff --git a/apps/frontend/jest.config.ts b/apps/frontend/jest.config.ts index 0346750f..8b8ce92e 100644 --- a/apps/frontend/jest.config.ts +++ b/apps/frontend/jest.config.ts @@ -13,7 +13,7 @@ export default { '\\.svg$': 'identity-obj-proxy', '\\.css$': 'identity-obj-proxy', }, - transformIgnorePatterns: ['node_modules/(?!(@attraccess)/)'], + transformIgnorePatterns: ['node_modules/(?!(@fabaccess)/)'], globals: { 'import.meta': { env: {}, diff --git a/apps/frontend/public/apple-touch-icon.png b/apps/frontend/public/apple-touch-icon.png index 4c9a79da..9e33a868 100644 Binary files a/apps/frontend/public/apple-touch-icon.png and b/apps/frontend/public/apple-touch-icon.png differ diff --git a/apps/frontend/public/favicon.ico b/apps/frontend/public/favicon.ico index 0913a841..3dbdc343 100644 Binary files a/apps/frontend/public/favicon.ico and b/apps/frontend/public/favicon.ico differ diff --git a/apps/frontend/public/icon-192-maskable.png b/apps/frontend/public/icon-192-maskable.png index a2fefec4..244cb115 100644 Binary files a/apps/frontend/public/icon-192-maskable.png and b/apps/frontend/public/icon-192-maskable.png differ diff --git a/apps/frontend/public/icon-192.png b/apps/frontend/public/icon-192.png index 0b87964d..244cb115 100644 Binary files a/apps/frontend/public/icon-192.png and b/apps/frontend/public/icon-192.png differ diff --git a/apps/frontend/public/icon-512-maskable.png b/apps/frontend/public/icon-512-maskable.png index 3bad1a2f..4e802937 100644 Binary files a/apps/frontend/public/icon-512-maskable.png and b/apps/frontend/public/icon-512-maskable.png differ diff --git a/apps/frontend/public/icon-512.png b/apps/frontend/public/icon-512.png index 9b90163f..4e802937 100644 Binary files a/apps/frontend/public/icon-512.png and b/apps/frontend/public/icon-512.png differ diff --git a/apps/frontend/public/logo.png b/apps/frontend/public/logo.png index 25b951f5..4e802937 100644 Binary files a/apps/frontend/public/logo.png and b/apps/frontend/public/logo.png differ diff --git a/apps/frontend/src/api/index.ts b/apps/frontend/src/api/index.ts index 5e18d854..f43efba0 100644 --- a/apps/frontend/src/api/index.ts +++ b/apps/frontend/src/api/index.ts @@ -1,4 +1,4 @@ -import { OpenAPI, CreateSessionResponse } from '@attraccess/react-query-client'; +import { OpenAPI, CreateSessionResponse } from '@fabaccess/react-query-client'; function getInferredApiUrl() { const frontendUrl = new URL(window.location.href); diff --git a/apps/frontend/src/app/account-settings/index.tsx b/apps/frontend/src/app/account-settings/index.tsx index 47853fbd..f79207c9 100644 --- a/apps/frontend/src/app/account-settings/index.tsx +++ b/apps/frontend/src/app/account-settings/index.tsx @@ -1,17 +1,10 @@ import React, { useState } from 'react'; import { PageHeader } from '../../components/pageHeader'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; -import { - Card, - CardBody, - CardHeader, - Input, - Button, - Alert, -} from '@heroui/react'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; +import { Card, CardBody, CardHeader, Input, Button, Alert } from '@heroui/react'; import { UserCog, Mail } from 'lucide-react'; import { useAuth } from '../../hooks/useAuth'; -import { useUsersServiceRequestEmailChange } from '@attraccess/react-query-client'; +import { useUsersServiceRequestEmailChange } from '@fabaccess/react-query-client'; import * as en from './en.json'; import * as de from './de.json'; @@ -32,7 +25,7 @@ export const AccountSettingsPage: React.FC = () => { const handleEmailChangeRequest = async (e: React.FormEvent) => { e.preventDefault(); if (!newEmail.trim()) return; - + await requestEmailChange.mutateAsync({ requestBody: { newEmail }, }); @@ -110,4 +103,4 @@ export const AccountSettingsPage: React.FC = () => { ); -}; \ No newline at end of file +}; diff --git a/apps/frontend/src/app/app.tsx b/apps/frontend/src/app/app.tsx index 56e14ca8..a2a87706 100644 --- a/apps/frontend/src/app/app.tsx +++ b/apps/frontend/src/app/app.tsx @@ -8,11 +8,11 @@ import { useAllRoutes } from './routes'; import { VerifyEmail } from './verifyEmail'; import { ToastProvider } from '../components/toastProvider'; import { HeroUIProvider, Spinner } from '@heroui/react'; -import { SystemPermissions } from '@attraccess/react-query-client'; -import { RouteConfig } from '@attraccess/plugins-frontend-sdk'; +import { SystemPermissions } from '@fabaccess/react-query-client'; +import { RouteConfig } from '@fabaccess/plugins-frontend-sdk'; import PullToRefresh from 'react-simple-pull-to-refresh'; import { useQueryClient } from '@tanstack/react-query'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import de from './app.de.json'; import en from './app.en.json'; import { ResetPassword } from './reset-password/resetPassword'; diff --git a/apps/frontend/src/app/confirm-email-change/index.tsx b/apps/frontend/src/app/confirm-email-change/index.tsx index 89201d86..e72627a7 100644 --- a/apps/frontend/src/app/confirm-email-change/index.tsx +++ b/apps/frontend/src/app/confirm-email-change/index.tsx @@ -1,9 +1,9 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; import { useSearchParams, useNavigate } from 'react-router-dom'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { Card, CardBody, CardHeader, Button, Alert } from '@heroui/react'; import { CheckCircle, AlertCircle } from 'lucide-react'; -import { useUsersServiceConfirmEmailChange } from '@attraccess/react-query-client'; +import { useUsersServiceConfirmEmailChange } from '@fabaccess/react-query-client'; import * as en from './en.json'; import * as de from './de.json'; diff --git a/apps/frontend/src/app/csv-export/csv-export.tsx b/apps/frontend/src/app/csv-export/csv-export.tsx index 65780ba4..eb2db2b7 100644 --- a/apps/frontend/src/app/csv-export/csv-export.tsx +++ b/apps/frontend/src/app/csv-export/csv-export.tsx @@ -1,4 +1,4 @@ -import { useDateTimeFormatter, useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useDateTimeFormatter, useTranslations } from '@fabaccess/plugins-frontend-ui'; import { Button, Card, @@ -82,7 +82,13 @@ export function CsvExport() { - setShowExport(false)} scrollBehavior="inside" size="5xl" data-cy="csv-export-modal"> + setShowExport(false)} + scrollBehavior="inside" + size="5xl" + data-cy="csv-export-modal" + >
diff --git a/apps/frontend/src/app/csv-export/resource-usage/resourceUsageExport.tsx b/apps/frontend/src/app/csv-export/resource-usage/resourceUsageExport.tsx index 529ca3ad..1d8e5406 100644 --- a/apps/frontend/src/app/csv-export/resource-usage/resourceUsageExport.tsx +++ b/apps/frontend/src/app/csv-export/resource-usage/resourceUsageExport.tsx @@ -1,7 +1,7 @@ import { ResourceUsage, useAnalyticsServiceAnalyticsControllerGetResourceUsageHoursInDateRange, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { ExportProps } from '../export-props'; import { Table, @@ -23,7 +23,7 @@ import { useDateTimeFormatter, useNumberFormatter, useTranslations, -} from '@attraccess/plugins-frontend-ui'; +} from '@fabaccess/plugins-frontend-ui'; import { nanoid } from 'nanoid'; import { RotateCwIcon } from 'lucide-react'; import { useReactQueryStatusToHeroUiTableLoadingState } from '../../../hooks/useReactQueryStatusToHeroUiTableLoadingState'; diff --git a/apps/frontend/src/app/dependencies/index.tsx b/apps/frontend/src/app/dependencies/index.tsx index 54037926..71bedd8b 100644 --- a/apps/frontend/src/app/dependencies/index.tsx +++ b/apps/frontend/src/app/dependencies/index.tsx @@ -1,4 +1,4 @@ -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import de from './de.json'; import en from './en.json'; diff --git a/apps/frontend/src/app/email-templates/EditEmailTemplatePage.tsx b/apps/frontend/src/app/email-templates/EditEmailTemplatePage.tsx index 67c27838..d955082c 100644 --- a/apps/frontend/src/app/email-templates/EditEmailTemplatePage.tsx +++ b/apps/frontend/src/app/email-templates/EditEmailTemplatePage.tsx @@ -4,7 +4,7 @@ import { useEmailTemplatesServiceEmailTemplateControllerFindOne as useFindOneEmailTemplate, useEmailTemplatesServiceEmailTemplateControllerUpdate as useUpdateEmailTemplate, useEmailTemplatesServiceEmailTemplateControllerPreviewMjml, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { Button, Card, @@ -19,7 +19,7 @@ import { ModalFooter, Link, } from '@heroui/react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { PageHeader } from '../../components/pageHeader'; import Editor from '@monaco-editor/react'; diff --git a/apps/frontend/src/app/email-templates/EmailTemplatesPage.tsx b/apps/frontend/src/app/email-templates/EmailTemplatesPage.tsx index d6dd6af9..538a7cfd 100644 --- a/apps/frontend/src/app/email-templates/EmailTemplatesPage.tsx +++ b/apps/frontend/src/app/email-templates/EmailTemplatesPage.tsx @@ -1,7 +1,7 @@ -import { useEmailTemplatesServiceEmailTemplateControllerFindAll } from '@attraccess/react-query-client'; +import { useEmailTemplatesServiceEmailTemplateControllerFindAll } from '@fabaccess/react-query-client'; import { Table, TableHeader, TableColumn, TableBody, TableRow, TableCell, Button, Chip } from '@heroui/react'; import { Edit3, Mail } from 'lucide-react'; // Mail for PageHeader icon -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { PageHeader } from '../../components/pageHeader'; // Assuming PageHeader exists import { Link } from 'react-router-dom'; // For edit button link import { TableDataLoadingIndicator } from '../../components/tableComponents'; diff --git a/apps/frontend/src/app/fabreader/FabreaderEditor/FabreaderEditor.tsx b/apps/frontend/src/app/fabreader/FabreaderEditor/FabreaderEditor.tsx index c8536b90..79d026d6 100644 --- a/apps/frontend/src/app/fabreader/FabreaderEditor/FabreaderEditor.tsx +++ b/apps/frontend/src/app/fabreader/FabreaderEditor/FabreaderEditor.tsx @@ -1,4 +1,4 @@ -import { useTranslations, ResourceSelector } from '@attraccess/plugins-frontend-ui'; +import { useTranslations, ResourceSelector } from '@fabaccess/plugins-frontend-ui'; import de from './fabreader-editor.de.json'; import en from './fabreader-editor.en.json'; import { Button, Form, ModalBody, Modal, ModalContent, ModalHeader, ModalFooter } from '@heroui/react'; @@ -9,7 +9,7 @@ import { useFabReaderServiceGetReaderById, useFabReaderServiceGetReadersKey, useFabReaderServiceUpdateReader, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { useToastMessage } from '../../../components/toastProvider'; interface Props { diff --git a/apps/frontend/src/app/fabreader/FabreaderFlashButton/FabreaderFlashButton.tsx b/apps/frontend/src/app/fabreader/FabreaderFlashButton/FabreaderFlashButton.tsx index edd34a6f..c2c3deaa 100644 --- a/apps/frontend/src/app/fabreader/FabreaderFlashButton/FabreaderFlashButton.tsx +++ b/apps/frontend/src/app/fabreader/FabreaderFlashButton/FabreaderFlashButton.tsx @@ -1,5 +1,5 @@ import { Button, ButtonProps } from '@heroui/react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import 'esp-web-tools'; import de from './FabreaderFlashButton.de.json'; import en from './FabreaderFlashButton.en.json'; diff --git a/apps/frontend/src/app/fabreader/FabreaderList/FabreaderList.tsx b/apps/frontend/src/app/fabreader/FabreaderList/FabreaderList.tsx index 786ba802..0237afdf 100644 --- a/apps/frontend/src/app/fabreader/FabreaderList/FabreaderList.tsx +++ b/apps/frontend/src/app/fabreader/FabreaderList/FabreaderList.tsx @@ -3,9 +3,9 @@ import { Alert, Button, Chip, Table, TableBody, TableCell, TableColumn, TableHea import { Cloud, CloudOff, CpuIcon } from 'lucide-react'; import { TableDataLoadingIndicator } from '../../../components/tableComponents'; import { EmptyState } from '../../../components/emptyState'; -import { useDateTimeFormatter, useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useDateTimeFormatter, useTranslations } from '@fabaccess/plugins-frontend-ui'; import { FabreaderEditor } from '../FabreaderEditor/FabreaderEditor'; -import { useFabReaderServiceGetReaders } from '@attraccess/react-query-client'; +import { useFabReaderServiceGetReaders } from '@fabaccess/react-query-client'; import { useToastMessage } from '../../../components/toastProvider'; import { PageHeader } from '../../../components/pageHeader'; import { FabreaderFlasher } from '../FabreaderFlasher/FabreaderFlasher'; diff --git a/apps/frontend/src/app/fabreader/FabreaderSelect/FabreaderSelect.tsx b/apps/frontend/src/app/fabreader/FabreaderSelect/FabreaderSelect.tsx index f8b8ba98..47fe1981 100644 --- a/apps/frontend/src/app/fabreader/FabreaderSelect/FabreaderSelect.tsx +++ b/apps/frontend/src/app/fabreader/FabreaderSelect/FabreaderSelect.tsx @@ -1,4 +1,4 @@ -import { useFabReaderServiceGetReaders } from '@attraccess/react-query-client'; +import { useFabReaderServiceGetReaders } from '@fabaccess/react-query-client'; import { Select, SelectItem } from '@heroui/react'; import { useCallback, useEffect, useState } from 'react'; diff --git a/apps/frontend/src/app/fabreader/NfcCardList/NfcCardList.tsx b/apps/frontend/src/app/fabreader/NfcCardList/NfcCardList.tsx index 343bf767..b6a267e3 100644 --- a/apps/frontend/src/app/fabreader/NfcCardList/NfcCardList.tsx +++ b/apps/frontend/src/app/fabreader/NfcCardList/NfcCardList.tsx @@ -17,14 +17,14 @@ import { Card, } from '@heroui/react'; import { useCallback, useEffect, useMemo, useState } from 'react'; -import { AttraccessUser, useTranslations } from '@attraccess/plugins-frontend-ui'; +import { FabAccessUser, useTranslations } from '@fabaccess/plugins-frontend-ui'; import { useFabReaderServiceGetAllCards, useFabReaderServiceResetNfcCard, NFCCard, useFabReaderServiceEnrollNfcCard, useUsersServiceGetOneUserById, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { FabreaderSelect } from '../FabreaderSelect/FabreaderSelect'; import { useToastMessage } from '../../../components/toastProvider'; import { useAuth } from '../../../hooks/useAuth'; @@ -105,7 +105,7 @@ const NfcCardTableCell = (props: NfcCardTableCellProps) => { }); if (props.header === 'userId') { - return ; + return ; } if (props.header === 'actions') { diff --git a/apps/frontend/src/app/layout/sidebar.tsx b/apps/frontend/src/app/layout/sidebar.tsx index 8f62ceb6..435aa8c8 100644 --- a/apps/frontend/src/app/layout/sidebar.tsx +++ b/apps/frontend/src/app/layout/sidebar.tsx @@ -1,7 +1,7 @@ import React, { useCallback, useMemo } from 'react'; import { X, Settings, LogOut, User, ExternalLink, UserCog } from 'lucide-react'; import { useAuth } from '../../hooks/useAuth'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { Button, Dropdown, @@ -14,7 +14,7 @@ import { LinkProps, } from '@heroui/react'; import { useAllRoutes } from '../routes'; -import { SystemPermissions } from '@attraccess/react-query-client'; +import { SystemPermissions } from '@fabaccess/react-query-client'; import de from './sidebar.de.json'; import en from './sidebar.en.json'; import { Logo } from '../../components/logo'; diff --git a/apps/frontend/src/app/layout/sidebarItems.tsx b/apps/frontend/src/app/layout/sidebarItems.tsx index 17922fc4..55cbe161 100644 --- a/apps/frontend/src/app/layout/sidebarItems.tsx +++ b/apps/frontend/src/app/layout/sidebarItems.tsx @@ -108,7 +108,7 @@ export const useSidebarEndItems = () => { const reportBugUrl = newGithubIssueUrl({ user: 'FabInfra', - repo: 'Attraccess', + repo: 'FabAccess', title: '[Bug] ', labels: ['bug'], body: ` @@ -129,7 +129,7 @@ export const useSidebarEndItems = () => { const requestFeatureUrl = newGithubIssueUrl({ user: 'FabInfra', - repo: 'Attraccess', + repo: 'FabAccess', title: '[Feature Request] ', labels: ['enhancement'], body: ` diff --git a/apps/frontend/src/app/mqtt/MqttServersPage.tsx b/apps/frontend/src/app/mqtt/MqttServersPage.tsx index 287fae0d..2b5c04e1 100644 --- a/apps/frontend/src/app/mqtt/MqttServersPage.tsx +++ b/apps/frontend/src/app/mqtt/MqttServersPage.tsx @@ -1,4 +1,4 @@ -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { Button, Card, CardHeader } from '@heroui/react'; import { Navigate, useNavigate } from 'react-router-dom'; import { Plus } from 'lucide-react'; @@ -29,7 +29,12 @@ export function MqttServersPage() {

{t('title')}

-
diff --git a/apps/frontend/src/app/mqtt/servers/CreateMqttServerPage.tsx b/apps/frontend/src/app/mqtt/servers/CreateMqttServerPage.tsx index 54bd2754..672f1721 100644 --- a/apps/frontend/src/app/mqtt/servers/CreateMqttServerPage.tsx +++ b/apps/frontend/src/app/mqtt/servers/CreateMqttServerPage.tsx @@ -1,4 +1,4 @@ -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { Button, Card, CardHeader, Input, Checkbox, Form } from '@heroui/react'; import { ArrowLeft } from 'lucide-react'; import { PasswordInput } from '../../../components/PasswordInput'; @@ -12,7 +12,7 @@ import { CreateMqttServerDto, UseMqttServiceMqttServersGetAllKeyFn, MqttServer, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { useQueryClient } from '@tanstack/react-query'; interface CreateMqttServerPageProps { diff --git a/apps/frontend/src/app/mqtt/servers/EditMqttServerPage.tsx b/apps/frontend/src/app/mqtt/servers/EditMqttServerPage.tsx index 79d8a938..bcda8cda 100644 --- a/apps/frontend/src/app/mqtt/servers/EditMqttServerPage.tsx +++ b/apps/frontend/src/app/mqtt/servers/EditMqttServerPage.tsx @@ -1,4 +1,4 @@ -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { Button, Card, CardHeader, Input, Checkbox, Spinner } from '@heroui/react'; import { ArrowLeft } from 'lucide-react'; import { PasswordInput } from '../../../components/PasswordInput'; @@ -12,7 +12,7 @@ import { useMqttServiceMqttServersGetOneById, CreateMqttServerDto, UseMqttServiceMqttServersGetAllKeyFn, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { useQueryClient } from '@tanstack/react-query'; export function EditMqttServerPage() { diff --git a/apps/frontend/src/app/mqtt/servers/MqttServerList.tsx b/apps/frontend/src/app/mqtt/servers/MqttServerList.tsx index 53a37388..31481d96 100644 --- a/apps/frontend/src/app/mqtt/servers/MqttServerList.tsx +++ b/apps/frontend/src/app/mqtt/servers/MqttServerList.tsx @@ -1,4 +1,4 @@ -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { Button, Spinner, @@ -19,7 +19,7 @@ import { useMqttServiceMqttServersGetAll, useMqttServiceMqttServersDeleteOne, UseMqttServiceMqttServersGetAllKeyFn, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { useQueryClient } from '@tanstack/react-query'; // Define ServerListItem component inline diff --git a/apps/frontend/src/app/mqtt/servers/translations/create/de.json b/apps/frontend/src/app/mqtt/servers/translations/create/de.json index 39ef6a66..71b702e8 100644 --- a/apps/frontend/src/app/mqtt/servers/translations/create/de.json +++ b/apps/frontend/src/app/mqtt/servers/translations/create/de.json @@ -8,7 +8,7 @@ "portLabel": "Port", "portPlaceholder": "1883", "clientIdLabel": "Client-ID (Optional)", - "clientIdPlaceholder": "attraccess-client", + "clientIdPlaceholder": "fabaccess-client", "usernameLabel": "Benutzername (Optional)", "usernamePlaceholder": "mqtt_benutzer", "passwordLabel": "Passwort (Optional)", @@ -20,4 +20,4 @@ "serverCreatedDesc": "Ein neuer MQTT-Server wurde erfolgreich erstellt.", "errorGeneric": "Fehler", "failedToCreate": "Fehler beim Erstellen des MQTT-Servers." -} \ No newline at end of file +} diff --git a/apps/frontend/src/app/mqtt/servers/translations/create/en.json b/apps/frontend/src/app/mqtt/servers/translations/create/en.json index d81de90f..ec5ab696 100644 --- a/apps/frontend/src/app/mqtt/servers/translations/create/en.json +++ b/apps/frontend/src/app/mqtt/servers/translations/create/en.json @@ -8,7 +8,7 @@ "portLabel": "Port", "portPlaceholder": "1883", "clientIdLabel": "Client ID (Optional)", - "clientIdPlaceholder": "attraccess-client", + "clientIdPlaceholder": "fabaccess-client", "usernameLabel": "Username (Optional)", "usernamePlaceholder": "mqtt_user", "passwordLabel": "Password (Optional)", @@ -20,4 +20,4 @@ "serverCreatedDesc": "A new MQTT server has been successfully created.", "errorGeneric": "Error", "failedToCreate": "Failed to create MQTT server." -} \ No newline at end of file +} diff --git a/apps/frontend/src/app/mqtt/servers/translations/de.json b/apps/frontend/src/app/mqtt/servers/translations/de.json index 1f262852..4d32b9e9 100644 --- a/apps/frontend/src/app/mqtt/servers/translations/de.json +++ b/apps/frontend/src/app/mqtt/servers/translations/de.json @@ -31,7 +31,7 @@ "portLabel": "Port", "portPlaceholder": "1883", "clientIdLabel": "Client-ID (Optional)", - "clientIdPlaceholder": "attraccess-client", + "clientIdPlaceholder": "fabaccess-client", "usernameLabel": "Benutzername (Optional)", "usernamePlaceholder": "mqtt_benutzer", "passwordLabel": "Passwort (Optional)", @@ -61,4 +61,4 @@ "failedToUpdate": "Fehler beim Aktualisieren des MQTT-Servers.", "failedToCreate": "Fehler beim Erstellen des MQTT-Servers.", "failedToConnect": "Verbindung zum MQTT-Server fehlgeschlagen" -} \ No newline at end of file +} diff --git a/apps/frontend/src/app/mqtt/servers/translations/edit/de.json b/apps/frontend/src/app/mqtt/servers/translations/edit/de.json index 9dcd8490..946074fe 100644 --- a/apps/frontend/src/app/mqtt/servers/translations/edit/de.json +++ b/apps/frontend/src/app/mqtt/servers/translations/edit/de.json @@ -8,7 +8,7 @@ "portLabel": "Port", "portPlaceholder": "1883", "clientIdLabel": "Client-ID (Optional)", - "clientIdPlaceholder": "attraccess-client", + "clientIdPlaceholder": "fabaccess-client", "usernameLabel": "Benutzername (Optional)", "usernamePlaceholder": "mqtt_benutzer", "passwordLabel": "Passwort (Optional)", @@ -21,4 +21,4 @@ "errorGeneric": "Fehler", "errorLoading": "Fehler beim Laden der MQTT-Server-Details.", "failedToUpdate": "Fehler beim Aktualisieren des MQTT-Servers." -} \ No newline at end of file +} diff --git a/apps/frontend/src/app/mqtt/servers/translations/edit/en.json b/apps/frontend/src/app/mqtt/servers/translations/edit/en.json index 4ab83867..16fa5863 100644 --- a/apps/frontend/src/app/mqtt/servers/translations/edit/en.json +++ b/apps/frontend/src/app/mqtt/servers/translations/edit/en.json @@ -8,7 +8,7 @@ "portLabel": "Port", "portPlaceholder": "1883", "clientIdLabel": "Client ID (Optional)", - "clientIdPlaceholder": "attraccess-client", + "clientIdPlaceholder": "fabaccess-client", "usernameLabel": "Username (Optional)", "usernamePlaceholder": "mqtt_user", "passwordLabel": "Password (Optional)", @@ -21,4 +21,4 @@ "errorGeneric": "Error", "errorLoading": "Error loading MQTT server details.", "failedToUpdate": "Failed to update MQTT server." -} \ No newline at end of file +} diff --git a/apps/frontend/src/app/mqtt/servers/translations/en.json b/apps/frontend/src/app/mqtt/servers/translations/en.json index 10f207e1..9f1eed55 100644 --- a/apps/frontend/src/app/mqtt/servers/translations/en.json +++ b/apps/frontend/src/app/mqtt/servers/translations/en.json @@ -31,7 +31,7 @@ "portLabel": "Port", "portPlaceholder": "1883", "clientIdLabel": "Client ID (Optional)", - "clientIdPlaceholder": "attraccess-client", + "clientIdPlaceholder": "fabaccess-client", "usernameLabel": "Username (Optional)", "usernamePlaceholder": "mqtt_user", "passwordLabel": "Password (Optional)", @@ -61,4 +61,4 @@ "failedToUpdate": "Failed to update MQTT server.", "failedToCreate": "Failed to create MQTT server.", "failedToConnect": "Failed to connect to MQTT server" -} \ No newline at end of file +} diff --git a/apps/frontend/src/app/plugins/PluginsList.tsx b/apps/frontend/src/app/plugins/PluginsList.tsx index 92f0677f..47d44a11 100644 --- a/apps/frontend/src/app/plugins/PluginsList.tsx +++ b/apps/frontend/src/app/plugins/PluginsList.tsx @@ -1,4 +1,4 @@ -import { usePluginsServiceDeletePlugin, usePluginsServiceGetPlugins } from '@attraccess/react-query-client'; +import { usePluginsServiceDeletePlugin, usePluginsServiceGetPlugins } from '@fabaccess/react-query-client'; import { useState } from 'react'; import { Card, @@ -21,7 +21,7 @@ import { Alert, } from '@heroui/react'; import { Trash2, Upload } from 'lucide-react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { UploadPluginModal } from './UploadPluginModal'; import { useToastMessage } from '../../components/toastProvider'; import { EmptyState } from '../../components/emptyState'; diff --git a/apps/frontend/src/app/plugins/UploadPluginModal.tsx b/apps/frontend/src/app/plugins/UploadPluginModal.tsx index b7847f42..742fd98d 100644 --- a/apps/frontend/src/app/plugins/UploadPluginModal.tsx +++ b/apps/frontend/src/app/plugins/UploadPluginModal.tsx @@ -1,8 +1,8 @@ -import { usePluginsServiceUploadPlugin } from '@attraccess/react-query-client'; +import { usePluginsServiceUploadPlugin } from '@fabaccess/react-query-client'; import { useState, useRef } from 'react'; import { Button, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter, Input } from '@heroui/react'; import { Upload } from 'lucide-react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import en from './UploadPluginModal.en.json'; import de from './UploadPluginModal.de.json'; import { useToastMessage } from '../../components/toastProvider'; diff --git a/apps/frontend/src/app/plugins/plugin-provider.tsx b/apps/frontend/src/app/plugins/plugin-provider.tsx index 525d7552..871bd6d4 100644 --- a/apps/frontend/src/app/plugins/plugin-provider.tsx +++ b/apps/frontend/src/app/plugins/plugin-provider.tsx @@ -1,4 +1,4 @@ -import { OpenAPI, LoadedPluginManifest, usePluginsServiceGetPlugins } from '@attraccess/react-query-client'; +import { OpenAPI, LoadedPluginManifest, usePluginsServiceGetPlugins } from '@fabaccess/react-query-client'; import { PropsWithChildren, useCallback, useEffect, useRef } from 'react'; import { createPluginStore, PluginProvider as PluginProviderBase, RendererPlugin } from 'react-pluggable'; import usePluginState from './plugin.state'; @@ -8,7 +8,7 @@ import { // eslint-disable-next-line // @ts-ignore } from 'virtual:__federation__'; -import { AttraccessFrontendPlugin, AttraccessFrontendPluginAuthData } from '@attraccess/plugins-frontend-sdk'; +import { FabAccessFrontendPlugin, FabAccessFrontendPluginAuthData } from '@fabaccess/plugins-frontend-sdk'; import { ToastType, useToastMessage } from '../../components/toastProvider'; import { useAuth } from '../../hooks/useAuth'; import { getBaseUrl } from '../../api'; @@ -28,13 +28,13 @@ export function PluginProvider(props: PropsWithChildren) { if (isPluginSystemInitialized.current) return; isPluginSystemInitialized.current = true; - console.debug('Attraccess Plugin System: initializing'); + console.debug('FabAccess Plugin System: initializing'); - console.debug('Attraccess Plugin System: installing renderer plugin'); + console.debug('FabAccess Plugin System: installing renderer plugin'); const rendererPlugin = new RendererPlugin(); pluginStore.install(rendererPlugin); - console.debug('Attraccess Plugin System: adding notificationToast function'); + console.debug('FabAccess Plugin System: adding notificationToast function'); pluginStore.addFunction( 'notificationToast', (params: { title: string; description: string; type: ToastType; duration?: number }) => { @@ -48,10 +48,10 @@ export function PluginProvider(props: PropsWithChildren) { ); return () => { - console.debug('Attraccess Plugin System: uninstalling renderer plugin'); + console.debug('FabAccess Plugin System: uninstalling renderer plugin'); pluginStore.uninstall(rendererPlugin.getPluginName()); - console.debug('Attraccess Plugin System: removing notificationToast function'); + console.debug('FabAccess Plugin System: removing notificationToast function'); pluginStore.removeFunction('notificationToast'); // Reset the initialization state on unmount @@ -60,15 +60,15 @@ export function PluginProvider(props: PropsWithChildren) { }, [toast]); const loadPlugin = useCallback( - async (pluginManifest: LoadedPluginManifest, plugin?: AttraccessFrontendPlugin) => { + async (pluginManifest: LoadedPluginManifest, plugin?: FabAccessFrontendPlugin) => { try { if (!plugin) { - console.debug(`Attraccess Plugin System: loading plugin ${pluginManifest.name}`); + console.debug(`FabAccess Plugin System: loading plugin ${pluginManifest.name}`); const entryPointFile = pluginManifest.main.frontend?.entryPoint; if (!entryPointFile) { console.debug( - `Attraccess Plugin System: Plugin ${pluginManifest.name} has no entry point file for frontend, skipping` + `FabAccess Plugin System: Plugin ${pluginManifest.name} has no entry point file for frontend, skipping` ); return; } @@ -89,13 +89,13 @@ export function PluginProvider(props: PropsWithChildren) { } // Initialize the plugin - plugin = new pluginClass() as AttraccessFrontendPlugin; + plugin = new pluginClass() as FabAccessFrontendPlugin; } const pluginName = plugin.getPluginName(); - console.debug(`Attraccess Plugin System: Checking if plugin ${pluginName} is installed`); + console.debug(`FabAccess Plugin System: Checking if plugin ${pluginName} is installed`); if (isInstalled(pluginName)) { - console.debug(`Attraccess Plugin System: Plugin ${pluginName} is already installed, uninstalling first`); + console.debug(`FabAccess Plugin System: Plugin ${pluginName} is already installed, uninstalling first`); pluginStore.uninstall(pluginName); } @@ -108,10 +108,10 @@ export function PluginProvider(props: PropsWithChildren) { }; addPlugin(fullPlugin); - console.debug(`Attraccess Plugin System: Plugin ${pluginName} loaded`); + console.debug(`FabAccess Plugin System: Plugin ${pluginName} loaded`); return fullPlugin; } catch (error) { - console.error(`Attraccess Plugin System: Failed to load plugin: ${pluginManifest.name}`, error); + console.error(`FabAccess Plugin System: Failed to load plugin: ${pluginManifest.name}`, error); } }, [addPlugin, isInstalled] @@ -122,26 +122,26 @@ export function PluginProvider(props: PropsWithChildren) { plugin.plugin.onApiEndpointChange(getBaseUrl()); plugin.plugin.onApiAuthStateChange({ authToken: OpenAPI.TOKEN as string, - user: user as unknown as AttraccessFrontendPluginAuthData['user'], + user: user as unknown as FabAccessFrontendPluginAuthData['user'], }); }); }, [plugins, user]); const loadAllPlugins = useCallback(async () => { if (arePluginsLoaded.current) return; - console.debug('Attraccess Plugin System: Loading all plugins'); + console.debug('FabAccess Plugin System: Loading all plugins'); const plugins = await refetchPlugins(); const pluginsArray = plugins.data ?? []; await Promise.all(pluginsArray.map((manifest) => loadPlugin(manifest))); arePluginsLoaded.current = true; - console.debug('Attraccess Plugin System: All plugins loaded'); + console.debug('FabAccess Plugin System: All plugins loaded'); }, [loadPlugin, refetchPlugins]); useEffect(() => { if (arePluginsLoaded.current) return; - console.debug('Attraccess Plugin System: Refetching plugins'); + console.debug('FabAccess Plugin System: Refetching plugins'); loadAllPlugins(); // We're using the ref as our control mechanism, so the dependency array can be empty diff --git a/apps/frontend/src/app/plugins/plugin.state.ts b/apps/frontend/src/app/plugins/plugin.state.ts index 4efeee1b..3c65e8ec 100644 --- a/apps/frontend/src/app/plugins/plugin.state.ts +++ b/apps/frontend/src/app/plugins/plugin.state.ts @@ -1,9 +1,9 @@ -import { AttraccessFrontendPlugin } from '@attraccess/plugins-frontend-sdk'; -import { LoadedPluginManifest } from '@attraccess/react-query-client'; +import { FabAccessFrontendPlugin } from '@fabaccess/plugins-frontend-sdk'; +import { LoadedPluginManifest } from '@fabaccess/react-query-client'; import { create } from 'zustand'; export interface PluginManifestWithPlugin extends LoadedPluginManifest { - plugin: AttraccessFrontendPlugin; + plugin: FabAccessFrontendPlugin; } interface PluginState { diff --git a/apps/frontend/src/app/reset-password/resetPassword.tsx b/apps/frontend/src/app/reset-password/resetPassword.tsx index f5360840..36276aaf 100644 --- a/apps/frontend/src/app/reset-password/resetPassword.tsx +++ b/apps/frontend/src/app/reset-password/resetPassword.tsx @@ -1,13 +1,13 @@ import { useCallback, useMemo, useState } from 'react'; -import { useUrlQuery } from '@attraccess/plugins-frontend-ui'; +import { useUrlQuery } from '@fabaccess/plugins-frontend-ui'; import { useNavigate } from 'react-router-dom'; import { Loading } from '../loading'; import { Button, Card, CardBody, CardFooter, CardHeader, Form } from '@heroui/react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { PasswordInput } from '../../components/PasswordInput'; import * as en from './en.json'; import * as de from './de.json'; -import { useUsersServiceChangePasswordViaResetToken } from '@attraccess/react-query-client'; +import { useUsersServiceChangePasswordViaResetToken } from '@fabaccess/react-query-client'; import { useToastMessage } from '../../components/toastProvider'; export function ResetPassword() { @@ -60,7 +60,12 @@ export function ResetPassword() {

{t('success.message')}

- diff --git a/apps/frontend/src/app/resource-groups/GroupDetailsForm/index.tsx b/apps/frontend/src/app/resource-groups/GroupDetailsForm/index.tsx index 967788f8..8682a28a 100644 --- a/apps/frontend/src/app/resource-groups/GroupDetailsForm/index.tsx +++ b/apps/frontend/src/app/resource-groups/GroupDetailsForm/index.tsx @@ -7,8 +7,8 @@ import { UseResourcesServiceResourceGroupsGetOneKeyFn, useResourcesServiceResourceGroupsDeleteOne, UseResourcesServiceResourceGroupsGetManyKeyFn, -} from '@attraccess/react-query-client'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +} from '@fabaccess/react-query-client'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { useToastMessage } from '../../../components/toastProvider'; import { useQueryClient } from '@tanstack/react-query'; import * as en from './translations/en.json'; diff --git a/apps/frontend/src/app/resource-groups/IntroducerManagement/index.tsx b/apps/frontend/src/app/resource-groups/IntroducerManagement/index.tsx index d925db96..59703c24 100644 --- a/apps/frontend/src/app/resource-groups/IntroducerManagement/index.tsx +++ b/apps/frontend/src/app/resource-groups/IntroducerManagement/index.tsx @@ -6,8 +6,8 @@ import { useAccessControlServiceResourceGroupIntroducersRevoke, UseAccessControlServiceResourceGroupIntroducersGetManyKeyFn, User, -} from '@attraccess/react-query-client'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +} from '@fabaccess/react-query-client'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { useToastMessage } from '../../../components/toastProvider'; import { useQueryClient } from '@tanstack/react-query'; import * as en from './en.json'; diff --git a/apps/frontend/src/app/resource-groups/IntroductionsManagement/history/index.tsx b/apps/frontend/src/app/resource-groups/IntroductionsManagement/history/index.tsx index fea24aa2..7e7fd925 100644 --- a/apps/frontend/src/app/resource-groups/IntroductionsManagement/history/index.tsx +++ b/apps/frontend/src/app/resource-groups/IntroductionsManagement/history/index.tsx @@ -1,4 +1,4 @@ -import { useAccessControlServiceResourceGroupIntroductionsGetHistory } from '@attraccess/react-query-client'; +import { useAccessControlServiceResourceGroupIntroductionsGetHistory } from '@fabaccess/react-query-client'; import { useEffect } from 'react'; import { IntroductionHistoryModal } from '../../../../components/IntroductionsManagement/history'; diff --git a/apps/frontend/src/app/resource-groups/IntroductionsManagement/index.tsx b/apps/frontend/src/app/resource-groups/IntroductionsManagement/index.tsx index c405147d..0987ca05 100644 --- a/apps/frontend/src/app/resource-groups/IntroductionsManagement/index.tsx +++ b/apps/frontend/src/app/resource-groups/IntroductionsManagement/index.tsx @@ -8,8 +8,8 @@ import { useAccessControlServiceResourceGroupIntroductionsGrant, useAccessControlServiceResourceGroupIntroductionsRevoke, User, -} from '@attraccess/react-query-client'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +} from '@fabaccess/react-query-client'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { useToastMessage } from '../../../components/toastProvider'; import { useQueryClient } from '@tanstack/react-query'; import * as en from './en.json'; diff --git a/apps/frontend/src/app/resource-groups/index.tsx b/apps/frontend/src/app/resource-groups/index.tsx index d6f22df8..04dbdc75 100644 --- a/apps/frontend/src/app/resource-groups/index.tsx +++ b/apps/frontend/src/app/resource-groups/index.tsx @@ -1,6 +1,6 @@ import { useParams } from 'react-router-dom'; -import { useResourcesServiceResourceGroupsGetOne } from '@attraccess/react-query-client'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useResourcesServiceResourceGroupsGetOne } from '@fabaccess/react-query-client'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { PageHeader } from '../../components/pageHeader'; import { GroupDetailsForm } from './GroupDetailsForm'; import { ResoureGroupIntroducerManagement } from './IntroducerManagement'; diff --git a/apps/frontend/src/app/resource-groups/upsertModal/resourceGroupUpsertModal.tsx b/apps/frontend/src/app/resource-groups/upsertModal/resourceGroupUpsertModal.tsx index dba44688..64d71d15 100644 --- a/apps/frontend/src/app/resource-groups/upsertModal/resourceGroupUpsertModal.tsx +++ b/apps/frontend/src/app/resource-groups/upsertModal/resourceGroupUpsertModal.tsx @@ -10,7 +10,7 @@ import { ModalHeader, useDisclosure, } from '@heroui/react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import * as en from './resourceGroupUpsertModal.en.json'; import * as de from './resourceGroupUpsertModal.de.json'; import { @@ -20,7 +20,7 @@ import { useResourcesServiceResourceGroupsUpdateOne, UpdateResourceGroupDto, useResourcesServiceResourceGroupsGetManyKey, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { useQueryClient } from '@tanstack/react-query'; import { AxiosError } from 'axios'; import { useToastMessage } from '../../../components/toastProvider'; diff --git a/apps/frontend/src/app/resourceOverview/index.tsx b/apps/frontend/src/app/resourceOverview/index.tsx index 9be0b74d..0a7c795c 100644 --- a/apps/frontend/src/app/resourceOverview/index.tsx +++ b/apps/frontend/src/app/resourceOverview/index.tsx @@ -1,7 +1,7 @@ import { useResourcesServiceResourceGroupsGetMany, useResourcesServiceGetAllResources, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { Toolbar } from './toolbar/toolbar'; import { ResourceGroupCard } from './resourceGroupCard'; import { useCallback, useMemo, useState } from 'react'; diff --git a/apps/frontend/src/app/resourceOverview/resourceGroupCard/index.tsx b/apps/frontend/src/app/resourceOverview/resourceGroupCard/index.tsx index c4221820..1c31366a 100644 --- a/apps/frontend/src/app/resourceOverview/resourceGroupCard/index.tsx +++ b/apps/frontend/src/app/resourceOverview/resourceGroupCard/index.tsx @@ -2,7 +2,7 @@ import { useAccessControlServiceResourceGroupIntroducersIsIntroducer, useResourcesServiceGetAllResources, useResourcesServiceResourceGroupsGetOne, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { Button, Card, @@ -28,7 +28,7 @@ import { useMemo, useState } from 'react'; import { filenameToUrl } from '../../../api'; import { StatusChip } from './statusChip'; import { ChevronRightIcon, Settings2Icon } from 'lucide-react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { useAuth } from '../../../hooks/useAuth'; import { useDebounce } from '../../../hooks/useDebounce'; import { FilterProps } from '../filterProps'; diff --git a/apps/frontend/src/app/resourceOverview/resourceGroupCard/statusChip/index.tsx b/apps/frontend/src/app/resourceOverview/resourceGroupCard/statusChip/index.tsx index 2546b955..20281653 100644 --- a/apps/frontend/src/app/resourceOverview/resourceGroupCard/statusChip/index.tsx +++ b/apps/frontend/src/app/resourceOverview/resourceGroupCard/statusChip/index.tsx @@ -1,5 +1,5 @@ -import { useTranslations } from '@attraccess/plugins-frontend-ui'; -import { useResourcesServiceResourceUsageGetActiveSession } from '@attraccess/react-query-client'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; +import { useResourcesServiceResourceUsageGetActiveSession } from '@fabaccess/react-query-client'; import { Chip } from '@heroui/react'; import { useMemo } from 'react'; diff --git a/apps/frontend/src/app/resourceOverview/toolbar/filter/index.tsx b/apps/frontend/src/app/resourceOverview/toolbar/filter/index.tsx index 633a2828..c0f96c64 100644 --- a/apps/frontend/src/app/resourceOverview/toolbar/filter/index.tsx +++ b/apps/frontend/src/app/resourceOverview/toolbar/filter/index.tsx @@ -1,4 +1,4 @@ -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { DrawerBody, Drawer, DrawerContent, DrawerHeader, useDisclosure, Switch } from '@heroui/react'; import de from './de.json'; diff --git a/apps/frontend/src/app/resourceOverview/toolbar/scanner/index.tsx b/apps/frontend/src/app/resourceOverview/toolbar/scanner/index.tsx index 023c8228..793d3008 100644 --- a/apps/frontend/src/app/resourceOverview/toolbar/scanner/index.tsx +++ b/apps/frontend/src/app/resourceOverview/toolbar/scanner/index.tsx @@ -3,7 +3,7 @@ import { Scanner, IDetectedBarcode, boundingBox } from '@yudiel/react-qr-scanner import { useToastMessage } from '../../../../components/toastProvider'; import { useCallback } from 'react'; import { useNavigate } from 'react-router-dom'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import de from './de.json'; import en from './en.json'; diff --git a/apps/frontend/src/app/resourceOverview/toolbar/toolbar.tsx b/apps/frontend/src/app/resourceOverview/toolbar/toolbar.tsx index 3b563cba..80ee6548 100644 --- a/apps/frontend/src/app/resourceOverview/toolbar/toolbar.tsx +++ b/apps/frontend/src/app/resourceOverview/toolbar/toolbar.tsx @@ -3,7 +3,7 @@ import { Input } from '@heroui/input'; import { SearchIcon, PlusIcon, ScanQrCodeIcon, ListFilterIcon } from 'lucide-react'; import { ResourceGroupUpsertModal } from '../../resource-groups/upsertModal/resourceGroupUpsertModal'; import { useAuth } from '../../../hooks/useAuth'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { ResourceEditModal } from '../../resources/editModal/resourceEditModal'; import { useNavigate } from 'react-router-dom'; diff --git a/apps/frontend/src/app/resources/IntroducerManagement/index.tsx b/apps/frontend/src/app/resources/IntroducerManagement/index.tsx index d5810af2..eb9d3416 100644 --- a/apps/frontend/src/app/resources/IntroducerManagement/index.tsx +++ b/apps/frontend/src/app/resources/IntroducerManagement/index.tsx @@ -6,8 +6,8 @@ import { useAccessControlServiceResourceIntroducersRevoke, UseAccessControlServiceResourceIntroducersGetManyKeyFn, User, -} from '@attraccess/react-query-client'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +} from '@fabaccess/react-query-client'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { useToastMessage } from '../../../components/toastProvider'; import { useQueryClient } from '@tanstack/react-query'; import * as en from './en.json'; diff --git a/apps/frontend/src/app/resources/IntroductionsManagement/history/index.tsx b/apps/frontend/src/app/resources/IntroductionsManagement/history/index.tsx index 71268960..6c0203e5 100644 --- a/apps/frontend/src/app/resources/IntroductionsManagement/history/index.tsx +++ b/apps/frontend/src/app/resources/IntroductionsManagement/history/index.tsx @@ -1,4 +1,4 @@ -import { useAccessControlServiceResourceIntroductionsGetHistory } from '@attraccess/react-query-client'; +import { useAccessControlServiceResourceIntroductionsGetHistory } from '@fabaccess/react-query-client'; import { useEffect } from 'react'; import { IntroductionHistoryModal } from '../../../../components/IntroductionsManagement/history'; diff --git a/apps/frontend/src/app/resources/IntroductionsManagement/index.tsx b/apps/frontend/src/app/resources/IntroductionsManagement/index.tsx index 19dd82ba..e58a1895 100644 --- a/apps/frontend/src/app/resources/IntroductionsManagement/index.tsx +++ b/apps/frontend/src/app/resources/IntroductionsManagement/index.tsx @@ -8,8 +8,8 @@ import { useAccessControlServiceResourceIntroductionsGrant, useAccessControlServiceResourceIntroductionsRevoke, User, -} from '@attraccess/react-query-client'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +} from '@fabaccess/react-query-client'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { useToastMessage } from '../../../components/toastProvider'; import { useQueryClient } from '@tanstack/react-query'; import * as en from './en.json'; diff --git a/apps/frontend/src/app/resources/details/qrcode/index.tsx b/apps/frontend/src/app/resources/details/qrcode/index.tsx index c821816a..d14ed6de 100644 --- a/apps/frontend/src/app/resources/details/qrcode/index.tsx +++ b/apps/frontend/src/app/resources/details/qrcode/index.tsx @@ -14,7 +14,7 @@ import { QrCodeIcon } from 'lucide-react'; import { useCallback, useMemo, useState } from 'react'; import { QRCode } from 'react-qrcode-logo'; import { Select } from '../../../../components/select'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { QrCodeAction } from './action'; import de from './de.json'; diff --git a/apps/frontend/src/app/resources/details/resourceDetails.tsx b/apps/frontend/src/app/resources/details/resourceDetails.tsx index c271ebd2..8ab6ec3d 100644 --- a/apps/frontend/src/app/resources/details/resourceDetails.tsx +++ b/apps/frontend/src/app/resources/details/resourceDetails.tsx @@ -9,14 +9,14 @@ import { ResourceUsageSession } from '../usage/resourceUsageSession'; import { ResourceUsageHistory } from '../usage/resourceUsageHistory'; import { PageHeader } from '../../../components/pageHeader'; import { DeleteConfirmationModal } from '../../../components/deleteConfirmationModal'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { memo, useMemo } from 'react'; import { useResourcesServiceDeleteOneResource, useResourcesServiceGetOneResourceById, UseResourcesServiceGetAllResourcesKeyFn, useAccessControlServiceResourceIntroducersIsIntroducer, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { useQueryClient } from '@tanstack/react-query'; import { ManageResourceGroups } from '../groups'; import { DocumentationModal } from '../documentation'; diff --git a/apps/frontend/src/app/resources/details/useQrCodeAction.ts b/apps/frontend/src/app/resources/details/useQrCodeAction.ts index 6144da7b..81d6b792 100644 --- a/apps/frontend/src/app/resources/details/useQrCodeAction.ts +++ b/apps/frontend/src/app/resources/details/useQrCodeAction.ts @@ -1,4 +1,4 @@ -import { useTranslations, useUrlQuery } from '@attraccess/plugins-frontend-ui'; +import { useTranslations, useUrlQuery } from '@fabaccess/plugins-frontend-ui'; import { useCallback, useEffect, useRef } from 'react'; import { QrCodeAction } from './qrcode/action'; import { @@ -6,7 +6,7 @@ import { useResourcesServiceResourceUsageEndSession, UseResourcesServiceResourceUsageGetActiveSessionKeyFn, UseResourcesServiceResourceUsageGetHistoryKeyFn, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { useQueryClient } from '@tanstack/react-query'; import { useToastMessage } from '../../../components/toastProvider'; diff --git a/apps/frontend/src/app/resources/documentation/DocumentationEditor.tsx b/apps/frontend/src/app/resources/documentation/DocumentationEditor.tsx index e924b3d0..a1d7c5c3 100644 --- a/apps/frontend/src/app/resources/documentation/DocumentationEditor.tsx +++ b/apps/frontend/src/app/resources/documentation/DocumentationEditor.tsx @@ -14,7 +14,7 @@ import { Tabs, Textarea, } from '@heroui/react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { ArrowLeft, Save } from 'lucide-react'; import { useToastMessage } from '../../../components/toastProvider'; import { PageHeader } from '../../../components/pageHeader'; @@ -23,7 +23,7 @@ import { useResourcesServiceUpdateOneResource, UseResourcesServiceGetOneResourceByIdKeyFn, documentationType as DocumentationType, // alias for local usage -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import ReactMarkdown from 'react-markdown'; import en from './documentationEditor.en.json'; import de from './documentationEditor.de.json'; diff --git a/apps/frontend/src/app/resources/documentation/DocumentationModal.tsx b/apps/frontend/src/app/resources/documentation/DocumentationModal.tsx index d107a03e..c14d7669 100644 --- a/apps/frontend/src/app/resources/documentation/DocumentationModal.tsx +++ b/apps/frontend/src/app/resources/documentation/DocumentationModal.tsx @@ -9,10 +9,10 @@ import { Spinner, useDisclosure, } from '@heroui/react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { Edit, ExternalLink, Maximize, Minimize, RefreshCw } from 'lucide-react'; import { useNavigate } from 'react-router-dom'; -import { useResourcesServiceGetOneResourceById } from '@attraccess/react-query-client'; +import { useResourcesServiceGetOneResourceById } from '@fabaccess/react-query-client'; import en from './documentationModal.en.json'; import de from './documentationModal.de.json'; import ReactMarkdown from 'react-markdown'; diff --git a/apps/frontend/src/app/resources/documentation/DocumentationView.tsx b/apps/frontend/src/app/resources/documentation/DocumentationView.tsx index c2a62202..213e6bbd 100644 --- a/apps/frontend/src/app/resources/documentation/DocumentationView.tsx +++ b/apps/frontend/src/app/resources/documentation/DocumentationView.tsx @@ -1,10 +1,10 @@ import { memo, useCallback } from 'react'; import { useNavigate, useParams } from 'react-router-dom'; import { Button, Card, CardBody, CardFooter, CardHeader, Spinner } from '@heroui/react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { ArrowLeft, Edit, RefreshCw } from 'lucide-react'; import { PageHeader } from '../../../components/pageHeader'; -import { useResourcesServiceGetOneResourceById } from '@attraccess/react-query-client'; +import { useResourcesServiceGetOneResourceById } from '@fabaccess/react-query-client'; import ReactMarkdown from 'react-markdown'; import en from './documentationModal.en.json'; import de from './documentationModal.de.json'; diff --git a/apps/frontend/src/app/resources/editModal/resourceEditModal.tsx b/apps/frontend/src/app/resources/editModal/resourceEditModal.tsx index d5586cd0..ff4da01a 100644 --- a/apps/frontend/src/app/resources/editModal/resourceEditModal.tsx +++ b/apps/frontend/src/app/resources/editModal/resourceEditModal.tsx @@ -11,7 +11,7 @@ import { Switch, useDisclosure, } from '@heroui/react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import * as en from './resourceEditModal.en.json'; import * as de from './resourceEditModal.de.json'; import { @@ -22,7 +22,7 @@ import { useResourcesServiceGetOneResourceById, UseResourcesServiceGetOneResourceByIdKeyFn, useResourcesServiceCreateOneResource, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { useQueryClient } from '@tanstack/react-query'; import { ImageUpload } from '../../../components/imageUpload'; import { useToastMessage } from '../../../components/toastProvider'; diff --git a/apps/frontend/src/app/resources/groups/index.tsx b/apps/frontend/src/app/resources/groups/index.tsx index ee0a2ef3..6527353a 100644 --- a/apps/frontend/src/app/resources/groups/index.tsx +++ b/apps/frontend/src/app/resources/groups/index.tsx @@ -7,7 +7,7 @@ import { useResourcesServiceResourceGroupsAddResource, useResourcesServiceResourceGroupsGetMany, useResourcesServiceResourceGroupsRemoveResource, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { Button, Card, @@ -24,7 +24,7 @@ import { } from '@heroui/react'; import { TableDataLoadingIndicator } from '../../../components/tableComponents'; import { EmptyState } from '../../../components/emptyState'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { GroupIcon, PlusIcon, Trash2Icon } from 'lucide-react'; import { useQueryClient } from '@tanstack/react-query'; import { PageHeader } from '../../../components/pageHeader'; diff --git a/apps/frontend/src/app/resources/iot-settings/esphome/ESPHomeConfigurationPanel.tsx b/apps/frontend/src/app/resources/iot-settings/esphome/ESPHomeConfigurationPanel.tsx index 4317461d..3408746f 100644 --- a/apps/frontend/src/app/resources/iot-settings/esphome/ESPHomeConfigurationPanel.tsx +++ b/apps/frontend/src/app/resources/iot-settings/esphome/ESPHomeConfigurationPanel.tsx @@ -1,10 +1,10 @@ import { Card, Accordion, AccordionItem, CardBody, Snippet, Link, Alert } from '@heroui/react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import * as en from './translations/en'; import * as de from './translations/de'; import { useMemo, useState } from 'react'; import { ExternalLink, InfoIcon } from 'lucide-react'; -import { useResourcesServiceGetOneResourceById } from '@attraccess/react-query-client'; +import { useResourcesServiceGetOneResourceById } from '@fabaccess/react-query-client'; import { getBaseUrl } from '../../../../api'; function useEspHomeConfigSnippet(resourceId: number) { @@ -34,30 +34,30 @@ function useEspHomeConfigSnippet(resourceId: number) { return `external_components: - source: type: git - url: https://github.com/FabInfra/Attraccess-esphome-components.git - components: [attraccess_resource] + url: https://github.com/FabInfra/FabAccess-esphome-components.git + components: [fabaccess_resource] - attraccess_resource: + fabaccess_resource: id: ${formatEspHomeId(resource?.name)} api_url: ${apiBaseUrl} resource_id: "${resource?.id || 'resource_id'}" # Add text sensor to show human-readable status text_sensor: - - platform: attraccess_resource + - platform: fabaccess_resource resource: ${formatEspHomeId(resource?.name)} name: "${resource?.name || 'Resource'} Status" id: ${formatEspHomeId(resource?.name)}_status binary_sensor: - - platform: attraccess_resource + - platform: fabaccess_resource resource: ${formatEspHomeId(resource?.name)} # Monitor if API connection is available availability: - name: "Attraccess API Availability" - id: attraccess_api_availability + name: "FabAccess API Availability" + id: fabaccess_api_availability # Monitor actual resource usage in_use: @@ -124,7 +124,7 @@ export function ESPHomeConfigurationPanel(props: ESPHomeConfigurationPanelProps)
(); diff --git a/apps/frontend/src/app/resources/iot-settings/mqtt/MqttConfigurationPanel.tsx b/apps/frontend/src/app/resources/iot-settings/mqtt/MqttConfigurationPanel.tsx index ad92f410..261576b5 100644 --- a/apps/frontend/src/app/resources/iot-settings/mqtt/MqttConfigurationPanel.tsx +++ b/apps/frontend/src/app/resources/iot-settings/mqtt/MqttConfigurationPanel.tsx @@ -1,4 +1,4 @@ -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import de from './de.json'; import en from './en.json'; import { Button, Card, CardHeader } from '@heroui/react'; diff --git a/apps/frontend/src/app/resources/iot-settings/mqtt/components/MqttConfigForm.tsx b/apps/frontend/src/app/resources/iot-settings/mqtt/components/MqttConfigForm.tsx index 45d4c4c4..8124f001 100644 --- a/apps/frontend/src/app/resources/iot-settings/mqtt/components/MqttConfigForm.tsx +++ b/apps/frontend/src/app/resources/iot-settings/mqtt/components/MqttConfigForm.tsx @@ -1,5 +1,5 @@ import React, { useCallback, useEffect, useState } from 'react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { Button, Card, @@ -23,7 +23,7 @@ import { UseMqttServiceMqttResourceConfigGetAllKeyFn, UseMqttServiceMqttResourceConfigGetOneKeyFn, MqttResourceConfig, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { useNavigate } from 'react-router-dom'; import { useToastMessage } from '../../../../../components/toastProvider'; import en from '../translations/configForm.en.json'; diff --git a/apps/frontend/src/app/resources/iot-settings/mqtt/components/MqttConfigList.tsx b/apps/frontend/src/app/resources/iot-settings/mqtt/components/MqttConfigList.tsx index d7c9864a..1452e1cd 100644 --- a/apps/frontend/src/app/resources/iot-settings/mqtt/components/MqttConfigList.tsx +++ b/apps/frontend/src/app/resources/iot-settings/mqtt/components/MqttConfigList.tsx @@ -1,10 +1,10 @@ -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { Accordion, AccordionItem, Alert, Button, Skeleton } from '@heroui/react'; import { useMqttServiceMqttResourceConfigGetAll, useMqttServiceMqttResourceConfigDeleteOne, useResourcesServiceGetOneResourceById, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { useNavigate } from 'react-router-dom'; import { useToastMessage } from '../../../../../components/toastProvider'; import en from '../translations/configList.en.json'; diff --git a/apps/frontend/src/app/resources/iot-settings/mqtt/pages/TestMqttConfig.tsx b/apps/frontend/src/app/resources/iot-settings/mqtt/pages/TestMqttConfig.tsx index c42d69be..09369dd6 100644 --- a/apps/frontend/src/app/resources/iot-settings/mqtt/pages/TestMqttConfig.tsx +++ b/apps/frontend/src/app/resources/iot-settings/mqtt/pages/TestMqttConfig.tsx @@ -1,11 +1,11 @@ import React, { useState } from 'react'; import { useParams, useNavigate } from 'react-router-dom'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { Button, Card, Alert, Spinner } from '@heroui/react'; import { useMqttServiceMqttResourceConfigGetOne, useMqttServiceMqttResourceConfigTestOne, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import en from '../translations/configTest.en.json'; import de from '../translations/configTest.de.json'; diff --git a/apps/frontend/src/app/resources/iot-settings/webhooks/WebhookConfigurationPanel.tsx b/apps/frontend/src/app/resources/iot-settings/webhooks/WebhookConfigurationPanel.tsx index 6b2fa1f4..3ca13bdc 100644 --- a/apps/frontend/src/app/resources/iot-settings/webhooks/WebhookConfigurationPanel.tsx +++ b/apps/frontend/src/app/resources/iot-settings/webhooks/WebhookConfigurationPanel.tsx @@ -1,5 +1,5 @@ import { Card, Accordion, AccordionItem, CardBody, Button } from '@heroui/react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import * as en from './translations/en'; import * as de from './translations/de'; import WebhookList from './components/WebhookList'; @@ -37,7 +37,13 @@ export function WebhookConfigurationPanel(props: WebhookConfigurationPanelProps) {t('title')} {isOpen && ( - )} diff --git a/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookAdvancedSettings.tsx b/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookAdvancedSettings.tsx index 1871fb67..ddbe701b 100644 --- a/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookAdvancedSettings.tsx +++ b/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookAdvancedSettings.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Switch, NumberInput, Divider } from '@heroui/react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { useWebhookForm } from '../context/WebhookFormContext'; // Translations for this component only diff --git a/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookBasicSettings.tsx b/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookBasicSettings.tsx index 08f40a13..39ef1df1 100644 --- a/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookBasicSettings.tsx +++ b/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookBasicSettings.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Input, Textarea, Select, SelectItem, Switch } from '@heroui/react'; // Added Switch -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { useWebhookForm } from '../context/WebhookFormContext'; import { WebhookHttpMethod } from '../types'; diff --git a/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookCreateModal.tsx b/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookCreateModal.tsx index 44a6bc85..1be3cd99 100644 --- a/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookCreateModal.tsx +++ b/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookCreateModal.tsx @@ -1,6 +1,6 @@ import { Modal, ModalContent, ModalHeader, ModalBody } from '@heroui/modal'; import WebhookForm from './WebhookForm'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import * as de from '../translations/de'; import * as en from '../translations/en'; diff --git a/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookForm.tsx b/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookForm.tsx index 5474257c..0ee9224e 100644 --- a/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookForm.tsx +++ b/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookForm.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from 'react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { WebhookFormValues, defaultFormValues, webhookToFormValues } from '../types'; import { WebhookFormProvider } from '../context/WebhookFormContext'; import WebhookBasicSettings from './WebhookBasicSettings'; @@ -14,7 +14,7 @@ import { useWebhooksServiceWebhookConfigGetOneById, useWebhooksServiceWebhookConfigUpdateOne, UseWebhooksServiceWebhookConfigGetAllKeyFn, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { useQueryClient } from '@tanstack/react-query'; import { useToastMessage } from '../../../../../components/toastProvider'; diff --git a/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookFormActions.tsx b/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookFormActions.tsx index 1a5f8e29..d56542bc 100644 --- a/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookFormActions.tsx +++ b/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookFormActions.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import { Button } from '@heroui/react'; import { Trash2, RefreshCw, Save } from 'lucide-react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { useWebhookForm } from '../context/WebhookFormContext'; // Translations for this component only @@ -10,7 +10,7 @@ import de from './WebhookFormActions.de.json'; import { useWebhooksServiceWebhookConfigDeleteOne, useWebhooksServiceWebhookConfigTest, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { useToastMessage } from '../../../../../components/toastProvider'; interface WebhookFormActionsProps { diff --git a/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookList.tsx b/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookList.tsx index 4e4b1cb3..711d1ca8 100644 --- a/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookList.tsx +++ b/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookList.tsx @@ -1,10 +1,10 @@ import React from 'react'; import { Accordion, AccordionItem, Alert, Skeleton, Chip } from '@heroui/react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import * as en from '../translations/en'; import * as de from '../translations/de'; import WebhookForm from './WebhookForm'; -import { useWebhooksServiceWebhookConfigGetAll } from '@attraccess/react-query-client'; +import { useWebhooksServiceWebhookConfigGetAll } from '@fabaccess/react-query-client'; // Types interface WebhookListProps { diff --git a/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookSecurityInfo.tsx b/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookSecurityInfo.tsx index 199810f1..81c2c30a 100644 --- a/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookSecurityInfo.tsx +++ b/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookSecurityInfo.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Alert, Link } from '@heroui/react'; import { HelpCircle } from 'lucide-react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import * as en from '../translations/en'; import * as de from '../translations/de'; diff --git a/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookTemplateEditor.tsx b/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookTemplateEditor.tsx index 15b4a50b..0cc4e0cd 100644 --- a/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookTemplateEditor.tsx +++ b/apps/frontend/src/app/resources/iot-settings/webhooks/components/WebhookTemplateEditor.tsx @@ -1,6 +1,6 @@ import React, { useCallback, useMemo } from 'react'; import { Textarea, Accordion, AccordionItem, Snippet } from '@heroui/react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { useWebhookForm } from '../context/WebhookFormContext'; import { templateVariables } from '../types'; import { useTemplatePreview } from '../hooks/useTemplatePreview'; diff --git a/apps/frontend/src/app/resources/iot-settings/webhooks/hooks/useTemplatePreview.ts b/apps/frontend/src/app/resources/iot-settings/webhooks/hooks/useTemplatePreview.ts index 2eeba213..a9f1c104 100644 --- a/apps/frontend/src/app/resources/iot-settings/webhooks/hooks/useTemplatePreview.ts +++ b/apps/frontend/src/app/resources/iot-settings/webhooks/hooks/useTemplatePreview.ts @@ -1,4 +1,4 @@ -import { useResourcesServiceGetOneResourceById } from '@attraccess/react-query-client'; +import { useResourcesServiceGetOneResourceById } from '@fabaccess/react-query-client'; import { useAuth } from '../../../../../hooks/useAuth'; export const useTemplatePreview = (resourceId: number) => { diff --git a/apps/frontend/src/app/resources/iot-settings/webhooks/types.ts b/apps/frontend/src/app/resources/iot-settings/webhooks/types.ts index 13de7b5e..f0fac3a0 100644 --- a/apps/frontend/src/app/resources/iot-settings/webhooks/types.ts +++ b/apps/frontend/src/app/resources/iot-settings/webhooks/types.ts @@ -1,4 +1,4 @@ -import { WebhookConfigResponseDto } from '@attraccess/react-query-client'; +import { WebhookConfigResponseDto } from '@fabaccess/react-query-client'; // Define WebhookHttpMethod enum matching the backend export enum WebhookHttpMethod { diff --git a/apps/frontend/src/app/resources/usage/components/ActiveSessionDisplay/index.tsx b/apps/frontend/src/app/resources/usage/components/ActiveSessionDisplay/index.tsx index 2afb5400..18db3123 100644 --- a/apps/frontend/src/app/resources/usage/components/ActiveSessionDisplay/index.tsx +++ b/apps/frontend/src/app/resources/usage/components/ActiveSessionDisplay/index.tsx @@ -1,7 +1,7 @@ import { useState, useCallback } from 'react'; import { Button, ButtonGroup, Dropdown, DropdownTrigger, DropdownMenu, DropdownItem } from '@heroui/react'; import { StopCircle, ChevronDownIcon } from 'lucide-react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { useToastMessage } from '../../../../../components/toastProvider'; import { SessionTimer } from '../SessionTimer'; import { SessionNotesModal, SessionModalMode } from '../SessionNotesModal'; @@ -9,7 +9,7 @@ import { useResourcesServiceResourceUsageEndSession, UseResourcesServiceResourceUsageGetActiveSessionKeyFn, UseResourcesServiceResourceUsageGetHistoryKeyFn, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { useQueryClient } from '@tanstack/react-query'; import * as en from './translations/en.json'; import * as de from './translations/de.json'; diff --git a/apps/frontend/src/app/resources/usage/components/HistoryHeader/index.tsx b/apps/frontend/src/app/resources/usage/components/HistoryHeader/index.tsx index 29b86a7b..6f0c7d5b 100644 --- a/apps/frontend/src/app/resources/usage/components/HistoryHeader/index.tsx +++ b/apps/frontend/src/app/resources/usage/components/HistoryHeader/index.tsx @@ -1,7 +1,7 @@ import { memo } from 'react'; import { Checkbox } from '@heroui/react'; import { History, Users } from 'lucide-react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import * as en from './translations/en'; import * as de from './translations/de'; diff --git a/apps/frontend/src/app/resources/usage/components/HistoryTable/index.tsx b/apps/frontend/src/app/resources/usage/components/HistoryTable/index.tsx index 3226eaae..e8a0fb84 100644 --- a/apps/frontend/src/app/resources/usage/components/HistoryTable/index.tsx +++ b/apps/frontend/src/app/resources/usage/components/HistoryTable/index.tsx @@ -1,9 +1,9 @@ import { useCallback, useMemo, useState } from 'react'; import { Table, TableHeader, TableBody, TableRow, Pagination } from '@heroui/react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { generateHeaderColumns } from './utils/tableHeaders'; import { generateRowCells } from './utils/tableRows'; -import { useResourcesServiceResourceUsageGetHistory, ResourceUsage } from '@attraccess/react-query-client'; +import { useResourcesServiceResourceUsageGetHistory, ResourceUsage } from '@fabaccess/react-query-client'; import { useAuth } from '../../../../../hooks/useAuth'; import { Select } from '../../../../../components/select'; import { TableDataLoadingIndicator } from '../../../../../components/tableComponents'; diff --git a/apps/frontend/src/app/resources/usage/components/HistoryTable/utils/tableRows.tsx b/apps/frontend/src/app/resources/usage/components/HistoryTable/utils/tableRows.tsx index 881f3b11..8848d494 100644 --- a/apps/frontend/src/app/resources/usage/components/HistoryTable/utils/tableRows.tsx +++ b/apps/frontend/src/app/resources/usage/components/HistoryTable/utils/tableRows.tsx @@ -1,10 +1,10 @@ import React, { ReactElement } from 'react'; import { TableCell, Chip } from '@heroui/react'; -import { ResourceUsage } from '@attraccess/react-query-client'; +import { ResourceUsage } from '@fabaccess/react-query-client'; import { TFunction } from 'i18next'; -import { DurationDisplay, DateTimeDisplay } from '@attraccess/plugins-frontend-ui'; +import { DurationDisplay, DateTimeDisplay } from '@fabaccess/plugins-frontend-ui'; import { MessageSquareText } from 'lucide-react'; -import { AttraccessUser } from '@attraccess/plugins-frontend-ui'; +import { FabAccessUser } from '@fabaccess/plugins-frontend-ui'; /** * Generates table row cells based on session data and user permissions @@ -21,7 +21,7 @@ export function generateRowCells( if (canManageResources && showAllUsers) { cells.push( - + ); } diff --git a/apps/frontend/src/app/resources/usage/components/IntroductionRequiredDisplay/index.tsx b/apps/frontend/src/app/resources/usage/components/IntroductionRequiredDisplay/index.tsx index 67a42585..90b1ed10 100644 --- a/apps/frontend/src/app/resources/usage/components/IntroductionRequiredDisplay/index.tsx +++ b/apps/frontend/src/app/resources/usage/components/IntroductionRequiredDisplay/index.tsx @@ -1,7 +1,7 @@ import { Alert, Divider, Spinner } from '@heroui/react'; import { Users } from 'lucide-react'; -import { useTranslations, AttraccessUser } from '@attraccess/plugins-frontend-ui'; -import { useAccessControlServiceResourceIntroducersGetMany } from '@attraccess/react-query-client'; +import { useTranslations, FabAccessUser } from '@fabaccess/plugins-frontend-ui'; +import { useAccessControlServiceResourceIntroducersGetMany } from '@fabaccess/react-query-client'; import * as en from './translations/en.json'; import * as de from './translations/de.json'; @@ -38,7 +38,7 @@ export function IntroductionRequiredDisplay({ resourceId }: Readonly
{introducers?.map((introducer) => ( - + ))}
diff --git a/apps/frontend/src/app/resources/usage/components/OtherUserSessionDisplay/index.tsx b/apps/frontend/src/app/resources/usage/components/OtherUserSessionDisplay/index.tsx index 784ccc6a..7a1b5283 100644 --- a/apps/frontend/src/app/resources/usage/components/OtherUserSessionDisplay/index.tsx +++ b/apps/frontend/src/app/resources/usage/components/OtherUserSessionDisplay/index.tsx @@ -1,8 +1,8 @@ import { useState, useCallback, useMemo } from 'react'; import { Button, ButtonGroup, Dropdown, DropdownTrigger, DropdownMenu, DropdownItem } from '@heroui/react'; import { UserX, ChevronDownIcon } from 'lucide-react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; -import { AttraccessUser, DateTimeDisplay } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; +import { FabAccessUser, DateTimeDisplay } from '@fabaccess/plugins-frontend-ui'; import { useResourcesServiceResourceUsageStartSession, UseResourcesServiceResourceUsageGetActiveSessionKeyFn, @@ -11,7 +11,7 @@ import { useAccessControlServiceResourceIntroducersGetMany, useResourcesServiceResourceUsageCanControl, useResourcesServiceGetOneResourceById, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { useQueryClient } from '@tanstack/react-query'; import { useAuth } from '../../../../../hooks/useAuth'; import { useToastMessage } from '../../../../../components/toastProvider'; @@ -114,7 +114,7 @@ export function OtherUserSessionDisplay({ resourceId }: OtherUserSessionDisplayP

{t('resourceInUseBy')}

{activeSession.user ? ( - + ) : (

{t('unknownUser')}

)} diff --git a/apps/frontend/src/app/resources/usage/components/ResourceUsageSession/index.tsx b/apps/frontend/src/app/resources/usage/components/ResourceUsageSession/index.tsx index 8fcba111..5d320329 100644 --- a/apps/frontend/src/app/resources/usage/components/ResourceUsageSession/index.tsx +++ b/apps/frontend/src/app/resources/usage/components/ResourceUsageSession/index.tsx @@ -1,7 +1,7 @@ import { useMemo } from 'react'; import { Card, CardBody, CardHeader, Spinner } from '@heroui/react'; import { Clock } from 'lucide-react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { useAuth } from '../../../../../hooks/useAuth'; import { ActiveSessionDisplay } from '../ActiveSessionDisplay'; import { OtherUserSessionDisplay } from '../OtherUserSessionDisplay'; @@ -12,7 +12,7 @@ import { useResourcesServiceResourceUsageGetActiveSession, Resource, useResourcesServiceResourceUsageCanControl, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import * as en from './translations/en.json'; import * as de from './translations/de.json'; diff --git a/apps/frontend/src/app/resources/usage/components/SessionNotesModal/index.tsx b/apps/frontend/src/app/resources/usage/components/SessionNotesModal/index.tsx index 13c7057e..fba7868d 100644 --- a/apps/frontend/src/app/resources/usage/components/SessionNotesModal/index.tsx +++ b/apps/frontend/src/app/resources/usage/components/SessionNotesModal/index.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { Modal, ModalContent, ModalHeader, ModalBody, ModalFooter } from '@heroui/modal'; import { Button } from '@heroui/button'; import { Textarea } from '@heroui/input'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import * as en from './translations/en'; import * as de from './translations/de'; @@ -29,7 +29,7 @@ export const SessionNotesModal = ({ isOpen, onClose, onConfirm, mode, isSubmitti }; return ( - + {mode === SessionModalMode.START ? t('title.start') : t('title.end')} diff --git a/apps/frontend/src/app/resources/usage/components/SessionTimer/index.tsx b/apps/frontend/src/app/resources/usage/components/SessionTimer/index.tsx index 1a73d097..0e8a9026 100644 --- a/apps/frontend/src/app/resources/usage/components/SessionTimer/index.tsx +++ b/apps/frontend/src/app/resources/usage/components/SessionTimer/index.tsx @@ -1,6 +1,6 @@ import { useState, useEffect } from 'react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; -import { DateTimeDisplay } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; +import { DateTimeDisplay } from '@fabaccess/plugins-frontend-ui'; import * as en from './translations/en.json'; import * as de from './translations/de.json'; diff --git a/apps/frontend/src/app/resources/usage/components/StartSessionControls/index.tsx b/apps/frontend/src/app/resources/usage/components/StartSessionControls/index.tsx index b293a154..1d776796 100644 --- a/apps/frontend/src/app/resources/usage/components/StartSessionControls/index.tsx +++ b/apps/frontend/src/app/resources/usage/components/StartSessionControls/index.tsx @@ -1,14 +1,14 @@ import { useState, useCallback } from 'react'; import { Button, ButtonGroup, Dropdown, DropdownTrigger, DropdownMenu, DropdownItem } from '@heroui/react'; import { PlayIcon, ChevronDownIcon } from 'lucide-react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { useToastMessage } from '../../../../../components/toastProvider'; import { SessionNotesModal, SessionModalMode } from '../SessionNotesModal'; import { useResourcesServiceResourceUsageStartSession, UseResourcesServiceResourceUsageGetActiveSessionKeyFn, UseResourcesServiceResourceUsageGetHistoryKeyFn, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { useQueryClient } from '@tanstack/react-query'; import * as en from './translations/en.json'; import * as de from './translations/de.json'; diff --git a/apps/frontend/src/app/resources/usage/components/UsageNotesModal/index.tsx b/apps/frontend/src/app/resources/usage/components/UsageNotesModal/index.tsx index 19605274..a0ddfd08 100644 --- a/apps/frontend/src/app/resources/usage/components/UsageNotesModal/index.tsx +++ b/apps/frontend/src/app/resources/usage/components/UsageNotesModal/index.tsx @@ -1,10 +1,10 @@ import { memo } from 'react'; import { Modal, ModalContent, ModalHeader, ModalBody, ModalFooter, Button, Spinner, Textarea } from '@heroui/react'; -import { ResourceUsage } from '@attraccess/react-query-client'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { ResourceUsage } from '@fabaccess/react-query-client'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import * as en from './translations/en'; import * as de from './translations/de'; -import { DateTimeDisplay } from '@attraccess/plugins-frontend-ui'; +import { DateTimeDisplay } from '@fabaccess/plugins-frontend-ui'; interface UsageNotesModalProps { isOpen: boolean; @@ -18,7 +18,7 @@ export const UsageNotesModal = memo(({ isOpen, onClose, session }: UsageNotesMod if (!isOpen) return null; return ( - + {t('sessionNotes')} diff --git a/apps/frontend/src/app/resources/usage/resourceUsageHistory.tsx b/apps/frontend/src/app/resources/usage/resourceUsageHistory.tsx index a9426a7b..72766a34 100644 --- a/apps/frontend/src/app/resources/usage/resourceUsageHistory.tsx +++ b/apps/frontend/src/app/resources/usage/resourceUsageHistory.tsx @@ -1,8 +1,8 @@ import { useState } from 'react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { useAuth } from '../../../hooks/useAuth'; import { Card, CardHeader, CardBody } from '@heroui/react'; -import { ResourceUsage } from '@attraccess/react-query-client'; +import { ResourceUsage } from '@fabaccess/react-query-client'; import { HistoryTable } from './components/HistoryTable'; import { HistoryHeader } from './components/HistoryHeader'; import { UsageNotesModal } from './components/UsageNotesModal'; diff --git a/apps/frontend/src/app/routes/index.tsx b/apps/frontend/src/app/routes/index.tsx index 107f4176..b78b289b 100644 --- a/apps/frontend/src/app/routes/index.tsx +++ b/apps/frontend/src/app/routes/index.tsx @@ -6,7 +6,7 @@ import { MqttServersPage, CreateMqttServerPage, EditMqttServerPage } from '../mq import { SSOProvidersPage } from '../sso/SSOProvidersPage'; import { UserManagementPage } from '../user-management'; import { usePluginStore } from 'react-pluggable'; -import { RouteConfig } from '@attraccess/plugins-frontend-sdk'; +import { RouteConfig } from '@fabaccess/plugins-frontend-sdk'; import { PluginsList } from '../plugins/PluginsList'; import usePluginState, { PluginManifestWithPlugin } from '../plugins/plugin.state'; import { FabreaderList } from '../fabreader/FabreaderList/FabreaderList'; diff --git a/apps/frontend/src/app/sso/SSOProvidersPage.tsx b/apps/frontend/src/app/sso/SSOProvidersPage.tsx index 9b094b5f..caef4b40 100644 --- a/apps/frontend/src/app/sso/SSOProvidersPage.tsx +++ b/apps/frontend/src/app/sso/SSOProvidersPage.tsx @@ -5,7 +5,7 @@ import { useAuth } from '../../hooks/useAuth'; import { Navigate } from 'react-router-dom'; import { Button } from '@heroui/react'; import { Plus } from 'lucide-react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import * as providerListEn from './providers/translations/en'; import * as providerListDe from './providers/translations/de'; diff --git a/apps/frontend/src/app/sso/providers/SSOProvidersList.tsx b/apps/frontend/src/app/sso/providers/SSOProvidersList.tsx index c3d3bb8b..ae82795d 100644 --- a/apps/frontend/src/app/sso/providers/SSOProvidersList.tsx +++ b/apps/frontend/src/app/sso/providers/SSOProvidersList.tsx @@ -21,7 +21,7 @@ import { } from '@heroui/react'; import { Pencil, Trash, Key, FileCode, Eye, EyeOff, Download } from 'lucide-react'; import { useToastMessage } from '../../../components/toastProvider'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { CreateSSOProviderDto, SSOProvider, @@ -33,7 +33,7 @@ import { useAuthenticationServiceGetOneSsoProviderById, useAuthenticationServiceUpdateOneSsoProvider, UseAuthenticationServiceGetAllSsoProvidersKeyFn, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { useQueryClient } from '@tanstack/react-query'; import { TableDataLoadingIndicator } from '../../../components/tableComponents'; import { EmptyState } from '../../../components/emptyState'; diff --git a/apps/frontend/src/app/unauthorized/loginForm.tsx b/apps/frontend/src/app/unauthorized/loginForm.tsx index 305acc27..ef58053b 100644 --- a/apps/frontend/src/app/unauthorized/loginForm.tsx +++ b/apps/frontend/src/app/unauthorized/loginForm.tsx @@ -3,7 +3,7 @@ import { ArrowRight } from 'lucide-react'; import { Input } from '@heroui/input'; import { Button } from '@heroui/button'; import { Alert } from '@heroui/alert'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { PasswordInput } from '../../components/PasswordInput'; import { useLogin } from '../../hooks/useAuth'; import * as en from './loginForm.en.json'; diff --git a/apps/frontend/src/app/unauthorized/password-reset/passwordResetForm.tsx b/apps/frontend/src/app/unauthorized/password-reset/passwordResetForm.tsx index da2be97d..0774b703 100644 --- a/apps/frontend/src/app/unauthorized/password-reset/passwordResetForm.tsx +++ b/apps/frontend/src/app/unauthorized/password-reset/passwordResetForm.tsx @@ -1,10 +1,10 @@ import { useMemo, useState } from 'react'; import { ArrowLeft, ArrowRight } from 'lucide-react'; import { Button } from '@heroui/button'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import * as en from './en.json'; import * as de from './de.json'; -import { useUsersServiceRequestPasswordReset } from '@attraccess/react-query-client'; +import { useUsersServiceRequestPasswordReset } from '@fabaccess/react-query-client'; import { useToastMessage } from '../../../components/toastProvider'; import { Input } from '@heroui/input'; @@ -47,13 +47,24 @@ export function PasswordResetForm({ onGoBack }: PasswordResetFormProps) {

{t('title')}

-

- setEmail(e.target.value)} data-cy="password-reset-form-email-input" /> + setEmail(e.target.value)} + data-cy="password-reset-form-email-input" + /> - diff --git a/apps/frontend/src/components/IntroducerManagement/index.tsx b/apps/frontend/src/components/IntroducerManagement/index.tsx index 14bba21e..9f843e6b 100644 --- a/apps/frontend/src/components/IntroducerManagement/index.tsx +++ b/apps/frontend/src/components/IntroducerManagement/index.tsx @@ -1,8 +1,8 @@ import { useMemo } from 'react'; import { Card, CardHeader, CardBody, CardProps } from '@heroui/react'; import { Trash2Icon, AwardIcon } from 'lucide-react'; -import { User, ResourceIntroducer } from '@attraccess/react-query-client'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { User, ResourceIntroducer } from '@fabaccess/react-query-client'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { UserSelectionList } from '../userSelectionList'; import * as en from './en.json'; import * as de from './de.json'; diff --git a/apps/frontend/src/components/IntroductionStatusChip/index.tsx b/apps/frontend/src/components/IntroductionStatusChip/index.tsx index db55ec58..797792d9 100644 --- a/apps/frontend/src/components/IntroductionStatusChip/index.tsx +++ b/apps/frontend/src/components/IntroductionStatusChip/index.tsx @@ -1,4 +1,4 @@ -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { Chip } from '@heroui/react'; import de from './de.json'; diff --git a/apps/frontend/src/components/IntroductionsManagement/history/index.tsx b/apps/frontend/src/components/IntroductionsManagement/history/index.tsx index 7588133a..10a3430b 100644 --- a/apps/frontend/src/components/IntroductionsManagement/history/index.tsx +++ b/apps/frontend/src/components/IntroductionsManagement/history/index.tsx @@ -1,11 +1,11 @@ -import { DateTimeDisplay, useTranslations } from '@attraccess/plugins-frontend-ui'; +import { DateTimeDisplay, useTranslations } from '@fabaccess/plugins-frontend-ui'; import { Modal, ModalContent, ModalHeader, ModalBody, ModalFooter } from '@heroui/modal'; import { Button, Pagination, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow } from '@heroui/react'; import { useMemo, useState } from 'react'; import { TableDataLoadingIndicator } from '../../../components/tableComponents'; import { EmptyState } from '../../../components/emptyState'; import { IntroductionStatusChip } from '../../IntroductionStatusChip'; -import { ResourceIntroductionHistoryItem } from '@attraccess/react-query-client'; +import { ResourceIntroductionHistoryItem } from '@fabaccess/react-query-client'; import * as en from './en.json'; import * as de from './de.json'; diff --git a/apps/frontend/src/components/IntroductionsManagement/index.tsx b/apps/frontend/src/components/IntroductionsManagement/index.tsx index 42240a8e..501f9aab 100644 --- a/apps/frontend/src/components/IntroductionsManagement/index.tsx +++ b/apps/frontend/src/components/IntroductionsManagement/index.tsx @@ -15,8 +15,8 @@ import { Form, } from '@heroui/react'; import { HistoryIcon, ShieldCheckIcon } from 'lucide-react'; -import { ResourceIntroduction, User } from '@attraccess/react-query-client'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { ResourceIntroduction, User } from '@fabaccess/react-query-client'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import * as en from './en.json'; import * as de from './de.json'; import { PageHeader } from '../pageHeader'; diff --git a/apps/frontend/src/components/PWAUpdatePrompt/index.tsx b/apps/frontend/src/components/PWAUpdatePrompt/index.tsx index 37361398..4a7afde0 100644 --- a/apps/frontend/src/components/PWAUpdatePrompt/index.tsx +++ b/apps/frontend/src/components/PWAUpdatePrompt/index.tsx @@ -1,6 +1,6 @@ import { useRegisterSW } from 'virtual:pwa-register/react'; import { Button, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader } from '@heroui/react'; -import { useFormatDateTime, useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useFormatDateTime, useTranslations } from '@fabaccess/plugins-frontend-ui'; import { useCallback, useMemo, useState } from 'react'; import { PageHeader } from '../pageHeader'; import { ClockIcon, GiftIcon, RefreshCcwIcon } from 'lucide-react'; diff --git a/apps/frontend/src/components/PWAUpdatePrompt/installationProgressIndicator/index.tsx b/apps/frontend/src/components/PWAUpdatePrompt/installationProgressIndicator/index.tsx index e63f4491..6a47ccea 100644 --- a/apps/frontend/src/components/PWAUpdatePrompt/installationProgressIndicator/index.tsx +++ b/apps/frontend/src/components/PWAUpdatePrompt/installationProgressIndicator/index.tsx @@ -1,7 +1,7 @@ import { Modal, ModalBody, ModalContent, ModalHeader, Progress } from '@heroui/react'; import { PageHeader } from '../../pageHeader'; import { RefreshCcwIcon } from 'lucide-react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import de from './de.json'; import en from './en.json'; diff --git a/apps/frontend/src/components/PasswordInput/PasswordInput.tsx b/apps/frontend/src/components/PasswordInput/PasswordInput.tsx index 54db4891..6edb0706 100644 --- a/apps/frontend/src/components/PasswordInput/PasswordInput.tsx +++ b/apps/frontend/src/components/PasswordInput/PasswordInput.tsx @@ -3,7 +3,7 @@ import { Input, InputProps } from '@heroui/input'; import { Button } from '@heroui/button'; import { Tooltip } from '@heroui/tooltip'; import { Eye, EyeOff } from 'lucide-react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import * as en from './PasswordInput.en.json'; import * as de from './PasswordInput.de.json'; @@ -19,17 +19,14 @@ export interface PasswordInputProps extends Omit = ({ - additionalEndContent, - ...inputProps -}) => { +export const PasswordInput: React.FC = ({ additionalEndContent, ...inputProps }) => { const [showPassword, setShowPassword] = useState(false); const { t } = useTranslations('passwordInput', { en, de }); @@ -55,11 +52,5 @@ export const PasswordInput: React.FC = ({
); - return ( - - ); -}; \ No newline at end of file + return ; +}; diff --git a/apps/frontend/src/components/bootScreen/index.tsx b/apps/frontend/src/components/bootScreen/index.tsx index d3745433..400c7508 100644 --- a/apps/frontend/src/components/bootScreen/index.tsx +++ b/apps/frontend/src/components/bootScreen/index.tsx @@ -1,4 +1,4 @@ -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import { UnauthorizedLayout } from '../../app/unauthorized/unauthorized-layout/layout'; import { PageHeader } from '../pageHeader'; import { Progress } from '@heroui/react'; diff --git a/apps/frontend/src/components/deleteConfirmationModal/index.tsx b/apps/frontend/src/components/deleteConfirmationModal/index.tsx index 1a39f0b9..9c22d99e 100644 --- a/apps/frontend/src/components/deleteConfirmationModal/index.tsx +++ b/apps/frontend/src/components/deleteConfirmationModal/index.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Modal, ModalContent, ModalHeader, ModalBody, ModalFooter, ModalProps } from '@heroui/modal'; import { Button } from '@heroui/button'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import * as en from './en.json'; import * as de from './de.json'; import { Trans } from 'react-i18next'; diff --git a/apps/frontend/src/components/emptyState.tsx b/apps/frontend/src/components/emptyState.tsx index 659a1c67..36923090 100644 --- a/apps/frontend/src/components/emptyState.tsx +++ b/apps/frontend/src/components/emptyState.tsx @@ -1,5 +1,5 @@ import { MehIcon } from 'lucide-react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; export const EmptyState = () => { const { t } = useTranslations('emptyState', { diff --git a/apps/frontend/src/components/imageUpload/index.tsx b/apps/frontend/src/components/imageUpload/index.tsx index bd88ad10..dd13df4f 100644 --- a/apps/frontend/src/components/imageUpload/index.tsx +++ b/apps/frontend/src/components/imageUpload/index.tsx @@ -1,6 +1,6 @@ import React, { useCallback, useEffect, useState, HTMLAttributes, useMemo } from 'react'; import { ImageIcon, X } from 'lucide-react'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; import * as en from './en.json'; import * as de from './de.json'; import { useToastMessage } from '../toastProvider'; diff --git a/apps/frontend/src/components/logo/index.tsx b/apps/frontend/src/components/logo/index.tsx index 63ff8f1b..f676942f 100644 --- a/apps/frontend/src/components/logo/index.tsx +++ b/apps/frontend/src/components/logo/index.tsx @@ -7,8 +7,8 @@ export function Logo(props: Omit) { href={props.href ?? '/'} className={cn(props.className, 'font-bold text-inherit flex items-center gap-2')} > - Attraccess - Attraccess + FabAccess + FabAccess ); } diff --git a/apps/frontend/src/components/pwaInstall/index.tsx b/apps/frontend/src/components/pwaInstall/index.tsx index 0469a587..4dd5e9e5 100644 --- a/apps/frontend/src/components/pwaInstall/index.tsx +++ b/apps/frontend/src/components/pwaInstall/index.tsx @@ -1,7 +1,7 @@ import PWAInstallFromLib from '@khmyznikov/pwa-install/react-legacy'; import de from './de.json'; import en from './en.json'; -import { useTranslations } from '@attraccess/plugins-frontend-ui'; +import { useTranslations } from '@fabaccess/plugins-frontend-ui'; declare global { interface Window { @@ -18,7 +18,7 @@ export function PWAInstall() { return ( diff --git a/apps/frontend/src/components/userSelectionList/index.tsx b/apps/frontend/src/components/userSelectionList/index.tsx index 5bb46e4a..103abadd 100644 --- a/apps/frontend/src/components/userSelectionList/index.tsx +++ b/apps/frontend/src/components/userSelectionList/index.tsx @@ -1,5 +1,5 @@ -import { AttraccessUser, UserSearch, useTranslations } from '@attraccess/plugins-frontend-ui'; -import { User } from '@attraccess/react-query-client'; +import { FabAccessUser, UserSearch, useTranslations } from '@fabaccess/plugins-frontend-ui'; +import { User } from '@fabaccess/react-query-client'; import { Button, ButtonProps, @@ -147,7 +147,7 @@ export function UserSelectionList(props: Readonly ( - + { diff --git a/apps/frontend/src/hooks/useAuth.ts b/apps/frontend/src/hooks/useAuth.ts index 17a2194d..10ca448c 100644 --- a/apps/frontend/src/hooks/useAuth.ts +++ b/apps/frontend/src/hooks/useAuth.ts @@ -9,7 +9,7 @@ import { useAuthenticationServiceRefreshSession, useAuthenticationServiceRefreshSessionKey, useUsersServiceGetCurrent, -} from '@attraccess/react-query-client'; +} from '@fabaccess/react-query-client'; import { useCallback, useEffect, useRef, useState } from 'react'; interface LoginCredentials { diff --git a/apps/frontend/src/hooks/useHasValidIntroduction.ts b/apps/frontend/src/hooks/useHasValidIntroduction.ts index 7311af01..23f72e80 100644 --- a/apps/frontend/src/hooks/useHasValidIntroduction.ts +++ b/apps/frontend/src/hooks/useHasValidIntroduction.ts @@ -1,4 +1,4 @@ -import { ResourceIntroduction, User } from '@attraccess/react-query-client'; +import { ResourceIntroduction, User } from '@fabaccess/react-query-client'; import { useCallback } from 'react'; interface Props { diff --git a/apps/frontend/src/main.tsx b/apps/frontend/src/main.tsx index 6165adf2..e3f00127 100644 --- a/apps/frontend/src/main.tsx +++ b/apps/frontend/src/main.tsx @@ -3,7 +3,7 @@ import { BrowserRouter } from 'react-router-dom'; import * as ReactDOM from 'react-dom/client'; import { QueryClientProvider } from '@tanstack/react-query'; import App from './app/app'; -import '@attraccess/plugins-frontend-ui'; +import '@fabaccess/plugins-frontend-ui'; import { queryClient } from './api/queryClient'; import setupApiParameters from './api'; import { PluginProvider } from './app/plugins/plugin-provider'; diff --git a/apps/frontend/src/service-worker/site.webmanifest.json b/apps/frontend/src/service-worker/site.webmanifest.json index 283596a6..dd689a92 100644 --- a/apps/frontend/src/service-worker/site.webmanifest.json +++ b/apps/frontend/src/service-worker/site.webmanifest.json @@ -1,8 +1,8 @@ { "$schema": "https://json.schemastore.org/web-manifest-combined.json", - "name": "Attraccess", - "short_name": "Attraccess", - "description": "Attraccess is a platform for managing access to resources in a collaborative environment (e.g. Makerspaces and FabLabs).", + "name": "FabAccess", + "short_name": "FabAccess", + "description": "FabAccess is a platform for managing access to resources in a collaborative environment (e.g. Makerspaces and FabLabs).", "start_url": "/?pwa=true", "theme_color": "#000000", "background_color": "#000000", diff --git a/apps/frontend/src/test-utils/fixtures.ts b/apps/frontend/src/test-utils/fixtures.ts index 30711a0d..d896638d 100644 --- a/apps/frontend/src/test-utils/fixtures.ts +++ b/apps/frontend/src/test-utils/fixtures.ts @@ -1,4 +1,4 @@ -import { Resource } from '@attraccess/react-query-client'; +import { Resource } from '@fabaccess/react-query-client'; /** * Creates a mock resource with the given overrides diff --git a/apps/frontend/tsconfig.app.json b/apps/frontend/tsconfig.app.json index 78394d60..5c98e728 100644 --- a/apps/frontend/tsconfig.app.json +++ b/apps/frontend/tsconfig.app.json @@ -24,5 +24,5 @@ "src/**/*.test.jsx", "jest.config.ts", ], - "include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx", "../../libs/plugins-frontend-ui/src/lib/components/attraccess-user/attraccessUser.de.ts", "../../libs/plugins-frontend-ui/src/lib/components/attraccess-user/attraccessUser.en.ts"] + "include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx", "../../libs/plugins-frontend-ui/src/lib/components/fabaccess-user/fabaccessUser.de.ts", "../../libs/plugins-frontend-ui/src/lib/components/fabaccess-user/fabaccessUser.en.ts"] } diff --git a/apps/frontend/vite.config.ts b/apps/frontend/vite.config.ts index 10ba9713..ebe2cd41 100644 --- a/apps/frontend/vite.config.ts +++ b/apps/frontend/vite.config.ts @@ -27,7 +27,7 @@ export default defineConfig({ nxCopyAssetsPlugin([]), // MillionLint.vite(), federation({ - name: 'attraccess', + name: 'fabaccess', remotes: { // Dynamic remotes will be loaded at runtime // dummy remote so that vite prepares the shared libs, diff --git a/build.sh b/build.sh index d01b38a2..3e4a5b4b 100755 --- a/build.sh +++ b/build.sh @@ -58,13 +58,13 @@ echo "Running docker build with arguments: ${BUILD_ARGS[@]}" docker build \ "${BUILD_ARGS[@]}" \ "${SECRET_ARGS[@]}" \ - -t attraccess:${VERSION_TAG} \ + -t fabaccess:${VERSION_TAG} \ . # Always tag as latest for convenience if [[ "$VERSION_TAG" != "latest" ]]; then - docker tag attraccess:${VERSION_TAG} attraccess:latest - echo "Docker image built successfully with tags: attraccess:${VERSION_TAG}, attraccess:latest" + docker tag fabaccess:${VERSION_TAG} fabaccess:latest + echo "Docker image built successfully with tags: fabaccess:${VERSION_TAG}, fabaccess:latest" else - echo "Docker image built successfully with tag: attraccess:latest" + echo "Docker image built successfully with tag: fabaccess:latest" fi \ No newline at end of file diff --git a/config/mosquitto/mosquitto.conf b/config/mosquitto/mosquitto.conf index 308caa01..14fbdc6c 100644 --- a/config/mosquitto/mosquitto.conf +++ b/config/mosquitto/mosquitto.conf @@ -1,4 +1,4 @@ -# Mosquitto Configuration for Attraccess Development +# Mosquitto Configuration for FabAccess Development # Default listener listener 1883 diff --git a/docker-compose.local.yml b/docker-compose.local.yml index 3d322ae5..21beb241 100644 --- a/docker-compose.local.yml +++ b/docker-compose.local.yml @@ -1,5 +1,5 @@ services: - attraccess: + fabaccess: restart: unless-stopped build: context: . @@ -16,5 +16,3 @@ services: ports: - '8025:8025' - '1025:1025' - - diff --git a/docs/HOME.md b/docs/HOME.md index 9d9fa7e6..53661b06 100644 --- a/docs/HOME.md +++ b/docs/HOME.md @@ -1,30 +1,30 @@ -# Attraccess Documentation +# FabAccess Documentation -Welcome to the official documentation for Attraccess. This comprehensive guide covers everything you need to know about setup, maintenance, usage, and development. +Welcome to the official documentation for FabAccess. This comprehensive guide covers everything you need to know about setup, maintenance, usage, and development. > [!NOTE] > This documentation is continuously updated. Make sure you're viewing the latest version by refreshing your browser or pulling the latest changes. ## Overview -Attraccess is a powerful platform designed to simplify and secure access management. Our documentation is organized into three main sections to help all types of users find the information they need: +FabAccess is a powerful platform designed to simplify and secure access management. Our documentation is organized into three main sections to help all types of users find the information they need: - **Setup & Maintenance** - Installation guides, configuration options, and system maintenance -- **User Guides** - Step-by-step instructions for using Attraccess features +- **User Guides** - Step-by-step instructions for using FabAccess features - **Developer Documentation** - API references, integration guides, and custom development ## Getting Started - For new installations, visit the [Setup Guide](setup/installation.md) - Existing users should check the [User Guides](user/getting-started.md) -- Developers interested in extending Attraccess can explore the [Developer Documentation](developer/get-started.md) +- Developers interested in extending FabAccess can explore the [Developer Documentation](developer/get-started.md) > [!TIP] -> If you're setting up Attraccess for the first time, we recommend starting with our [Docker installation guide](setup/docker.md) for the quickest deployment. +> If you're setting up FabAccess for the first time, we recommend starting with our [Docker installation guide](setup/docker.md) for the quickest deployment. ## Support -Need help? Open an issue on our [GitHub repository](https://github.com/FabInfra/Attraccess). +Need help? Open an issue on our [GitHub repository](https://github.com/FabInfra/FabAccess). > [!NOTE] -> This documentation is also accessible directly from your running Attraccess instance at `/docs`. +> This documentation is also accessible directly from your running FabAccess instance at `/docs`. diff --git a/docs/developer/get-started.md b/docs/developer/get-started.md index 7a40e680..5f4ab3f5 100644 --- a/docs/developer/get-started.md +++ b/docs/developer/get-started.md @@ -2,10 +2,10 @@ ## Introduction -Attraccess is a comprehensive resource management system for tracking and managing access to shared resources. This guide will help you get started with developing and enhancing the project. +FabAccess is a comprehensive resource management system for tracking and managing access to shared resources. This guide will help you get started with developing and enhancing the project. > [!NOTE] -> This guide is intended for developers who want to contribute to or extend the Attraccess platform. If you're looking for user documentation, please refer to the [User Guides](../user/) section. +> This guide is intended for developers who want to contribute to or extend the FabAccess platform. If you're looking for user documentation, please refer to the [User Guides](../user/) section. ## Technology Stack @@ -42,7 +42,7 @@ Attraccess is a comprehensive resource management system for tracking and managi ## Project Structure -Attraccess follows an Nx monorepo structure, organized into apps and libs: +FabAccess follows an Nx monorepo structure, organized into apps and libs: ### Apps @@ -73,8 +73,8 @@ Attraccess follows an Nx monorepo structure, organized into apps and libs: 1. Clone the repository: ```bash - git clone https://github.com/yourusername/Attraccess.git - cd Attraccess + git clone https://github.com/yourusername/FabAccess.git + cd FabAccess ``` 2. Install dependencies: @@ -147,10 +147,10 @@ nx build frontend ### Plugin Development -Attraccess supports a plugin system for both frontend and backend extensions. For detailed information on plugin development, please refer to the [Plugin Development Guide](/developer/plugins.md). +FabAccess supports a plugin system for both frontend and backend extensions. For detailed information on plugin development, please refer to the [Plugin Development Guide](/developer/plugins.md). > [!NOTE] -> Plugins are a powerful way to extend Attraccess functionality without modifying the core codebase. They can be developed and distributed independently. +> Plugins are a powerful way to extend FabAccess functionality without modifying the core codebase. They can be developed and distributed independently. ## Useful Commands @@ -172,10 +172,10 @@ nx graph For detailed information about the API and OpenAPI documentation, please refer to the [OpenAPI Documentation Guide](/developer/openapi.md). -The full Attraccess documentation is also accessible directly from your running instance at: +The full FabAccess documentation is also accessible directly from your running instance at: ``` -/docs +/docs ``` ## Need Help? diff --git a/docs/developer/openapi.md b/docs/developer/openapi.md index 74409431..620d4f42 100644 --- a/docs/developer/openapi.md +++ b/docs/developer/openapi.md @@ -17,16 +17,16 @@ Learn more about OpenAPI: - [OpenAPI Initiative](https://www.openapis.org/) - [Swagger Documentation](https://swagger.io/docs/) -## Attraccess OpenAPI Support +## FabAccess OpenAPI Support -All Attraccess endpoints are documented using OpenAPI specifications. This provides a comprehensive API reference that can be explored interactively. +All FabAccess endpoints are documented using OpenAPI specifications. This provides a comprehensive API reference that can be explored interactively. ### Accessing the OpenAPI UI -Once you have a running Attraccess instance, you can access the OpenAPI UI at: +Once you have a running FabAccess instance, you can access the OpenAPI UI at: ``` -/api +/api ``` This interactive interface allows you to: @@ -41,20 +41,20 @@ This interactive interface allows you to: The raw OpenAPI schema is available in JSON format at: ``` -/api-json +/api-json ``` This schema can be downloaded and used with various OpenAPI tools for client code generation, documentation, and more. ### Accessing the Documentation -The full Attraccess documentation is available through docsify and can be accessed at: +The full FabAccess documentation is available through docsify and can be accessed at: ``` -/docs +/docs ``` -This provides comprehensive documentation on all aspects of Attraccess, including setup guides, user guides, and developer documentation. +This provides comprehensive documentation on all aspects of FabAccess, including setup guides, user guides, and developer documentation. ## Generating Client Code @@ -66,19 +66,19 @@ You can use tools like: - [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) - Official Swagger code generation tool - [NSwag](https://github.com/RicoSuter/NSwag) - .NET-focused OpenAPI toolchain -### Pre-Generated Attraccess Clients +### Pre-Generated FabAccess Clients -Attraccess automatically generates JavaScript/TypeScript clients based on the OpenAPI schema. These clients are available as npm packages: +FabAccess automatically generates JavaScript/TypeScript clients based on the OpenAPI schema. These clients are available as npm packages: -- **@attraccess/api-client**: Basic fetch-based API client +- **@fabaccess/api-client**: Basic fetch-based API client ```bash - npm install @attraccess/api-client + npm install @fabaccess/api-client ``` -- **@attraccess/react-query-client**: Client with React Query integration for React applications +- **@fabaccess/react-query-client**: Client with React Query integration for React applications ```bash - npm install @attraccess/react-query-client + npm install @fabaccess/react-query-client ``` -These pre-generated clients provide type-safe access to all Attraccess endpoints with proper TypeScript typing, reducing implementation time and potential errors when interacting with the API. +These pre-generated clients provide type-safe access to all FabAccess endpoints with proper TypeScript typing, reducing implementation time and potential errors when interacting with the API. diff --git a/docs/developer/plugins.md b/docs/developer/plugins.md index c50bd320..f9b51644 100644 --- a/docs/developer/plugins.md +++ b/docs/developer/plugins.md @@ -2,9 +2,9 @@ ## Overview -The Attraccess plugin system enables developers to extend the platform's capabilities without modifying the core codebase. This modular approach allows for customized functionality while maintaining a stable foundation. +The FabAccess plugin system enables developers to extend the platform's capabilities without modifying the core codebase. This modular approach allows for customized functionality while maintaining a stable foundation. -Plugins in Attraccess consist of three main components: +Plugins in FabAccess consist of three main components: 1. **Plugin Manifest (`plugin.json`)** - A descriptor file defining the plugin and its entry points 2. **Frontend Module** - A React-based component that extends the UI (optional) @@ -33,7 +33,7 @@ plugin-name/ ### Compiled Structure -After compilation, the plugin structure that gets loaded by Attraccess looks like this: +After compilation, the plugin structure that gets loaded by FabAccess looks like this: ``` plugin-name/ @@ -49,7 +49,7 @@ plugin-name/ └── other assets # CSS, images, etc. ``` -The compiled version is what gets loaded by the Attraccess plugin system at runtime. +The compiled version is what gets loaded by the FabAccess plugin system at runtime. ## Plugin Manifest @@ -67,7 +67,7 @@ The `plugin.json` file is required for all plugins and defines the plugin's meta }, "version": "0.0.16", "description": "Description of the plugin", - "attraccessVersion": { + "fabaccessVersion": { "min": "0.0.0", "max": "2.0.0", "exact": null @@ -85,15 +85,15 @@ The `plugin.json` file is required for all plugins and defines the plugin's meta | `main.frontend.entryPoint` | Path to the frontend entry point | | `version` | Plugin version | | `description` | Plugin description | -| `attraccessVersion` | Compatibility with Attraccess versions | +| `fabaccessVersion` | Compatibility with FabAccess versions | -### The `attraccessVersion` Field +### The `fabaccessVersion` Field -The `attraccessVersion` field helps ensure compatibility between your plugin and the Attraccess platform: +The `fabaccessVersion` field helps ensure compatibility between your plugin and the FabAccess platform: -- `min`: Specifies the minimum Attraccess version your plugin is compatible with -- `max`: Specifies the maximum Attraccess version your plugin is compatible with -- `exact`: If set, specifies that your plugin only works with this exact Attraccess version +- `min`: Specifies the minimum FabAccess version your plugin is compatible with +- `max`: Specifies the maximum FabAccess version your plugin is compatible with +- `exact`: If set, specifies that your plugin only works with this exact FabAccess version You can specify any combination of these properties. For example: @@ -101,7 +101,7 @@ You can specify any combination of these properties. For example: - `{ "min": "1.0.0", "max": "2.0.0" }` - Compatible with versions between 1.0.0 and 2.0.0 - `{ "exact": "1.5.0" }` - Only compatible with version 1.5.0 -When Attraccess loads a plugin, it compares its own version with the plugin's compatibility settings and will only load the plugin if the versions match. This prevents loading plugins that might cause errors due to incompatible APIs or features. +When FabAccess loads a plugin, it compares its own version with the plugin's compatibility settings and will only load the plugin if the versions match. This prevents loading plugins that might cause errors due to incompatible APIs or features. Version checking follows semantic versioning rules (major.minor.patch): @@ -111,21 +111,17 @@ Version checking follows semantic versioning rules (major.minor.patch): ## Frontend Plugin Development -The frontend part of a plugin extends the Attraccess UI using [React](https://reactjs.org/) and the [react-pluggable](https://github.com/adarshpastakia/react-pluggable) library. It is compiled as a [Module Federation](https://webpack.js.org/concepts/module-federation/) package to enable dynamic loading. +The frontend part of a plugin extends the FabAccess UI using [React](https://reactjs.org/) and the [react-pluggable](https://github.com/adarshpastakia/react-pluggable) library. It is compiled as a [Module Federation](https://webpack.js.org/concepts/module-federation/) package to enable dynamic loading. ### Creating a Frontend Plugin -1. Create a class that implements the `AttraccessFrontendPlugin` interface: +1. Create a class that implements the `FabAccessFrontendPlugin` interface: ```tsx import { PluginStore } from 'react-pluggable'; -import { - AttraccessFrontendPlugin, - AttraccessFrontendPluginAuthData, - RouteConfig, -} from '@attraccess/plugins-frontend-sdk'; +import { FabAccessFrontendPlugin, FabAccessFrontendPluginAuthData, RouteConfig } from '@fabaccess/plugins-frontend-sdk'; -export default class MyPlugin implements AttraccessFrontendPlugin { +export default class MyPlugin implements FabAccessFrontendPlugin { public pluginStore!: PluginStore; public readonly name = 'MyPlugin'; public readonly version = 'v1.0.0'; @@ -146,7 +142,7 @@ export default class MyPlugin implements AttraccessFrontendPlugin { // Handle API endpoint changes } - onApiAuthStateChange(authData: null | AttraccessFrontendPluginAuthData): void { + onApiAuthStateChange(authData: null | FabAccessFrontendPluginAuthData): void { // Handle authentication state changes } @@ -171,9 +167,9 @@ export default class MyPlugin implements AttraccessFrontendPlugin { ### Understanding the `GET_ROUTES` Function -The `GET_ROUTES` function is a critical part of the plugin integration with Attraccess. When you register this function: +The `GET_ROUTES` function is a critical part of the plugin integration with FabAccess. When you register this function: -1. The Attraccess core application automatically discovers your plugin's routes +1. The FabAccess core application automatically discovers your plugin's routes 2. These routes are integrated into the main application's routing system 3. Your plugin's UI components are rendered at the specified paths 4. If you include a `sidebar` configuration, your plugin gets an entry in the navigation menu @@ -189,7 +185,7 @@ The function should return an array of `RouteConfig` objects with these properti | `sidebar.label` | The text displayed in the sidebar | | `sidebar.icon` | The icon component for the sidebar item | -The Attraccess router system is built on [React Router](https://reactrouter.com/), so your routes will be integrated into the application's routing hierarchy. This means you can: +The FabAccess router system is built on [React Router](https://reactrouter.com/), so your routes will be integrated into the application's routing hierarchy. This means you can: - Access URL parameters with React Router's hooks - Create nested routes within your plugin @@ -221,8 +217,8 @@ export default defineConfig({ 'react-i18next', 'i18next-browser-languagedetector', '@tanstack/react-query', - '@attraccess/react-query-client', - '@attraccess/plugins-frontend-ui', + '@fabaccess/react-query-client', + '@fabaccess/plugins-frontend-ui', ], }), // ... other plugins @@ -233,13 +229,13 @@ export default defineConfig({ ### Shared Dependencies -The `shared` array in the Module Federation configuration is crucial. It specifies which dependencies should be shared between the host application (Attraccess) and your plugin. This is important for: +The `shared` array in the Module Federation configuration is crucial. It specifies which dependencies should be shared between the host application (FabAccess) and your plugin. This is important for: 1. **Preventing Duplicate Modules**: Without shared dependencies, React and other libraries would be loaded multiple times, causing conflicts and increased bundle size 2. **Shared Context**: Components like contexts need to be from the same instance to work properly 3. **Consistent Versions**: Ensures all components use the same version of libraries -The following dependencies must be shared for proper integration with Attraccess: +The following dependencies must be shared for proper integration with FabAccess: ```js [ @@ -252,8 +248,8 @@ The following dependencies must be shared for proper integration with Attraccess 'react-i18next', 'i18next-browser-languagedetector', '@tanstack/react-query', - '@attraccess/react-query-client', - '@attraccess/plugins-frontend-ui', + '@fabaccess/react-query-client', + '@fabaccess/plugins-frontend-ui', ]; ``` @@ -279,7 +275,7 @@ The following dependencies must be shared for proper integration with Attraccess - Purpose: Core plugin architecture that enables plugin functionality - [Documentation](https://github.com/adarshpastakia/react-pluggable) -5. **@heroui/react** - UI component library of Attraccess +5. **@heroui/react** - UI component library of FabAccess - Purpose: Provides UI components and styling for the application - [Documentation](https://www.heroui.com/) @@ -304,14 +300,14 @@ The following dependencies must be shared for proper integration with Attraccess - Purpose: Manages API requests, caching, and state - [Documentation](https://tanstack.com/query/latest) -10. **@attraccess/react-query-client** - Attraccess-specific React Query client +10. **@fabaccess/react-query-client** - FabAccess-specific React Query client - - Purpose: Pre-configured React Query client for Attraccess API endpoints - - Internal library specific to Attraccess + - Purpose: Pre-configured React Query client for FabAccess API endpoints + - Internal library specific to FabAccess -11. **@attraccess/plugins-frontend-ui** - Attraccess UI components for plugins +11. **@fabaccess/plugins-frontend-ui** - FabAccess UI components for plugins - Purpose: Shared UI components to maintain consistent look and feel - - Internal library specific to Attraccess + - Internal library specific to FabAccess If you don't properly share these dependencies: @@ -322,7 +318,7 @@ If you don't properly share these dependencies: ## Backend Plugin Development -The backend part of a plugin extends the Attraccess API using [NestJS](https://nestjs.com/) dynamic modules. +The backend part of a plugin extends the FabAccess API using [NestJS](https://nestjs.com/) dynamic modules. ### Creating a Backend Plugin @@ -343,7 +339,7 @@ import { MyPluginService } from './my-plugin.service'; export default class MyPluginModule {} ``` -The module must be exported as the default export. This allows the Attraccess plugin system to dynamically load it. +The module must be exported as the default export. This allows the FabAccess plugin system to dynamically load it. 2. Implement your controllers, services, and other components as needed: @@ -366,7 +362,7 @@ export class MyPluginController { ### Loading -The Attraccess plugin system loads plugins in this sequence: +The FabAccess plugin system loads plugins in this sequence: 1. The system scans the plugins directory for `plugin.json` files 2. For each valid plugin, it: diff --git a/docs/index.html b/docs/index.html index cf56ef6d..c850429c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,79 +1,94 @@ - - - Attraccess Documentation - - - - + + + FabAccess Documentation + + + + - - - + + + - - - - -
- + + + + +
+ - - - - - - - - - - + + + + + + + + + + - + - - - + type="text/javascript" + > + + diff --git a/docs/setup/beginner-guide.md b/docs/setup/beginner-guide.md index 63e5c2a1..8cff9913 100644 --- a/docs/setup/beginner-guide.md +++ b/docs/setup/beginner-guide.md @@ -1,10 +1,10 @@ -# Beginner's Guide to Attraccess Installation +# Beginner's Guide to FabAccess Installation -This guide is designed for absolute beginners with no prior knowledge of Docker or server deployment. We'll walk through each step carefully to help you get Attraccess up and running. +This guide is designed for absolute beginners with no prior knowledge of Docker or server deployment. We'll walk through each step carefully to help you get FabAccess up and running. -## What is Attraccess? +## What is FabAccess? -Attraccess is a complete solution for managing access to spaces, resources, and equipment. It's packaged as a Docker container, which is a standardized way to deliver software that works consistently across different computers and servers. +FabAccess is a complete solution for managing access to spaces, resources, and equipment. It's packaged as a Docker container, which is a standardized way to deliver software that works consistently across different computers and servers. ## Prerequisites @@ -21,11 +21,11 @@ Before you begin, you'll need: Docker is a platform that allows you to package and run applications in isolated environments called "containers." Think of a container as a lightweight, standalone package that includes everything needed to run the software: code, runtime, system tools, libraries, and settings. -> 💡 **Why Docker?** Docker makes it easy to install and run software without worrying about dependencies or configuration issues. It ensures that Attraccess runs the same way regardless of where it's installed. +> 💡 **Why Docker?** Docker makes it easy to install and run software without worrying about dependencies or configuration issues. It ensures that FabAccess runs the same way regardless of where it's installed. ### Installing Docker -Before you can run Attraccess, you need to install Docker on your system: +Before you can run FabAccess, you need to install Docker on your system: - **Windows**: Download and install [Docker Desktop for Windows](https://www.docker.com/products/docker-desktop) - **macOS**: Download and install [Docker Desktop for Mac](https://www.docker.com/products/docker-desktop) @@ -38,26 +38,26 @@ After installation: ## Step-by-Step Installation Guide -### Step 1: Create Directories for Attraccess +### Step 1: Create Directories for FabAccess -First, create directories to store your Attraccess data: +First, create directories to store your FabAccess data: ```bash -# Create a main directory for Attraccess -mkdir -p ~/attraccess +# Create a main directory for FabAccess +mkdir -p ~/fabaccess # Create subdirectories for storage and plugins -mkdir -p ~/attraccess/storage -mkdir -p ~/attraccess/plugins +mkdir -p ~/fabaccess/storage +mkdir -p ~/fabaccess/plugins ``` ### Step 2: Create Your Environment Configuration -You need to configure several settings for Attraccess to work correctly: +You need to configure several settings for FabAccess to work correctly: ```bash -# Navigate to your Attraccess directory -cd ~/attraccess +# Navigate to your FabAccess directory +cd ~/fabaccess # Create an environment file touch .env @@ -90,31 +90,31 @@ LOG_LEVELS=error,warn,log > - You can generate secure random strings with this command: `openssl rand -base64 32` > - Never share these values with anyone -### Step 3: Running Attraccess +### Step 3: Running FabAccess -Now that you've set up your configuration, you can run Attraccess: +Now that you've set up your configuration, you can run FabAccess: ```bash docker run -d \ - --name attraccess \ + --name fabaccess \ -p 3000:3000 \ --env-file ./.env \ -v $(pwd)/storage:/app/storage \ -v $(pwd)/plugins:/app/plugins \ - fabaccess/attraccess:latest + fabaccess/fabaccess:latest ``` -### Step 4: Accessing Attraccess +### Step 4: Accessing FabAccess Once the container is running: 1. Open your web browser 2. Go to `http://localhost:3000` -3. You should see the Attraccess login page +3. You should see the FabAccess login page #### Accessing from a Remote Server -If you've installed Attraccess on a remote server (not your local computer): +If you've installed FabAccess on a remote server (not your local computer): 1. You'll need to use the server's IP address or domain name instead of `localhost` 2. Open your web browser on your local computer @@ -135,7 +135,7 @@ If you've installed Attraccess on a remote server (not your local computer): ##### Firewall Considerations -If you can't access your Attraccess instance, you may need to: +If you can't access your FabAccess instance, you may need to: 1. Make sure port 3000 is open in your server's firewall 2. For most cloud providers (AWS, DigitalOcean, etc.), you'll need to configure security groups or firewall rules to allow traffic on port 3000 @@ -144,7 +144,7 @@ If you can't access your Attraccess instance, you may need to: For production environments, it's recommended to: -1. Set up a reverse proxy (like Nginx or Apache) in front of Attraccess +1. Set up a reverse proxy (like Nginx or Apache) in front of FabAccess 2. Configure SSL/TLS certificates (using Let's Encrypt) 3. Update your `VITE_ATTRACCESS_URL` to use `https://` instead of `http://` @@ -152,10 +152,10 @@ Detailed instructions for setting up a secure proxy are beyond the scope of this ### Step 5: First-Time Setup -The first time you access Attraccess, you'll need to: +The first time you access FabAccess, you'll need to: 1. Create an account (the first account is automatically Admin) -2. Enjoy Attraccess! +2. Enjoy FabAccess! ## Email Configuration Help @@ -199,7 +199,7 @@ If you encounter issues: - Check if the required ports are already in use - Verify your environment variables are set correctly -2. **Can't connect to Attraccess**: +2. **Can't connect to FabAccess**: - Make sure you're using the correct URL - Check if the container is running with `docker ps` @@ -210,13 +210,13 @@ If you encounter issues: - Some email providers may block sending from apps 4. **Getting error messages**: - - Check the logs with `docker logs attraccess` + - Check the logs with `docker logs fabaccess` ## Additional Resources - [Official Docker Documentation](https://docs.docker.com/) - [SMTP Configuration Guide](https://nodemailer.com/smtp/) -- [Attraccess GitHub Repository](https://github.com/attraccess/attraccess) +- [FabAccess GitHub Repository](https://github.com/fabaccess/fabaccess) For more advanced deployment options, check our specialized guides: diff --git a/docs/setup/docker-compose-guide.md b/docs/setup/docker-compose-guide.md index 57d36b08..b1d9a56f 100644 --- a/docs/setup/docker-compose-guide.md +++ b/docs/setup/docker-compose-guide.md @@ -1,10 +1,10 @@ # Docker Compose Deployment Guide -This guide walks you through setting up Attraccess using Docker Compose, which simplifies the management of Docker containers. +This guide walks you through setting up FabAccess using Docker Compose, which simplifies the management of Docker containers. ## What is Docker Compose? -Docker Compose is a tool that allows you to define and manage multi-container Docker applications. Even though Attraccess runs in a single container, Docker Compose makes it easier to manage the configuration, startup, and shutdown of your Attraccess instance. +Docker Compose is a tool that allows you to define and manage multi-container Docker applications. Even though FabAccess runs in a single container, Docker Compose makes it easier to manage the configuration, startup, and shutdown of your FabAccess instance. > 💡 **Benefit**: Using Docker Compose means you don't have to remember long Docker commands - all your settings are stored in a simple configuration file. @@ -18,19 +18,19 @@ Docker Compose is a tool that allows you to define and manage multi-container Do ### Step 1: Create a Project Directory -First, create a dedicated directory for your Attraccess deployment: +First, create a dedicated directory for your FabAccess deployment: ```bash -# Create a main directory for Attraccess -mkdir -p ~/attraccess +# Create a main directory for FabAccess +mkdir -p ~/fabaccess # Navigate to this directory -cd ~/attraccess +cd ~/fabaccess ``` ### Step 2: Create Docker Compose Configuration -Create a file named `docker-compose.yml` in your Attraccess directory: +Create a file named `docker-compose.yml` in your FabAccess directory: ```bash touch docker-compose.yml @@ -42,9 +42,9 @@ Open this file in a text editor and add the following configuration: version: '3' services: - attraccess: - image: fabaccess/attraccess:latest - container_name: attraccess + fabaccess: + image: fabaccess/fabaccess:latest + container_name: fabaccess restart: unless-stopped ports: - '3000:3000' @@ -70,32 +70,30 @@ services: - ./plugins:/app/plugins ``` - ### Choosing an Image Tag -Attraccess provides several Docker image tags to suit different needs. You can specify the desired tag in the `image` field of your `docker-compose.yml` file (e.g., `image: ghcr.io/fabinfra/attraccess:latest`). +FabAccess provides several Docker image tags to suit different needs. You can specify the desired tag in the `image` field of your `docker-compose.yml` file (e.g., `image: ghcr.io/fabinfra/fabaccess:latest`). Here are the available tags: -* **`latest`**: This tag always points to the most recent stable release of Attraccess. This is the recommended tag for most users as it provides a balance of new features and stability. - * Example: `ghcr.io/fabinfra/attraccess:latest` -* **`nightly-latest`**: This tag points to the latest successful build from the `main` development branch. It includes the newest features and bug fixes but may be less stable than a release version. Use this if you want to try out cutting-edge changes or help with testing. - * Example: `ghcr.io/fabinfra/attraccess:nightly-latest` -* **`nightly-`**: This tag points to a specific build from the `main` branch, identified by its short commit SHA (e.g., `nightly-abcdef1`). This is useful if you need to pin your deployment to a particular nightly version for testing or to avoid a regression introduced in a later nightly build. - * Example: `ghcr.io/fabinfra/attraccess:nightly-a1b2c3d` -* **``** (e.g., `v1.2.3`): This tag points to a specific official release version of Attraccess. Use this if you need to run a specific version of the application. - * Example: `ghcr.io/fabinfra/attraccess:v1.0.0` -* **`-`** (e.g., `v1.2.3-abcdef1`): This tag points to a specific official release version tied to its exact commit SHA. This offers the most precise version pinning. - * Example: `ghcr.io/fabinfra/attraccess:v1.0.0-e4f5g6h` +- **`latest`**: This tag always points to the most recent stable release of FabAccess. This is the recommended tag for most users as it provides a balance of new features and stability. + - Example: `ghcr.io/fabinfra/fabaccess:latest` +- **`nightly-latest`**: This tag points to the latest successful build from the `main` development branch. It includes the newest features and bug fixes but may be less stable than a release version. Use this if you want to try out cutting-edge changes or help with testing. + - Example: `ghcr.io/fabinfra/fabaccess:nightly-latest` +- **`nightly-`**: This tag points to a specific build from the `main` branch, identified by its short commit SHA (e.g., `nightly-abcdef1`). This is useful if you need to pin your deployment to a particular nightly version for testing or to avoid a regression introduced in a later nightly build. + - Example: `ghcr.io/fabinfra/fabaccess:nightly-a1b2c3d` +- **``** (e.g., `v1.2.3`): This tag points to a specific official release version of FabAccess. Use this if you need to run a specific version of the application. + - Example: `ghcr.io/fabinfra/fabaccess:v1.0.0` +- **`-`** (e.g., `v1.2.3-abcdef1`): This tag points to a specific official release version tied to its exact commit SHA. This offers the most precise version pinning. + - Example: `ghcr.io/fabinfra/fabaccess:v1.0.0-e4f5g6h` When updating, you can change the tag in your `docker-compose.yml` and then run `docker-compose pull && docker-compose up -d` to fetch and deploy the new version. - > ⚠️ **Security Note**: Replace the placeholder values for `AUTH_JWT_SECRET` and `AUTH_SESSION_SECRET` with strong, random strings. You can generate secure random strings with: `openssl rand -base64 32` ### Step 3: Create Storage Directories -Create directories for Attraccess data that will be mapped to the Docker container: +Create directories for FabAccess data that will be mapped to the Docker container: ```bash mkdir -p storage plugins @@ -131,10 +129,10 @@ Update the email settings in your `docker-compose.yml` file with your actual SMT #### URL Configuration -If you're deploying Attraccess to be accessible from other computers, update the `VITE_ATTRACCESS_URL` with your actual domain or IP address: +If you're deploying FabAccess to be accessible from other computers, update the `VITE_ATTRACCESS_URL` with your actual domain or IP address: ```yaml -- VITE_ATTRACCESS_URL=https://attraccess.yourdomain.com +- VITE_ATTRACCESS_URL=https://fabaccess.yourdomain.com ``` or @@ -143,9 +141,9 @@ or - VITE_ATTRACCESS_URL=http://your-server-ip:3000 ``` -### Step 5: Start Attraccess +### Step 5: Start FabAccess -Once you've configured your `docker-compose.yml` file, start Attraccess with: +Once you've configured your `docker-compose.yml` file, start FabAccess with: ```bash docker-compose up -d @@ -157,13 +155,13 @@ This command: ### Step 6: Verify Deployment -Check if Attraccess is running properly: +Check if FabAccess is running properly: ```bash docker-compose ps ``` -You should see your Attraccess container listed as running. +You should see your FabAccess container listed as running. ### Step 7: Access the Application @@ -172,11 +170,11 @@ Open your web browser and go to: - `http://localhost:3000` (if accessing from the same computer) - `http://your-server-ip:3000` (if accessing from another computer) -### Managing Your Attraccess Instance +### Managing Your FabAccess Instance #### View Logs -To see the logs from your Attraccess container: +To see the logs from your FabAccess container: ```bash docker-compose logs @@ -188,17 +186,17 @@ For continuous log monitoring: docker-compose logs -f ``` -#### Stop Attraccess +#### Stop FabAccess -To stop your Attraccess instance: +To stop your FabAccess instance: ```bash docker-compose down ``` -#### Restart Attraccess +#### Restart FabAccess -To restart your Attraccess instance: +To restart your FabAccess instance: ```bash docker-compose restart @@ -206,7 +204,7 @@ docker-compose restart #### Update to the Latest Version -To update Attraccess to the latest version: +To update FabAccess to the latest version: ```bash # Pull the latest image @@ -253,9 +251,9 @@ LOG_LEVELS=error,warn,log version: '3' services: - attraccess: - image: fabaccess/attraccess:latest - container_name: attraccess + fabaccess: + image: fabaccess/fabaccess:latest + container_name: fabaccess restart: unless-stopped ports: - '3000:3000' @@ -276,7 +274,7 @@ services: - Verify all required environment variables are set correctly - Check if port 3000 is already in use by another application -2. **Can't access Attraccess in browser**: +2. **Can't access FabAccess in browser**: - Verify the container is running with `docker-compose ps` - Check if your firewall is blocking port 3000 @@ -303,9 +301,9 @@ docker-compose logs -f ## Next Steps -After successfully deploying Attraccess, you can: +After successfully deploying FabAccess, you can: 1. Create an account (the first account is automatically Admin) -2. Enjoy Attraccess! +2. Enjoy FabAccess! -For more information on using Attraccess, refer to our [User Guide](/user/getting-started.md). +For more information on using FabAccess, refer to our [User Guide](/user/getting-started.md). diff --git a/docs/setup/installation.md b/docs/setup/installation.md index b509ea36..73ef2cb0 100644 --- a/docs/setup/installation.md +++ b/docs/setup/installation.md @@ -6,16 +6,16 @@ > - [Docker Compose Guide](setup/docker-compose-guide.md) - Simplified deployment with Docker Compose > - [Portainer Guide](setup/portainer-guide.md) - Visual deployment using the Portainer web interface -## 🚀 Getting Started with Attraccess +## 🚀 Getting Started with FabAccess -Attraccess is distributed as a single Docker container that includes everything you need to get up and running quickly. Follow these simple steps to deploy your instance: +FabAccess is distributed as a single Docker container that includes everything you need to get up and running quickly. Follow these simple steps to deploy your instance: ### 📦 Pull the Docker Image Get the latest version from our GitHub Docker registry: ```bash -docker pull fabaccess/attraccess:latest +docker pull fabaccess/fabaccess:latest ``` > [!TIP] @@ -23,7 +23,7 @@ docker pull fabaccess/attraccess:latest ### 🔧 Configure Environment Variables -Attraccess requires several environment variables to function properly: +FabAccess requires several environment variables to function properly: #### Authentication & Security @@ -32,7 +32,7 @@ Attraccess requires several environment variables to function properly: | `AUTH_JWT_ORIGIN` | JWT secret source, either "ENV" or "FILE" | Yes | - | | `AUTH_JWT_SECRET` | JWT secret when using ENV origin | If AUTH_JWT_ORIGIN=ENV | - | | `AUTH_SESSION_SECRET` | Secret for encrypting sessions | Yes | - | -| `VITE_ATTRACCESS_URL` | URL/hostname of your Attraccess instance | Yes | - | +| `VITE_ATTRACCESS_URL` | URL/hostname of your FabAccess instance | Yes | - | > [!WARNING] > Always use strong, unique secrets for `AUTH_JWT_SECRET` and `AUTH_SESSION_SECRET`. These are critical for your application's security. @@ -77,16 +77,16 @@ Attraccess requires several environment variables to function properly: ### 🐳 Run the Container -Start Attraccess with your configured environment variables: +Start FabAccess with your configured environment variables: ```bash docker run -d \ - --name attraccess \ + --name fabaccess \ -p 3000:3000 \ -e AUTH_JWT_ORIGIN=ENV \ -e AUTH_JWT_SECRET=your_secure_jwt_secret \ -e AUTH_SESSION_SECRET=your_secure_session_secret \ - -e VITE_ATTRACCESS_URL=https://attraccess.yourdomain.com \ + -e VITE_ATTRACCESS_URL=https://fabaccess.yourdomain.com \ -e SMTP_SERVICE=SMTP \ -e SMTP_FROM=no-reply@yourdomain.com \ -e SMTP_HOST=smtp.yourdomain.com \ @@ -96,12 +96,12 @@ docker run -d \ -e LOG_LEVELS=error,warn,log \ -v /path/to/plugins:/app/plugins \ -v /path/to/storage:/app/storage \ - fabaccess/attraccess:latest + fabaccess/fabaccess:latest ``` ### 📂 Storage Volume -Attraccess uses a dedicated storage directory to store uploaded files, resources, and cache: +FabAccess uses a dedicated storage directory to store uploaded files, resources, and cache: ```bash -v /path/to/storage:/app/storage @@ -134,14 +134,14 @@ Example using file-based JWT secret: ```bash docker run -d \ - --name attraccess \ + --name fabaccess \ -p 3000:3000 \ -e AUTH_JWT_ORIGIN=FILE \ -e AUTH_SESSION_SECRET=your_secure_session_secret \ - -e VITE_ATTRACCESS_URL=https://attraccess.yourdomain.com \ + -e VITE_ATTRACCESS_URL=https://fabaccess.yourdomain.com \ -v /path/to/jwt/secret:/app/secrets \ -v /path/to/storage:/app/storage \ - fabaccess/attraccess:latest + fabaccess/fabaccess:latest ``` > [!NOTE] @@ -162,19 +162,19 @@ The `LOG_LEVELS` environment variable accepts a comma-separated list of these va ### 🔌 Plugin Support -Attraccess supports plugins that extend its functionality. Mount your plugins directory to `/app/plugins` in the container: +FabAccess supports plugins that extend its functionality. Mount your plugins directory to `/app/plugins` in the container: ```bash docker run -d \ - --name attraccess \ + --name fabaccess \ -p 3000:3000 \ -e AUTH_JWT_ORIGIN=ENV \ -e AUTH_JWT_SECRET=your_secure_jwt_secret \ -e AUTH_SESSION_SECRET=your_secure_session_secret \ - -e VITE_ATTRACCESS_URL=https://attraccess.yourdomain.com \ + -e VITE_ATTRACCESS_URL=https://fabaccess.yourdomain.com \ -v /path/to/plugins:/app/plugins \ -v /path/to/storage:/app/storage \ - fabaccess/attraccess:latest + fabaccess/fabaccess:latest ``` ## 🔧 Troubleshooting @@ -182,11 +182,11 @@ docker run -d \ If you encounter issues during installation: 1. Verify all required environment variables are correctly set -2. Check the container logs: `docker logs attraccess` +2. Check the container logs: `docker logs fabaccess` 3. Ensure your SMTP configuration is correct 4. Verify network connectivity to required services -For additional support, please visit our [GitHub repository](https://github.com/attraccess/attraccess). +For additional support, please visit our [GitHub repository](https://github.com/fabaccess/fabaccess). ## 🌱 Alternative Deployment Methods @@ -198,7 +198,7 @@ If you're new to Docker or server deployment, our [Complete Beginner's Guide](se ### Using Docker Compose -Docker Compose provides a simpler way to manage your Attraccess configuration through a YAML file. Follow our [Docker Compose Guide](setup/docker-compose-guide.md) to get started. +Docker Compose provides a simpler way to manage your FabAccess configuration through a YAML file. Follow our [Docker Compose Guide](setup/docker-compose-guide.md) to get started. ### Using Portainer (GUI-based approach) diff --git a/docs/setup/portainer-guide.md b/docs/setup/portainer-guide.md index 2b76c700..0ad06fd9 100644 --- a/docs/setup/portainer-guide.md +++ b/docs/setup/portainer-guide.md @@ -1,6 +1,6 @@ -# Deploying Attraccess with Portainer +# Deploying FabAccess with Portainer -This guide explains how to set up Attraccess using Portainer, a user-friendly web interface for managing Docker containers. +This guide explains how to set up FabAccess using Portainer, a user-friendly web interface for managing Docker containers. ## What is Portainer? @@ -34,14 +34,14 @@ docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /va 4. Select "Local" to manage your local Docker environment 5. Click "Connect" -## Step 3: Create Volumes for Attraccess +## Step 3: Create Volumes for FabAccess 1. In the Portainer dashboard, click on "Volumes" in the left sidebar 2. Click "Add volume" -3. Name the first volume `attraccess_storage` and click "Create the volume" -4. Repeat to create a second volume named `attraccess_plugins` +3. Name the first volume `fabaccess_storage` and click "Create the volume" +4. Repeat to create a second volume named `fabaccess_plugins` -## Step 4: Deploy Attraccess Container +## Step 4: Deploy FabAccess Container ### Using the Web UI @@ -51,8 +51,8 @@ docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /va #### Basic Container Settings: -- **Name**: attraccess -- **Image**: fabaccess/attraccess:latest +- **Name**: fabaccess +- **Image**: fabaccess/fabaccess:latest - **Always pull the image**: Enable this option - **Restart policy**: Unless stopped @@ -70,10 +70,10 @@ docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /va - Click "Map additional volume" - **Container**: /app/storage - - **Volume**: attraccess_storage + - **Volume**: fabaccess_storage - Click "Map an additional volume" - **Container**: /app/plugins - - **Volume**: attraccess_plugins + - **Volume**: fabaccess_plugins 3. Go to the "Env" tab and add the following environment variables: @@ -101,7 +101,7 @@ Portainer also supports deploying applications using Docker Compose: 1. In the Portainer dashboard, click on "Stacks" in the left sidebar 2. Click "Add stack" -3. Give your stack a name (e.g., "attraccess") +3. Give your stack a name (e.g., "fabaccess") 4. Select "Web editor" as the build method 5. Paste the following Docker Compose configuration: @@ -109,9 +109,9 @@ Portainer also supports deploying applications using Docker Compose: version: '3' services: - attraccess: - image: fabaccess/attraccess:latest - container_name: attraccess + fabaccess: + image: fabaccess/fabaccess:latest + container_name: fabaccess restart: unless-stopped ports: - '3000:3000' @@ -133,46 +133,46 @@ services: # Logging level - LOG_LEVELS=error,warn,log volumes: - - attraccess_storage:/app/storage - - attraccess_plugins:/app/plugins + - fabaccess_storage:/app/storage + - fabaccess_plugins:/app/plugins volumes: - attraccess_storage: - attraccess_plugins: + fabaccess_storage: + fabaccess_plugins: ``` 6. Replace the placeholder values with your actual configuration 7. Click "Deploy the stack" -## Step 5: Access Attraccess +## Step 5: Access FabAccess 1. Once the container is running, open your web browser 2. Navigate to `http://your-server-ip:3000` -3. You should now see the Attraccess login page +3. You should now see the FabAccess login page -## Managing Attraccess with Portainer +## Managing FabAccess with Portainer -Portainer makes it easy to manage your Attraccess container: +Portainer makes it easy to manage your FabAccess container: ### Viewing Logs 1. In the Portainer dashboard, click on "Containers" -2. Find and click on your "attraccess" container +2. Find and click on your "fabaccess" container 3. Click on "Logs" to view the container logs ### Stopping and Starting 1. In the Portainer dashboard, click on "Containers" -2. Find your "attraccess" container +2. Find your "fabaccess" container 3. Use the "Stop", "Start", or "Restart" buttons as needed -### Updating Attraccess +### Updating FabAccess 1. In the Portainer dashboard, click on "Containers" -2. Stop your existing "attraccess" container +2. Stop your existing "fabaccess" container 3. Click on "Images" in the left sidebar -4. Find "fabaccess/attraccess" and click "Pull" -5. Go back to "Containers" and start your "attraccess" container again +4. Find "fabaccess/fabaccess" and click "Pull" +5. Go back to "Containers" and start your "fabaccess" container again ## Email Configuration Help @@ -180,7 +180,7 @@ Portainer makes it easy to manage your Attraccess container: To use Gmail as your email service: -1. Go to your "attraccess" container in Portainer +1. Go to your "fabaccess" container in Portainer 2. Click "Duplicate/Edit" 3. Go to "Advanced container settings" > "Env" 4. Update the email settings: @@ -217,7 +217,7 @@ For Outlook or Office 365: - Verify all environment variables are set correctly - Ensure the ports aren't already in use by another container -2. **Can't access Attraccess from web browser**: +2. **Can't access FabAccess from web browser**: - Verify the container is running in Portainer - Check if your firewall is blocking port 3000 @@ -242,9 +242,9 @@ To get more detailed logs for troubleshooting: ## Next Steps -After successfully deploying Attraccess with Portainer, you can: +After successfully deploying FabAccess with Portainer, you can: 1. Create an account (the first account is automatically Admin) -2. Enjoy Attraccess! +2. Enjoy FabAccess! -For further guidance on using Attraccess, refer to our [User Guide](/user/getting-started.md). +For further guidance on using FabAccess, refer to our [User Guide](/user/getting-started.md). diff --git a/docs/setup/ssl-configuration.md b/docs/setup/ssl-configuration.md index 77de169d..2685baca 100644 --- a/docs/setup/ssl-configuration.md +++ b/docs/setup/ssl-configuration.md @@ -1,18 +1,18 @@ # SSL Configuration > [!NOTE] -> SSL/TLS encryption is essential for securing your Attraccess instance, especially when accessing it from external networks or when handling sensitive data. +> SSL/TLS encryption is essential for securing your FabAccess instance, especially when accessing it from external networks or when handling sensitive data. ## 🔒 SSL Options -Attraccess provides two main approaches for SSL configuration: +FabAccess provides two main approaches for SSL configuration: 1. **Automatic Self-Signed Certificates** - Perfect for development, testing, or internal networks 2. **Custom SSL Certificates** - Recommended for production environments with proper CA-signed certificates ## 🔐 Automatic Self-Signed Certificates -The easiest way to enable SSL is by using automatically generated self-signed certificates. Attraccess can generate these certificates automatically on startup. +The easiest way to enable SSL is by using automatically generated self-signed certificates. FabAccess can generate these certificates automatically on startup. ### Configuration @@ -26,22 +26,22 @@ SSL_GENERATE_SELF_SIGNED_CERTIFICATES=true ```bash docker run -d \ - --name attraccess \ + --name fabaccess \ -p 443:3000 \ -e SSL_GENERATE_SELF_SIGNED_CERTIFICATES=true \ -e AUTH_JWT_ORIGIN=ENV \ -e AUTH_JWT_SECRET=your_secure_jwt_secret \ -e AUTH_SESSION_SECRET=your_secure_session_secret \ - -e VITE_ATTRACCESS_URL=https://attraccess.yourdomain.com \ + -e VITE_ATTRACCESS_URL=https://fabaccess.yourdomain.com \ -v /path/to/storage:/app/storage \ - fabaccess/attraccess:latest + fabaccess/fabaccess:latest ``` ### How It Works When `SSL_GENERATE_SELF_SIGNED_CERTIFICATES=true`: -1. Attraccess automatically generates a Certificate Authority (CA) and SSL certificate +1. FabAccess automatically generates a Certificate Authority (CA) and SSL certificate 2. The certificate is valid for **365 days (1 year)** 3. Certificates are stored in your storage directory with the domain name (e.g., `yourdomain.com.pem` and `yourdomain.com.key`) 4. The certificate covers multiple domains: `127.0.0.1`, `localhost`, and your configured domain @@ -67,23 +67,23 @@ cp yourdomain.com.key /path/to/storage/ # Run without SSL_GENERATE_SELF_SIGNED_CERTIFICATES docker run -d \ - --name attraccess \ + --name fabaccess \ -p 443:3000 \ -e AUTH_JWT_ORIGIN=ENV \ -e AUTH_JWT_SECRET=your_secure_jwt_secret \ -e AUTH_SESSION_SECRET=your_secure_session_secret \ - -e VITE_ATTRACCESS_URL=https://attraccess.yourdomain.com \ + -e VITE_ATTRACCESS_URL=https://fabaccess.yourdomain.com \ -v /path/to/storage:/app/storage \ - fabaccess/attraccess:latest + fabaccess/fabaccess:latest ``` ## 🔄 Certificate Renewal & Expiration ### Self-Signed Certificate Renewal -Self-signed certificates generated by Attraccess are valid for **1 year**. When they expire: +Self-signed certificates generated by FabAccess are valid for **1 year**. When they expire: -1. **Stop** your Attraccess container +1. **Stop** your FabAccess container 2. **Delete** the expired certificate files from your storage directory: ```bash rm /path/to/storage/yourdomain.com.pem @@ -98,7 +98,7 @@ For custom certificates: 1. Obtain renewed certificates from your CA before expiration 2. Replace the old certificate files in your storage directory -3. Restart your Attraccess container +3. Restart your FabAccess container ## 📱 Trusting Self-Signed Certificates @@ -106,7 +106,7 @@ Since self-signed certificates are not issued by a trusted Certificate Authority ### 🍎 iOS/iPhone/iPad -1. Open Safari and navigate to your Attraccess URL +1. Open Safari and navigate to your FabAccess URL 2. Tap "Advanced" when you see the certificate warning 3. Tap "Proceed to [domain]" 4. Go to **Settings** → **General** → **About** → **Certificate Trust Settings** @@ -140,14 +140,14 @@ Since self-signed certificates are not issued by a trusted Certificate Authority #### Chrome/Edge -1. Navigate to your Attraccess URL +1. Navigate to your FabAccess URL 2. Click "Advanced" on the security warning 3. Click "Proceed to [domain] (unsafe)" 4. Alternatively, add `--ignore-certificate-errors` to your browser launch arguments (development only) #### Firefox -1. Navigate to your Attraccess URL +1. Navigate to your FabAccess URL 2. Click "Advanced" on the security warning 3. Click "Accept the Risk and Continue" @@ -204,4 +204,4 @@ When using SSL, make sure to: - Update any firewall rules to allow HTTPS traffic on port 443 > [!NOTE] -> The container always runs on port 3000 internally, but for SSL we map the standard HTTPS port 443 to the container's port 3000. This allows users to access your Attraccess instance using the standard HTTPS port without specifying a port number in the URL. +> The container always runs on port 3000 internally, but for SSL we map the standard HTTPS port 443 to the container's port 3000. This allows users to access your FabAccess instance using the standard HTTPS port without specifying a port number in the URL. diff --git a/docs/user/resources/iots/mqtt/mqtt-deployment.md b/docs/user/resources/iots/mqtt/mqtt-deployment.md index 86f5072d..96e7bf16 100644 --- a/docs/user/resources/iots/mqtt/mqtt-deployment.md +++ b/docs/user/resources/iots/mqtt/mqtt-deployment.md @@ -2,7 +2,7 @@ ## Overview -The MQTT integration allows Attraccess to publish resource usage status changes to MQTT brokers. This enables integration with IoT devices, home automation systems, and other systems that support MQTT. +The MQTT integration allows FabAccess to publish resource usage status changes to MQTT brokers. This enables integration with IoT devices, home automation systems, and other systems that support MQTT. ## Production Deployment Considerations @@ -54,7 +54,7 @@ Recommended MQTT brokers: 3. **Topic Structure**: - - Use a specific, unique prefix for all topics (e.g., `company/location/attraccess/resources/`) + - Use a specific, unique prefix for all topics (e.g., `company/location/fabaccess/resources/`) - Ensure topics don't leak sensitive information 4. **Message Content**: diff --git a/docs/user/resources/iots/mqtt/mqtt-examples.md b/docs/user/resources/iots/mqtt/mqtt-examples.md index f47d6d1d..b002aa8e 100644 --- a/docs/user/resources/iots/mqtt/mqtt-examples.md +++ b/docs/user/resources/iots/mqtt/mqtt-examples.md @@ -1,6 +1,6 @@ # MQTT Integration Examples -This document provides practical examples of using Attraccess's MQTT integration feature with common IoT platforms and devices. +This document provides practical examples of using FabAccess's MQTT integration feature with common IoT platforms and devices. ## Topic and Message Templates @@ -17,7 +17,7 @@ Good MQTT topic design follows these principles: ### Example Topic Structures ``` -attraccess/resources/{resourceId}/status +fabaccess/resources/{resourceId}/status organization/resources/{resourceName}/usage site/{location}/resource/{resourceId}/state department/{departmentName}/resources/{resourceName}/status @@ -296,12 +296,12 @@ For complex data structures: To verify your MQTT integration is working correctly: -1. Configure your MQTT server and resource in Attraccess +1. Configure your MQTT server and resource in FabAccess 2. Set up an MQTT client to subscribe to your topics: ```bash mosquitto_sub -h localhost -p 1883 -t "resources/#" -v ``` -3. Start and end resource usage in Attraccess +3. Start and end resource usage in FabAccess 4. Verify the messages are received in the expected format This approach helps troubleshoot issues before connecting to actual IoT devices. diff --git a/docs/user/resources/iots/mqtt/mqtt-explorer.md b/docs/user/resources/iots/mqtt/mqtt-explorer.md index 6550746e..b81315e6 100644 --- a/docs/user/resources/iots/mqtt/mqtt-explorer.md +++ b/docs/user/resources/iots/mqtt/mqtt-explorer.md @@ -13,7 +13,7 @@ The MQTTX Web client is automatically started as part of the local development e 1. Open your web browser and navigate to [http://localhost:4000](http://localhost:4000) 2. The MQTTX Web interface should load automatically 3. To connect to the MQTT broker, click on "New Connection" and use these settings: - - Name: `Attraccess MQTT` + - Name: `FabAccess MQTT` - Host: `localhost` - Port: `1883` - No username/password (development mode) @@ -38,7 +38,7 @@ The main interface will display all received messages for your subscribed topics ### Testing Resource Usage Events -When you mark a resource as "in use" or "not in use" in Attraccess, the system will publish messages to topics following this pattern: +When you mark a resource as "in use" or "not in use" in FabAccess, the system will publish messages to topics following this pattern: ``` resources/{id}/status diff --git a/docs/user/resources/iots/mqtt/mqtt-integration.md b/docs/user/resources/iots/mqtt/mqtt-integration.md index 0f6cd1fc..36f61f8a 100644 --- a/docs/user/resources/iots/mqtt/mqtt-integration.md +++ b/docs/user/resources/iots/mqtt/mqtt-integration.md @@ -1,12 +1,12 @@ -# MQTT Integration for Attraccess +# MQTT Integration for FabAccess -This documentation covers the MQTT integration feature that allows Attraccess to publish messages to MQTT servers when resources are used or released. +This documentation covers the MQTT integration feature that allows FabAccess to publish messages to MQTT servers when resources are used or released. ## Overview The MQTT integration allows administrators to configure resource-specific messaging to MQTT servers. This enables integration with external systems and IoT devices to react to resource usage events. -When a resource is used or released, Attraccess can automatically publish messages to one or more MQTT servers, which can trigger actions like turning on/off lights, managing power to workstations, or updating status displays. +When a resource is used or released, FabAccess can automatically publish messages to one or more MQTT servers, which can trigger actions like turning on/off lights, managing power to workstations, or updating status displays. ## Configuration Options diff --git a/docs/user/resources/iots/mqtt/mqtt-setup-guide.md b/docs/user/resources/iots/mqtt/mqtt-setup-guide.md index 50b88e5a..bdf332cb 100644 --- a/docs/user/resources/iots/mqtt/mqtt-setup-guide.md +++ b/docs/user/resources/iots/mqtt/mqtt-setup-guide.md @@ -1,6 +1,6 @@ # MQTT Broker Setup Guide -This guide provides practical instructions for setting up and configuring an MQTT broker for use with Attraccess. +This guide provides practical instructions for setting up and configuring an MQTT broker for use with FabAccess. ## Development Environment Setup @@ -94,7 +94,7 @@ The easiest way to set up an MQTT broker for development is using the included D ### Using Mosquitto CLI Tools > [!NOTE] -> Mosquitto CLI tools provide a quick way to verify your broker configuration before integrating with Attraccess. They're particularly useful for troubleshooting connection issues. +> Mosquitto CLI tools provide a quick way to verify your broker configuration before integrating with FabAccess. They're particularly useful for troubleshooting connection issues. 1. Subscribe to a topic: @@ -139,7 +139,7 @@ For production environments, we recommend additional security measures: 1. Create user credentials: ```bash - sudo mosquitto_passwd -c /etc/mosquitto/passwd attraccess + sudo mosquitto_passwd -c /etc/mosquitto/passwd fabaccess ``` 2. Update the configuration: @@ -195,7 +195,7 @@ For production environments, we recommend additional security measures: restart: unless-stopped ``` -2. Configure Attraccess to use TLS and authentication for connecting to the MQTT broker. +2. Configure FabAccess to use TLS and authentication for connecting to the MQTT broker. ## Cloud-Based MQTT Brokers @@ -212,11 +212,11 @@ These services typically provide: - High availability and scalability - Usage metrics and monitoring -## Configuring Attraccess with MQTT Broker +## Configuring FabAccess with MQTT Broker Once your MQTT broker is running: -1. Navigate to the MQTT Server management page in Attraccess. +1. Navigate to the MQTT Server management page in FabAccess. 2. Add a new MQTT server with: @@ -232,4 +232,4 @@ Once your MQTT broker is running: 4. Add MQTT configuration to your resources to start publishing messages. > [!NOTE] -> Attraccess will maintain a persistent connection to your MQTT broker. If the connection is lost, it will automatically attempt to reconnect using an exponential backoff strategy. +> FabAccess will maintain a persistent connection to your MQTT broker. If the connection is lost, it will automatically attempt to reconnect using an exponential backoff strategy. diff --git a/libs/api-client/package.json b/libs/api-client/package.json index 25d147f5..2fa88349 100644 --- a/libs/api-client/package.json +++ b/libs/api-client/package.json @@ -1,5 +1,5 @@ { - "name": "@attraccess/api-client", + "name": "@fabaccess/api-client", "version": "0.0.16", "type": "commonjs", "main": "./src/index.js", diff --git a/libs/api-client/src/generated/Api.ts b/libs/api-client/src/generated/Api.ts index cd6c2bd8..60a2453c 100644 --- a/libs/api-client/src/generated/Api.ts +++ b/libs/api-client/src/generated/Api.ts @@ -355,7 +355,7 @@ export interface CreateOIDCConfigurationDto { userInfoURL: string; /** * The client ID of the provider - * @example "attraccess-client" + * @example "fabaccess-client" */ clientId: string; /** @@ -403,7 +403,7 @@ export interface UpdateOIDCConfigurationDto { userInfoURL?: string; /** * The client ID of the provider - * @example "attraccess-client" + * @example "fabaccess-client" */ clientId?: string; /** @@ -711,7 +711,7 @@ export interface MqttServer { password?: string; /** * Client ID for MQTT connection - * @example "attraccess-client-1" + * @example "fabaccess-client-1" */ clientId?: string; /** @@ -1677,7 +1677,7 @@ export interface PluginMain { backend: PluginMainBackend; } -export interface PluginAttraccessVersion { +export interface PluginFabAccessVersion { /** * The minimum version of the plugin * @example "1.0.0" @@ -1707,7 +1707,7 @@ export interface LoadedPluginManifest { * @example "1.0.0" */ version: string; - attraccessVersion: PluginAttraccessVersion; + fabaccessVersion: PluginFabAccessVersion; /** * The directory of the plugin * @example "plugin-name" @@ -1847,7 +1847,7 @@ export interface NFCCard { } export interface InfoData { - /** @example "Attraccess API" */ + /** @example "FabAccess API" */ name?: string; /** @example "ok" */ status?: string; @@ -1920,6 +1920,7 @@ export interface ConfirmEmailChangeData { export type AdminChangeEmailData = User; export interface CreateSessionPayload { + /** Username or email address */ username?: string; password?: string; } @@ -4291,11 +4292,11 @@ export class HttpClient { } /** - * @title Attraccess API + * @title FabAccess API * @version 1.0.0 * @contact * - * The Attraccess API used to manage machine and tool access in a Makerspace or FabLab + * The FabAccess API used to manage machine and tool access in a Makerspace or FabLab */ export class Api< SecurityDataType extends unknown, diff --git a/libs/database-entities/package.json b/libs/database-entities/package.json index b216143c..550bd4b6 100644 --- a/libs/database-entities/package.json +++ b/libs/database-entities/package.json @@ -1,5 +1,5 @@ { - "name": "@attraccess/database-entities", + "name": "@fabaccess/database-entities", "version": "0.0.16", "private": false, "type": "commonjs", diff --git a/libs/database-entities/src/lib/entities/mqttServer.entity.ts b/libs/database-entities/src/lib/entities/mqttServer.entity.ts index 24eba32d..bab15c9f 100644 --- a/libs/database-entities/src/lib/entities/mqttServer.entity.ts +++ b/libs/database-entities/src/lib/entities/mqttServer.entity.ts @@ -51,7 +51,7 @@ export class MqttServer { @Column({ nullable: true, type: 'text' }) @ApiProperty({ description: 'Client ID for MQTT connection', - example: 'attraccess-client-1', + example: 'fabaccess-client-1', required: false, }) clientId!: string | null; diff --git a/libs/env/package.json b/libs/env/package.json index f2f56908..0471c194 100644 --- a/libs/env/package.json +++ b/libs/env/package.json @@ -1,5 +1,5 @@ { - "name": "@attraccess/env", + "name": "@fabaccess/env", "version": "0.0.16", "type": "commonjs", "main": "./src/index.js", @@ -13,8 +13,6 @@ ], "dependencies": { "tslib": "^2.3.0", - "zod": "^3.24.4" - } } diff --git a/libs/plugins-backend-sdk/package.json b/libs/plugins-backend-sdk/package.json index b4d19fcb..f5506b7f 100644 --- a/libs/plugins-backend-sdk/package.json +++ b/libs/plugins-backend-sdk/package.json @@ -1,5 +1,5 @@ { - "name": "@attraccess/plugins-backend-sdk", + "name": "@fabaccess/plugins-backend-sdk", "version": "0.0.16", "type": "commonjs", "main": "./src/index.js", @@ -21,7 +21,7 @@ ], "dependencies": { "tslib": "^2.3.0", - "@attraccess/database-entities": "*", + "@fabaccess/database-entities": "*", "@nestjs/common": "^11.1.0", "rxjs": "^7.8.2", "@nestjs/core": "^11.1.0", diff --git a/libs/plugins-backend-sdk/src/index.ts b/libs/plugins-backend-sdk/src/index.ts index eac48c1a..d89711e6 100644 --- a/libs/plugins-backend-sdk/src/index.ts +++ b/libs/plugins-backend-sdk/src/index.ts @@ -2,7 +2,7 @@ export * from './lib/plugin.interface'; export * from './lib/semver'; export * from './lib/auth-decorator'; -export * from '@attraccess/database-entities'; -export * as entities from '@attraccess/database-entities'; +export * from '@fabaccess/database-entities'; +export * as entities from '@fabaccess/database-entities'; export * from './lib/auth.types'; export * from './lib/jwt.guard'; diff --git a/libs/plugins-backend-sdk/src/lib/auth-decorator.ts b/libs/plugins-backend-sdk/src/lib/auth-decorator.ts index fae3b4f4..d25ac183 100644 --- a/libs/plugins-backend-sdk/src/lib/auth-decorator.ts +++ b/libs/plugins-backend-sdk/src/lib/auth-decorator.ts @@ -9,7 +9,7 @@ import { } from '@nestjs/common'; import { Observable } from 'rxjs'; import { Reflector } from '@nestjs/core'; -import { SystemPermission, User } from '@attraccess/database-entities'; +import { SystemPermission, User } from '@fabaccess/database-entities'; import { ApiBearerAuth, ApiUnauthorizedResponse } from '@nestjs/swagger'; import { JwtGuard } from './jwt.guard'; diff --git a/libs/plugins-backend-sdk/src/lib/auth.types.ts b/libs/plugins-backend-sdk/src/lib/auth.types.ts index 9357f04e..b2f5ce56 100644 --- a/libs/plugins-backend-sdk/src/lib/auth.types.ts +++ b/libs/plugins-backend-sdk/src/lib/auth.types.ts @@ -1,4 +1,4 @@ -import { User } from '@attraccess/database-entities'; +import { User } from '@fabaccess/database-entities'; import { Request as BaseRequest } from 'express'; export interface AuthenticatedUser extends User { diff --git a/libs/plugins-backend-sdk/src/lib/plugin.interface.ts b/libs/plugins-backend-sdk/src/lib/plugin.interface.ts index b54afc41..70d4713c 100644 --- a/libs/plugins-backend-sdk/src/lib/plugin.interface.ts +++ b/libs/plugins-backend-sdk/src/lib/plugin.interface.ts @@ -1,4 +1,4 @@ -import { Resource, User } from '@attraccess/database-entities'; +import { Resource, User } from '@fabaccess/database-entities'; export enum SystemEvent { RESOURCE_USAGE_STARTED = 'RESOURCE_USAGE_STARTED', diff --git a/libs/plugins-frontend-sdk/package.json b/libs/plugins-frontend-sdk/package.json index 4812053b..0076b254 100644 --- a/libs/plugins-frontend-sdk/package.json +++ b/libs/plugins-frontend-sdk/package.json @@ -1,5 +1,5 @@ { - "name": "@attraccess/plugins-frontend-sdk", + "name": "@fabaccess/plugins-frontend-sdk", "version": "0.0.16", "type": "module", "main": "./index.js", diff --git a/libs/plugins-frontend-sdk/src/lib/frontend.pluggable.ts b/libs/plugins-frontend-sdk/src/lib/frontend.pluggable.ts index 153937ca..b9eb358f 100644 --- a/libs/plugins-frontend-sdk/src/lib/frontend.pluggable.ts +++ b/libs/plugins-frontend-sdk/src/lib/frontend.pluggable.ts @@ -1,4 +1,4 @@ -import { User } from '@attraccess/database-entities'; +import { User } from '@fabaccess/database-entities'; import { IPlugin } from 'react-pluggable'; export enum FrontendLocation {} @@ -11,12 +11,12 @@ export const getPluginFunctionName = (pluginName: string, func: FRONTEND_FUNCTIO return `${pluginName}.${func}`; }; -export interface AttraccessFrontendPluginAuthData { +export interface FabAccessFrontendPluginAuthData { authToken: string; user: User; } -export interface AttraccessFrontendPlugin extends IPlugin { - onApiAuthStateChange(authData: null | AttraccessFrontendPluginAuthData): void; +export interface FabAccessFrontendPlugin extends IPlugin { + onApiAuthStateChange(authData: null | FabAccessFrontendPluginAuthData): void; onApiEndpointChange(endpoint: string): void; } diff --git a/libs/plugins-frontend-sdk/src/lib/frontend.routing.ts b/libs/plugins-frontend-sdk/src/lib/frontend.routing.ts index 30a630ca..5a5d6b54 100644 --- a/libs/plugins-frontend-sdk/src/lib/frontend.routing.ts +++ b/libs/plugins-frontend-sdk/src/lib/frontend.routing.ts @@ -1,4 +1,4 @@ -import { SystemPermissions } from '@attraccess/database-entities'; +import { SystemPermissions } from '@fabaccess/database-entities'; import { PathRouteProps } from 'react-router-dom'; // Extended route type that includes sidebar options diff --git a/libs/plugins-frontend-sdk/vite.config.ts b/libs/plugins-frontend-sdk/vite.config.ts index 7da9a0bb..eb90cabe 100644 --- a/libs/plugins-frontend-sdk/vite.config.ts +++ b/libs/plugins-frontend-sdk/vite.config.ts @@ -13,8 +13,8 @@ const sharedLibs = [ 'react-pluggable', '@heroui/react', '@tanstack/react-query', - '@attraccess/react-query-client', - '@attraccess/plugins-frontend-ui', + '@fabaccess/react-query-client', + '@fabaccess/plugins-frontend-ui', ]; export default defineConfig({ diff --git a/libs/plugins-frontend-ui/package.json b/libs/plugins-frontend-ui/package.json index ac6feb7b..10f80a3b 100644 --- a/libs/plugins-frontend-ui/package.json +++ b/libs/plugins-frontend-ui/package.json @@ -1,5 +1,5 @@ { - "name": "@attraccess/plugins-frontend-ui", + "name": "@fabaccess/plugins-frontend-ui", "version": "0.0.16", "type": "module", "main": "./index.js", diff --git a/libs/plugins-frontend-ui/src/lib/components/attraccess-user/de.json b/libs/plugins-frontend-ui/src/lib/components/FabAccessUser/de.json similarity index 100% rename from libs/plugins-frontend-ui/src/lib/components/attraccess-user/de.json rename to libs/plugins-frontend-ui/src/lib/components/FabAccessUser/de.json diff --git a/libs/plugins-frontend-ui/src/lib/components/attraccess-user/en.json b/libs/plugins-frontend-ui/src/lib/components/FabAccessUser/en.json similarity index 100% rename from libs/plugins-frontend-ui/src/lib/components/attraccess-user/en.json rename to libs/plugins-frontend-ui/src/lib/components/FabAccessUser/en.json diff --git a/libs/plugins-frontend-ui/src/lib/components/attraccess-user/AttraccessUser.tsx b/libs/plugins-frontend-ui/src/lib/components/FabAccessUser/index.tsx similarity index 74% rename from libs/plugins-frontend-ui/src/lib/components/attraccess-user/AttraccessUser.tsx rename to libs/plugins-frontend-ui/src/lib/components/FabAccessUser/index.tsx index b876af1a..42d143b3 100644 --- a/libs/plugins-frontend-ui/src/lib/components/attraccess-user/AttraccessUser.tsx +++ b/libs/plugins-frontend-ui/src/lib/components/FabAccessUser/index.tsx @@ -1,4 +1,4 @@ -import { User } from '@attraccess/react-query-client'; +import { User } from '@fabaccess/react-query-client'; import { useTranslations } from '../../i18n'; import { User as UserComponent, UserProps } from '@heroui/react'; import { toSvg } from 'jdenticon'; @@ -6,15 +6,15 @@ import { useMemo } from 'react'; import * as en from './en.json'; import * as de from './de.json'; -interface AttraccessUserProps { +interface FabAccessUserProps { user?: User; description?: UserProps['description']; } -export function AttraccessUser(props: AttraccessUserProps & Omit) { +export function FabAccessUser(props: FabAccessUserProps & Omit) { const { user, description, ...userComponentProps } = props; - const { t } = useTranslations('attraccessUser', { en, de }); + const { t } = useTranslations('fabaccessUser', { en, de }); const avatarIcon = useMemo(() => { const svg = toSvg(user?.id || 'unknown', 100); diff --git a/libs/plugins-frontend-ui/src/lib/components/ResourceSelector/ResourceSelector.tsx b/libs/plugins-frontend-ui/src/lib/components/ResourceSelector/ResourceSelector.tsx index 837c6c67..8a8020e8 100644 --- a/libs/plugins-frontend-ui/src/lib/components/ResourceSelector/ResourceSelector.tsx +++ b/libs/plugins-frontend-ui/src/lib/components/ResourceSelector/ResourceSelector.tsx @@ -1,5 +1,5 @@ import { useTranslations } from '../../i18n'; -import { useResourcesServiceGetAllResources } from '@attraccess/react-query-client'; +import { useResourcesServiceGetAllResources } from '@fabaccess/react-query-client'; import { Chip, Input, Listbox, ListboxItem, ScrollShadow, Spinner } from '@heroui/react'; import { useState, PropsWithChildren, useMemo } from 'react'; import de from './ResourceSelector.de.json'; diff --git a/libs/plugins-frontend-ui/src/lib/components/index.ts b/libs/plugins-frontend-ui/src/lib/components/index.ts index 25b65be2..ee30db61 100644 --- a/libs/plugins-frontend-ui/src/lib/components/index.ts +++ b/libs/plugins-frontend-ui/src/lib/components/index.ts @@ -1,4 +1,4 @@ -export * from './attraccess-user/AttraccessUser'; +export * from './FabAccessUser'; export * from './datetime-display/DateTimeDisplay'; export * from './duration-display/DurationDisplay'; export * from './user-search/UserSearch'; diff --git a/libs/plugins-frontend-ui/src/lib/components/user-search/UserSearch.tsx b/libs/plugins-frontend-ui/src/lib/components/user-search/UserSearch.tsx index 10dce289..c40329b5 100644 --- a/libs/plugins-frontend-ui/src/lib/components/user-search/UserSearch.tsx +++ b/libs/plugins-frontend-ui/src/lib/components/user-search/UserSearch.tsx @@ -1,8 +1,8 @@ import { HTMLAttributes, useEffect, useMemo, useState } from 'react'; import { Autocomplete, AutocompleteItem, AutocompleteProps } from '@heroui/autocomplete'; import { useTranslations } from '../../i18n'; -import { AttraccessUser } from '../attraccess-user/AttraccessUser'; -import { User, useUsersServiceFindMany, useUsersServiceGetOneUserById } from '@attraccess/react-query-client'; +import { FabAccessUser } from '../FabAccessUser'; +import { User, useUsersServiceFindMany, useUsersServiceGetOneUserById } from '@fabaccess/react-query-client'; import * as en from './en.json'; import * as de from './de.json'; @@ -88,7 +88,7 @@ export function UserSearch(props: Readonly) { > {(item) => ( - + )} @@ -97,7 +97,7 @@ export function UserSearch(props: Readonly) {
- {selectedUser && } + {selectedUser && } {afterSelection}
diff --git a/libs/plugins-frontend-ui/vite.config.ts b/libs/plugins-frontend-ui/vite.config.ts index 5fbd675c..59b72d35 100644 --- a/libs/plugins-frontend-ui/vite.config.ts +++ b/libs/plugins-frontend-ui/vite.config.ts @@ -13,8 +13,8 @@ const sharedLibs = [ 'react-pluggable', '@heroui/react', '@tanstack/react-query', - '@attraccess/react-query-client', - '@attraccess/plugins-frontend-ui', + '@fabaccess/react-query-client', + '@fabaccess/plugins-frontend-ui', ]; export default defineConfig({ diff --git a/libs/react-query-client/package.json b/libs/react-query-client/package.json index 580df457..457144c4 100644 --- a/libs/react-query-client/package.json +++ b/libs/react-query-client/package.json @@ -1,5 +1,5 @@ { - "name": "@attraccess/react-query-client", + "name": "@fabaccess/react-query-client", "version": "0.0.16", "type": "commonjs", "main": "./src/index.js", diff --git a/libs/react-query-client/src/lib/requests/schemas.gen.ts b/libs/react-query-client/src/lib/requests/schemas.gen.ts index 7271741d..7ba1e498 100644 --- a/libs/react-query-client/src/lib/requests/schemas.gen.ts +++ b/libs/react-query-client/src/lib/requests/schemas.gen.ts @@ -463,7 +463,7 @@ export const $CreateOIDCConfigurationDto = { clientId: { type: 'string', description: 'The client ID of the provider', - example: 'attraccess-client' + example: 'fabaccess-client' }, clientSecret: { type: 'string', @@ -526,7 +526,7 @@ export const $UpdateOIDCConfigurationDto = { clientId: { type: 'string', description: 'The client ID of the provider', - example: 'attraccess-client' + example: 'fabaccess-client' }, clientSecret: { type: 'string', @@ -917,7 +917,7 @@ export const $MqttServer = { clientId: { type: 'string', description: 'Client ID for MQTT connection', - example: 'attraccess-client-1' + example: 'fabaccess-client-1' }, useTls: { type: 'boolean', @@ -2155,7 +2155,7 @@ export const $PluginMain = { required: ['frontend', 'backend'] } as const; -export const $PluginAttraccessVersion = { +export const $PluginFabAccessVersion = { type: 'object', properties: { min: { @@ -2193,8 +2193,8 @@ export const $LoadedPluginManifest = { description: 'The version of the plugin', example: '1.0.0' }, - attraccessVersion: { - '$ref': '#/components/schemas/PluginAttraccessVersion' + fabaccessVersion: { + '$ref': '#/components/schemas/PluginFabAccessVersion' }, pluginDirectory: { type: 'string', @@ -2207,7 +2207,7 @@ export const $LoadedPluginManifest = { example: '123e4567-e89b-12d3-a456-426614174000' } }, - required: ['name', 'main', 'version', 'attraccessVersion', 'pluginDirectory', 'id'] + required: ['name', 'main', 'version', 'fabaccessVersion', 'pluginDirectory', 'id'] } as const; export const $UploadPluginDto = { diff --git a/libs/react-query-client/src/lib/requests/types.gen.ts b/libs/react-query-client/src/lib/requests/types.gen.ts index f2778d87..08ed8b76 100644 --- a/libs/react-query-client/src/lib/requests/types.gen.ts +++ b/libs/react-query-client/src/lib/requests/types.gen.ts @@ -1486,7 +1486,7 @@ export type PluginMain = { backend: PluginMainBackend; }; -export type PluginAttraccessVersion = { +export type PluginFabAccessVersion = { /** * The minimum version of the plugin */ @@ -1511,7 +1511,7 @@ export type LoadedPluginManifest = { * The version of the plugin */ version: string; - attraccessVersion: PluginAttraccessVersion; + fabaccessVersion: PluginFabAccessVersion; /** * The directory of the plugin */ diff --git a/libs/react-query-client/vite.config.ts b/libs/react-query-client/vite.config.ts index b4f2fd85..25a8cfa8 100644 --- a/libs/react-query-client/vite.config.ts +++ b/libs/react-query-client/vite.config.ts @@ -12,8 +12,8 @@ const sharedLibs = [ 'react-pluggable', '@heroui/react', '@tanstack/react-query', - '@attraccess/react-query-client', - '@attraccess/plugins-frontend-ui', + '@fabaccess/react-query-client', + '@fabaccess/plugins-frontend-ui', ]; export default defineConfig({ diff --git a/package.json b/package.json index 8614f3fe..5b77bf9d 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@attraccess/source", + "name": "@fabaccess/source", "version": "0.0.16", "license": "MIT", "scripts": { diff --git a/project.json b/project.json index 5dddb90b..d902d1f0 100644 --- a/project.json +++ b/project.json @@ -1,5 +1,5 @@ { - "name": "@attraccess/source", + "name": "@fabaccess/source", "$schema": "node_modules/nx/schemas/project-schema.json", "targets": { "lint": { diff --git a/test/docker-compose.yaml b/test/docker-compose.yaml index d013234c..20577f68 100644 --- a/test/docker-compose.yaml +++ b/test/docker-compose.yaml @@ -1,8 +1,8 @@ services: - attraccess: - image: fabaccess/attraccess:nightly-latest + fabaccess: + image: fabaccess/fabaccess:nightly-latest platform: linux/amd64 - container_name: attraccess + container_name: fabaccess restart: unless-stopped ports: - '80:3000' @@ -16,7 +16,7 @@ services: # Email Configuration - SMTP_SERVICE=SMTP - - SMTP_FROM=no-reply@attraccess.de + - SMTP_FROM=no-reply@fabaccess.de - SMTP_HOST=localhost - SMTP_PORT=1028 @@ -26,4 +26,3 @@ services: - ./storage:/app/storage - ./plugins:/app/plugins - ./secret:/app/secrets - diff --git a/tools/generators/package.json b/tools/generators/package.json index a4f2234c..4113a626 100644 --- a/tools/generators/package.json +++ b/tools/generators/package.json @@ -1,5 +1,5 @@ { - "name": "@attraccess/generators", + "name": "@fabaccess/generators", "version": "0.0.16", "private": true, "type": "commonjs", diff --git a/tsconfig.base.json b/tsconfig.base.json index 55cbe7c0..957428d4 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -17,14 +17,14 @@ "esModuleInterop": true, "baseUrl": ".", "paths": { - "@attraccess/api-client": ["libs/api-client/src/index.ts"], - "@attraccess/attracces": ["tools/attracces/src/index.ts"], - "@attraccess/database-entities": ["libs/database-entities/src/index.ts"], - "@attraccess/env": ["libs/env/src/index.ts"], - "@attraccess/plugins-backend-sdk": ["libs/plugins-backend-sdk/src/index.ts"], - "@attraccess/plugins-frontend-sdk": ["libs/plugins-frontend-sdk/src/index.ts"], - "@attraccess/plugins-frontend-ui": ["libs/plugins-frontend-ui/src/index.ts"], - "@attraccess/react-query-client": ["libs/react-query-client/src/index.ts"] + "@fabaccess/api-client": ["libs/api-client/src/index.ts"], + "@fabaccess/attracces": ["tools/attracces/src/index.ts"], + "@fabaccess/database-entities": ["libs/database-entities/src/index.ts"], + "@fabaccess/env": ["libs/env/src/index.ts"], + "@fabaccess/plugins-backend-sdk": ["libs/plugins-backend-sdk/src/index.ts"], + "@fabaccess/plugins-frontend-sdk": ["libs/plugins-frontend-sdk/src/index.ts"], + "@fabaccess/plugins-frontend-ui": ["libs/plugins-frontend-ui/src/index.ts"], + "@fabaccess/react-query-client": ["libs/react-query-client/src/index.ts"] } }, "exclude": ["node_modules", "tmp", "*.md"]