1538 Commits

Author SHA1 Message Date
Anton Tranelis
71e192a60b
removed würdekompass admin role (#343) 2025-08-27 16:58:49 +02:00
Anton Tranelis
1aaabebc99
reinsert uuid to fix notifiations in backend (#342) 2025-08-27 13:20:46 +02:00
Anton Tranelis
94ec2e5576
fix popup button (#339) 2025-08-27 13:17:20 +02:00
Anton Tranelis
1b0b51e91a
fix behaviour of modal (#340) 2025-08-27 10:05:42 +02:00
Anton Tranelis
7e059d8deb
feat(app): added external profile url (#328)
* added external profile url

* switch port back to 5174

* fix linting

* chaneged target to _parent
2025-08-26 14:56:55 +02:00
Anton Tranelis
cb6737d370
feat(app): popup customizing (#333)
* small form edits

* fix linting

* custom button label

* more popup customizing

* reset dev port
2025-08-26 14:55:15 +02:00
Anton Tranelis
a599eddca6
feat(lib): add optional request password button to login page (#334)
* add optional request password button to login page

* fix linting

* fix linting

* added field to backend config
2025-08-26 14:43:31 +02:00
Anton Tranelis
1ef562cf3c
feat(lib): hide signup option (#329)
* hide signup option

* directus pull
2025-08-26 14:22:26 +02:00
0b77d95ae4
fix(backend): register role seed (#337)
* adjust seed structure to support multiple projects

* fix gitignore

* seed the role a user has when registered properly
2025-08-26 13:53:01 +02:00
9a19617906
refactor(app): parameterize admin role & enforce it to be set (#336)
* parameterize admin role & enforce it to be set

* fix lint

---------

Co-authored-by: Anton Tranelis <31516529+antontranelis@users.noreply.github.com>
2025-08-26 09:52:25 +00:00
d199d47730
feat(backend): seed multi project architecture (#327)
* rename manual folder to seed-manual

* adjust seed structure to support multiple projects

* add gitignore

---------

Co-authored-by: Anton Tranelis <31516529+antontranelis@users.noreply.github.com>
2025-08-26 11:46:06 +02:00
62777970fc
rename manual folder to seed-manual (#326) 2025-08-26 11:39:29 +02:00
af7f51efbd
refactor(backend): directus sync files (#325)
* update directus-extension-sync

* seed files via directus sync

* delete manual seed files & script
2025-08-26 11:24:02 +02:00
Anton Tranelis
fbe1eb9e0f
avatar-widget showing external image (#330) 2025-08-25 11:03:59 +02:00
2baabe7940 disable close on click outside in location update dialog 2025-08-20 19:02:08 +02:00
6fcdef0433 fix(lib): ensure user_created is preserved in all item operations
- Add user_created field to all item update operations to maintain proper user association
- Update useMyProfile hook to use direct computation instead of useMemo to avoid React hook queue issues
- Refactor UserControl to use useMyProfile hook for consistency
- Fix user_created handling in LocateControl, ItemFormPopup, useSelectPosition, and itemFunctions
- Add user parameter to linkItem, unlinkItem, and related functions with proper TypeScript signatures
- Update all function calls and tests to include user parameter
- Ensure proper null safety with user ?? undefined pattern

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-20 18:55:02 +02:00
Anton Tranelis
db423b26f3
fix(lib): fix tests for locateControl (#324)
* improved locate control

* fix(lib): clean up setTimeout and fix Chrome modal layout issue

- Add proper cleanup for setTimeout in LocateControl to prevent memory leaks
- Replace modal-open class with direct overflow style to fix Chrome scrollbar issue
- Add timeout reference tracking for better component unmount handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix linting

* set distance rule

* optimized locatecontrol

* working for new users without profile now

* test(lib): add comprehensive tests for LocateControl component

- Add 9 comprehensive unit tests covering all LocateControl functionality
- Test modal display logic for new and existing users
- Test profile creation and position updates
- Test navigation after successful operations
- Test error handling with proper toast notifications
- Mock all external dependencies (React Router, Leaflet, APIs)
- Verify dialog behavior prevents re-appearance after decline
- Include snapshot tests for UI consistency
- All tests pass with proper TypeScript typing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* removed unused code, add 1s delay

* updated tests

* fixed tests

* fix test for LocateControl

* fix linting

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-20 16:53:08 +02:00
Anton Tranelis
f7f758bb00
feat(lib): enhanced LocateControl (#308)
* improved locate control

* fix(lib): clean up setTimeout and fix Chrome modal layout issue

- Add proper cleanup for setTimeout in LocateControl to prevent memory leaks
- Replace modal-open class with direct overflow style to fix Chrome scrollbar issue
- Add timeout reference tracking for better component unmount handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix linting

* set distance rule

* optimized locatecontrol

* working for new users without profile now

* test(lib): add comprehensive tests for LocateControl component

- Add 9 comprehensive unit tests covering all LocateControl functionality
- Test modal display logic for new and existing users
- Test profile creation and position updates
- Test navigation after successful operations
- Test error handling with proper toast notifications
- Mock all external dependencies (React Router, Leaflet, APIs)
- Verify dialog behavior prevents re-appearance after decline
- Include snapshot tests for UI consistency
- All tests pass with proper TypeScript typing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* removed unused code, add 1s delay

* updated tests

* fixed tests

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-20 16:39:19 +02:00
Anton Tranelis
649efe551d
refactor(lib): implement server-response-first pattern (#322)
* use server response for local state updates

* fix formatting

* refactor: comprehensive server-response-first pattern implementation

## Major Changes

### LayerProps ID Required
- Made `LayerProps.id` required (was optional)
- All layers now guaranteed to have server-provided UUID
- Enables reliable layer ID mapping from server responses

### useSelectPosition Hook Refactored
- Added reusable `handleApiOperation` helper function
- Refactored `itemUpdatePosition`, `itemUpdateParent`, `linkItem`
- All functions now use server response + layer ID mapping
- Consistent error handling and toast management

### itemFunctions.ts Complete Refactor
- **submitNewItem**: Server response with layer mapping
- **linkItem**: Server response preserves layer object
- **unlinkItem**: Same pattern as linkItem
- **handleDelete**: Simplified error handling
- **onUpdateItem**: Complex function refactored for both update/create branches

### Benefits
-  Eliminates race conditions from manual state construction
-  Server response as single source of truth for all updates
-  Consistent error handling across all API operations
-  Items no longer disappear from map after updates
-  Type-safe layer ID mapping

### Testing
- Updated ItemFunctions.spec.tsx with new toast patterns
- Added required layer IDs to test objects
- All 19 tests passing (3 skipped)
- ESLint clean

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix linting

* fix: resolve TypeScript undefined data errors

- Add non-null assertions for result.data in conditional blocks
- TypeScript now properly recognizes data is defined after success check
- All linting and TypeScript errors resolved

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fixed examples

* remove unneccessary uuid generation

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-20 15:03:30 +02:00
Anton Tranelis
94fa6321ba
fix(lib): adjust UserControl and HeaderView (#293)
* fix(lib): resolve TypeScript unsafe assignment errors in UserControl and HeaderView

- Add ESLint disable for @typescript-eslint/no-unsafe-assignment in UserControl to align with other components
- Refactor avatar logic in UserControl to use explicit typing and conditional assignment
- Add alt attribute to avatar image in UserControl for better accessibility
- Fix image priority order in HeaderView to prioritize internal images over external ones
- Support both internal and external images with proper fallback in both components

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: remove unused ESLint disable and fix CI lint check

The explicit typing approach resolved the TypeScript unsafe assignment
errors without needing the ESLint disable rule.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* removed unused linting exception

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
2025-08-14 11:27:11 +02:00
Anton Tranelis
34e45c6dea
feat(other): add development configuration files (#307)
* feat: add development configuration files

Add .gitignore and CLAUDE.md to standardize development environment:
- .gitignore: Exclude IDE files, build artifacts, and temporary files
- CLAUDE.md: Project documentation and development commands for AI tools

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* moved scripts to ./claude

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-14 11:16:19 +02:00
85b0f93ab7
feat(backend): selfhosted utopia map (#299)
* describe manual seed

* directus minimal seed & seed instructions

* use api config everywhere, default to localhost, ignore .env file, provide .env.dist

* fix lint

* backend readme: import dump instructions

* complete instructions for seeding

* update readme, fix merge conflict, typos
2025-08-14 09:00:23 +00:00
42086b9217
feat(backend): manual seed (#313)
* bind uploads folder to local harddrive

* updated backend README.md regarding permissions

* manual seed script

* seed branding utopia-logo

* describe manual seed

* simplify directus logo seed (only update one field)

---------

Co-authored-by: Anton Tranelis <31516529+antontranelis@users.noreply.github.com>
2025-08-14 10:56:15 +02:00
6c7308ad38
feat(backend): make map URL configurable (#304)
* use api config everywhere, default to localhost, ignore .env file, provide .env.dist

* fix lint

* make mapUrl configurable

---------

Co-authored-by: Anton Tranelis <31516529+antontranelis@users.noreply.github.com>
2025-08-14 10:43:30 +02:00
5c79633ea4
feat(backend): directus seed advanced (#306)
* directus minimal seed & seed instructions

* more seed data

* places-layer

---------

Co-authored-by: Anton Tranelis <31516529+antontranelis@users.noreply.github.com>
2025-08-14 09:47:23 +02:00
aa13c44cba
delete map user_type as it is no longer required (#309) 2025-08-14 07:08:14 +00:00
cf80f35b5c
feat(backend): bind uploads folder to local harddrive (#312)
* bind uploads folder to local harddrive

* updated backend README.md regarding permissions
2025-08-14 08:40:25 +02:00
9b2ac9f74f
directus minimal seed & seed instructions (#305) 2025-08-13 23:14:29 +00:00
cfd7ca1a26
refactor(app): default backend: localhost (#303)
* use api config everywhere, default to localhost, ignore .env file, provide .env.dist

* fix lint
2025-08-13 23:12:39 +00:00
a778fcf971
backend readme: import dump instructions (#296) 2025-08-13 23:10:30 +00:00
fb78619fa9
define cors also for development (#302) 2025-08-14 00:25:40 +02:00
5a2d1ea856
changes on package-lock.json when running npm install (#301) 2025-08-13 20:58:11 +00:00
6f5ee59cc4
workflow: build docker (#311)
fix change detection variable
2025-08-13 20:54:57 +00:00
f7fafc6db9
fix the workflow matrix with a aggregating result (#317) 2025-08-13 22:52:03 +02:00
f4c1fe7e25
fix workflows to always execute all matrix jobs and check for requiredness later (#310)
revert change partially
2025-08-13 20:34:01 +00:00
188f8ad284
describe how to backup the database (#314) 2025-08-13 20:31:14 +00:00
6b57993d9f
directus collections used on production (#297) 2025-08-13 20:27:30 +00:00
d044143aa1
correctly bind and document postgress data folder bind (#298) 2025-08-12 11:10:19 +02:00
54b8d3e4f3
move docker compose to the correct directory and correct paths (#295) 2025-08-11 18:16:35 +00:00
05268fbc3d
pin correct directus version 11.7.2 (#294) 2025-08-11 20:13:01 +02:00
Anton Tranelis
4e6fb57042
fix(lib): critical vulnerability (#290)
* fix critical vulnerability

* fix same in app
2025-08-06 13:07:18 +00:00
Anton Tranelis
945e5b066a
feat(lib): add support for external images in items (#291)
* feat: add support for external images in items

Add image_external field to Item type and update HeaderView to prefer external images over internal ones when available.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: prettier formatting for external image feature

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-06 15:04:52 +02:00
Anton Tranelis
7e0d44dac8
fix(app): add close button to custom info modal (#275)
* add close button to custom info modal

* update workflow

* fixes workflow

---------

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
2025-07-16 20:57:21 +02:00
Max
1e7320b895
feat(app): qR invites (#267)
* Add component to show invite link (WIP)

* Show invite link with copy functionality and QR-Code, add tests

* Query secrets

* Update directus collections

* Add config and invite api

* Let vite resolve paths using tsconfig

* Redeem invite link when logged in or after logging in

* Redirect to inviting profile when redeeming

* Fix some logic with login and redeeming

* Use correct redeem flow

* Hide missing form error

* Add basic relations view

* Pass profile to redeem Api and adapt to changed redeem flow

* Remove unnecessary aliases in vite config

* Remove dead import

* gitignore mac specific file

* Remove lazy loading

* Fix linting

* add InviteApi import

* Change case of file name (tbd)

* Don't toast error if user profile was not loaded yet

* Fix casing

* avoid app crash when profile of a new item is opened

---------

Co-authored-by: Anton Tranelis <mail@antontranelis.de>
2025-07-11 13:37:05 +02:00
Anton Tranelis
855ef3de29
fix(lib): base layer config (#276)
* add close button to custom info modal

* added attribution

* fix build examples workflow

* fix pending tests

* Revert "add close button to custom info modal"

This reverts commit 835c661009abbdc5c095a6bc86bbd6890e080e5f.
2025-07-04 08:39:13 +02:00
Anton Tranelis
12aba6a67e
fix(lib): fix labels (#278)
* fix labels

* more lables

* and the rest of the lables

* updated snapshots

* fix linting
2025-07-04 08:36:11 +02:00
Anton Tranelis
045ec726eb
fix(lib): auto close update position toast (#277)
* add close button to custom info modal

* auto close update position toat

* Revert "add close button to custom info modal"

This reverts commit cf5b9a407effe0772ed622ce2369cf16e0b82175.

* fix: reset position for new items without text
2025-07-03 13:18:10 +02:00
Max
c92695eea7
fix(frontend): update directus collections (#269)
* Update directus collections

* item_secrets is not a collection we call via directus client

---------

Co-authored-by: Anton Tranelis <31516529+antontranelis@users.noreply.github.com>
2025-07-03 07:21:31 +00:00
Anton Tranelis
729f97f38a
refactor(app): rename frontend directory (#273) 2025-07-01 16:51:46 +02:00
Anton Tranelis
712aa98ac2
refactor(other): repo setup (#271)
* direct library import

* running dev environment

* fix linting

* strickt null checks

* fix linting

* chunks

* fix jumping button

* don't exclude rollup-config from typechecks
2025-06-27 20:03:16 +02:00