Commit Graph
109 Commits
Author SHA1 Message Date
Karl Ludwig Weise c1af53dc5b Fix appointment denial incl. email 2026-02-10 12:20:39 +01:00
Karl Ludwig Weise 168e2d5a6c Merge remote-tracking branch 'origin/main' into 160-book-appointment-confirm-appointment-requests-front-end 2026-02-10 12:05:52 +01:00
Karl Ludwig Weise 86294d4bba Send proper email on appointment request 2026-02-10 12:05:43 +01:00
Karl Ludwig WeiseandGitHub 60844d6e40 Merge pull request #186 from open-reception/feat_add_channel_staff
Optionally set staff channel associations when creating or updating a…
2026-02-08 11:46:36 +01:00
Hendrik Belitz a2fc4e4d34 Format und type fixes 2026-02-07 11:39:13 +01:00
Karl Ludwig WeiseandGitHub bcc2d78cdc Merge pull request #193 from open-reception/FIX_first_user_should_be_access_granted
First user of tenant gets access granted, regardless of role.
2026-02-03 10:58:32 +01:00
Hendrik Belitz 7d38db1ce1 Getters should also return staff id relations 2026-02-02 14:37:03 +01:00
Hendrik Belitz 97332c617a Added Cancellation Email template 2026-02-02 14:21:07 +01:00
Hendrik Belitz 128ca9bfc7 First user of tenant gets access granted, regardless of role. 2026-02-02 13:44:24 +01:00
Karl Ludwig Weise 6124398696 Added appointment confirmation and prepared denial 2026-01-28 21:56:03 +01:00
Hendrik Belitz c5d8d174aa Optionally set staff channel associations when creating or updating a channel. 2026-01-28 17:23:46 +01:00
Karl Ludwig Weise bf9d642f0c Added notification front-end 2026-01-27 22:10:13 +01:00
Karl Ludwig Weise 3f550af281 Added custom domains for tenants 2026-01-23 21:38:06 +01:00
75cdccf5d0 149 allow creation of appointments through staff members (#174)
* Simplified locals.user
Checked routes for accessibilty

* Fixed tests

* Fixed import errors

* Fixed invite test

* PIN API implementation

* Tests for pin reset

* HOusekeeping

* Update src/routes/api/tenants/[id]/clients/pin-reset/request/+server.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fixes for id and housekeeping

* End routes for staff appointment bookings and check whether client exists.

* Merged main, fixed tests

* Linting errors

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-22 11:48:11 +01:00
a64afbd297 160 book appointment confirm appointment requests (#179)
* Extension of tenant schema

* Notification service

* Notification endpoints

* Format errors

* Update src/lib/server/db/tenant-schema.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/lib/server/services/notification-service.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Explicit where clause in delete notification

* Update tenant-migrations/0008_neat_swarm.sql

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Sort notifivcations by creation date. Do not explicitly check for existance in mark as read.

* Fixed tests

* Mail templates appointment cancellation

* Appointment cancellation notification texts

* Delete appointment by staff

* Deletion endpoint for staff

* My Appointments endpoint for clients

* Delete appointment by client

* Copilot review fixes

* Fixes after notification changes and updates.

* Fixed limiting errors

* Rejection email template

* Send out request, confirmed notifications, send out confirmed, denied emails.

* Fix test

* MIgration files

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-22 11:39:12 +01:00
e9bd83bcd2 148 provide apis for cancelling appointments staff and client wise (#164)
* Extension of tenant schema

* Notification service

* Notification endpoints

* Format errors

* Update src/lib/server/db/tenant-schema.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/lib/server/services/notification-service.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Explicit where clause in delete notification

* Update tenant-migrations/0008_neat_swarm.sql

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Sort notifivcations by creation date. Do not explicitly check for existance in mark as read.

* Fixed tests

* Mail templates appointment cancellation

* Appointment cancellation notification texts

* Delete appointment by staff

* Deletion endpoint for staff

* My Appointments endpoint for clients

* Delete appointment by client

* Copilot review fixes

* Fixes after notification changes and updates.

* Fixed limiting errors

* Fix

* Refix fix

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-22 11:28:35 +01:00
Hendrik Belitz 7435f8b6fb Allow client email to be optional 2026-01-21 17:30:13 +01:00
Karl Ludwig Weise eb47814395 Redact user and password from databaseUrl logs 2026-01-16 16:03:23 +01:00
fb3b880204 142 provide logic and apis to use more than one passkey with a staff member (#163)
* Basic implementation

* Syntax fixes

* Implemented PRF for passkey administration. Updated docs, renamed confusing endpoints.

* Update src/routes/api/auth/passkeys/[passkeyId]/crypto/+server.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Removed unused param

* Merge fixes, formatting fixes, database migrations

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-13 18:35:42 +01:00
c552945643 141 provide apis for pin reset (#162)
* Simplified locals.user
Checked routes for accessibilty

* Fixed tests

* Fixed import errors

* Fixed invite test

* PIN API implementation

* Tests for pin reset

* HOusekeeping

* Update src/routes/api/tenants/[id]/clients/pin-reset/request/+server.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fixes for id and housekeeping

* DB migrations

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-13 18:17:42 +01:00
a6707ef081 151 bare minimum notification system (#161)
* Extension of tenant schema

* Notification service

* Notification endpoints

* Format errors

* Update src/lib/server/db/tenant-schema.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/lib/server/services/notification-service.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Explicit where clause in delete notification

* Update tenant-migrations/0008_neat_swarm.sql

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Sort notifivcations by creation date. Do not explicitly check for existance in mark as read.

* Fixed tests

* No longer store texts in notifications

* Single source of truth for notification types

* Formatting

* Fixed linting errors

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-13 18:05:32 +01:00
8c0343b1ec Feat/email renderer (#172)
* Added poc of new email renderer

* Completed email renderer poc for appointment confirmation

* Changed phone description in add-personal-data-form

* Added used email types to new email system

* Switched email templates to the new template engine.

---------

Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
Co-authored-by: Hendrik Belitz <hendrik@innovation-through-understanding.de>
2026-01-12 10:03:22 +01:00
HendrikGitHubhbelcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>Copilot
b81706a8d9 Security hotfix prf (#146)
* Use PRF extension for deterministic Zero Knowledge Shards

* Webauthn validation lib

* Use attestation and validate passkeys

* Use attestation objects and cose-format keys in frontend. Added additional checks so that we don't create orphaned users when validation fails.

* Fixed type check error

* Fix PRF salt documentation to match implementation (#147)

* Initial plan

* Fix PRF salt documentation to match implementation

Co-authored-by: hbel <7416029+hbel@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hbel <7416029+hbel@users.noreply.github.com>

* Use dev instead of node env

* Migration fixes

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hbel <7416029+hbel@users.noreply.github.com>
2026-01-02 15:08:23 +01:00
CopilotGitHubhbelcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>Hendrik Belitz
337fc2e70b Add throttling to challenge APIs for brute force protection (#145)
* Initial plan

* Add throttling implementation for challenge APIs

Co-authored-by: hbel <7416029+hbel@users.noreply.github.com>

* Add tests for throttling and fix linting issues

Co-authored-by: hbel <7416029+hbel@users.noreply.github.com>

* Address code review feedback - improve error handling and documentation

Co-authored-by: hbel <7416029+hbel@users.noreply.github.com>

* Consolidate throttle storage to central DB per review feedback

Co-authored-by: hbel <7416029+hbel@users.noreply.github.com>

* Fixed errors in challenge-throlle.

* Add throttling to frontend.

* incorporated Reviewer comments

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hbel <7416029+hbel@users.noreply.github.com>
Co-authored-by: Hendrik Belitz <hendrik@innovation-through-understanding.de>
2026-01-02 13:14:40 +01:00
Karl Ludwig WeiseandGitHub 56b7d4a9b2 Feat/calendar (#129) 2025-11-19 14:42:45 +01:00
HendrikandGitHub 6a610b96b1 When client selects an appointment that does not need to be confirmed… (#133)
* When client selects an appointment that does not need to be confirmed, send out an email. Also prepared the appointment confirmation call to send out an email.

* Removed old client table. Fixed tests.

* MIgration for removed table
2025-11-17 17:04:57 +01:00
316d7ef25b Feat/book appointment (#121)
* Adding book appointment workflow -wip

* Load channels

* Added channel and agent selection

* Provide optional filter criteria for agents and channels in schedule endpoint.

Return agent info for free schedule slots.

* Select slot

* Added personal data form

* Added login and register step

* Empty PIN input when crypto fails

* Added summary and complete steps

* Format errors in otp component

* Format error in otp component

* Store staff keypairs for appointment encryption

* storeStaffKeyPair during passkey setup

* Fix lint

* Allow access to tenants for tenant admins

* Removed centralised route-based authorization.

* Use setupState from back-end

* First tenant admin is ACCESS_GRANTED.

* load local argon2 directly in central html file

* Make sure cookie is deleted on logout

* Allow WASM execution

* Staff key is base64 encoded, not hex encoded

* Fix proceeding to summary

* Fix TunnelId. Fix Appointment Date. Fix missing AgentId for Tunnel Creation call.

* Fix book appoint flow for new users

* Fix design issues

* Show only slots that have not passed

* Reimplemented ShamirsSecretSharing with Laplacian Interpolation

* Check for existing users before creating new client tunnels. Corrected base64 decoding of challenge.

* Properly deal with existing client errors (422)

* Use new shamir implementation for shard construction and key reconstruction.

* Fix lint and check

* Fix csp header test

* Fixed tests

---------

Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
Co-authored-by: Hendrik Belitz <hendrik@innovation-through-understanding.de>
2025-11-13 14:55:11 +01:00
85e642fa89 Added onboarding dashboard (#128)
* Added onboarding dashboard

* Improve onboarding expericene

---------

Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
2025-11-12 14:28:35 +01:00
HendrikandGitHub 983f6c3857 Use the normal invitation flow when inviting an initial tenant admin. (#122) 2025-10-29 16:26:49 +01:00
CopilotGitHubhbelcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1e311bed32 Migrate to Zod 4 (#125)
* Initial plan

* Migrate to Zod 4.1.12 and update all imports

Co-authored-by: hbel <7416029+hbel@users.noreply.github.com>

* Fix test UUIDs to be RFC 4122 compliant for Zod 4

Co-authored-by: hbel <7416029+hbel@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hbel <7416029+hbel@users.noreply.github.com>
2025-10-27 15:58:24 +01:00
23941e7a5e Feat/staff (#110)
* Added basic staff functions -wip

* Fix: Use proper route for staff member creation

* Fixed errors in confirm, invite and register routes.

* Also return invited staff members when getting staff members

* Updated error handling

* Allow global admin to add other global admins

* Sort staff members by name

* Added dummy implementation of granting access to staff members

* Render tenant logo, if set

* Fix delete

* Make invited but not confirmed user entries deletable.

* Added staff onboarding with passkey -wip

* Fix delete route

* Fix passkey setup flow for staff

* Fix lint

* Fix lint

* Fix some unit tests

* Updated docs

* Refactored staff-service, fixed tests

* Setup state db migrations

---------

Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
Co-authored-by: Hendrik Belitz <hendrik@innovation-through-understanding.de>
2025-10-24 13:09:52 +02:00
12be3016f4 Validate the setup state in all relevant actions. Update it according… (#119)
* Validate the setup state in all relevant actions. Update it according to the tenant's current state.

* Update src/lib/server/db/central-schema.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fixed schema, fixed tests, incorporated review advice

* Unused variable error fixed.

* Refactored deletion methods. Fixed partial deletion test.

* Try to delete user first before deleting key shares (to make sure the transaction fails if we cannot delete the user)

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-23 17:11:23 +02:00
604e7fdddd Added public tenant api (#115)
* Added public tenant api

* Moved public channels to their own endpoint and creator public api path

---------

Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
2025-10-21 18:22:09 +02:00
9c7de2a6bd 92 check entity deletion business rules (#107)
* Added conflict checks to agent and channel deletion.

* Added missing agentId to appointment requests. Fixed tests for new error behavior.

* Removed import

* Archive agents and channels instead of deleting them.

* Update src/lib/server/services/appointment-service.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-21 18:14:19 +02:00
HendrikandGitHub 44cc5d0837 Merge pull request #102 from open-reception/feat/settings
Feat/settings
2025-10-16 09:26:00 +02:00
Hendrik Belitz 583cb56670 Names in channel update schema should be an optional property 2025-10-15 17:34:30 +02:00
Karl Ludwig Weise db67350f2d Move significant config to base tenant config 2025-10-13 15:25:28 +02:00
0a0703f181 Added ui to manage absences (#98)
* Added ui to manage absences

* Added test for new endpoint

---------

Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
2025-10-13 12:58:42 +02:00
Karl Ludwig WeiseandGitHub 6b94c2d2f6 Merge branch 'main' into feat/absences 2025-10-12 20:29:54 +02:00
Karl Ludwig Weise 6dcb32ff85 Merge remote-tracking branch 'origin/main' into feat/absences 2025-10-12 15:09:11 +02:00
6c63ac3c80 Fetch tenant (#101)
* Fetch tenant

* Update src/routes/api/tenants/[id]/+server.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/routes/api/tenants/[id]/+server.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Column rename

* Fixed tests

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-12 15:08:32 +02:00
d69d0a5b73 Fix editing channels with slot templates (#97)
Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
2025-10-11 13:12:33 +02:00
Karl Ludwig Weise c4075cef71 Merge remote-tracking branch 'origin/main' into feat/absences 2025-10-10 15:37:39 +02:00
Hendrik Belitz 7f1fee52d0 Removed default value (not needed, breaks typings) 2025-10-09 10:18:59 +02:00
Karl Ludwig Weise 06161d434f Added ui to manage absences 2025-10-08 21:47:59 +02:00
Hendrik Belitz b739fa0d2b Fixed db schema, removed constraints that referenced a table in another db 2025-10-07 19:43:25 +02:00
Hendrik Belitz 988707fc78 DO not reset global admin to confirmed. 2025-10-07 19:25:56 +02:00
Hendrik Belitz 179f6d2808 Added missing existance check 2025-10-07 18:37:30 +02:00
Hendrik Belitz 8ae28d283c Merge branch 'main' of github.com:open-reception/appointment-booking-software 2025-10-07 18:32:21 +02:00
Hendrik Belitz bdc157bda6 Set access-granted for global admin. 2025-10-07 18:32:13 +02:00