From c6e5a4e4d548195df04020e64c28ef5807411f6b Mon Sep 17 00:00:00 2001 From: Marcel Pfeiffer Date: Sun, 19 Oct 2025 18:48:43 +0200 Subject: [PATCH 1/8] If I can push this on dev you failed --- src/if_i_can_push_this_on_dev_you_failed.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/if_i_can_push_this_on_dev_you_failed.txt diff --git a/src/if_i_can_push_this_on_dev_you_failed.txt b/src/if_i_can_push_this_on_dev_you_failed.txt new file mode 100644 index 0000000..82a9ed4 --- /dev/null +++ b/src/if_i_can_push_this_on_dev_you_failed.txt @@ -0,0 +1,15 @@ +░░░░░▄▄▄▄▀▀▀▀▀▀▀▀▄▄▄▄▄▄░░░░░░░ +░░░░░█░░░░▒▒▒▒▒▒▒▒▒▒▒▒░░▀▀▄░░░░ +░░░░█░░░▒▒▒▒▒▒░░░░░░░░▒▒▒░░█░░░ +░░░█░░░░░░▄██▀▄▄░░░░░▄▄▄░░░░█░░ +░▄▀▒▄▄▄▒░█▀▀▀▀▄▄█░░░██▄▄█░░░░█░ +█░▒█▒▄░▀▄▄▄▀░░░░░░░░█░░░▒▒▒▒▒░█ +█░▒█░█▀▄▄░░░░░█▀░░░░▀▄░░▄▀▀▀▄▒█ +░█░▀▄░█▄░█▀▄▄░▀░▀▀░▄▄▀░░░░█░░█░ +░░█░░░▀▄▀█▄▄░█▀▀▀▄▄▄▄▀▀█▀██░█░░ +░░░█░░░░██░░▀█▄▄▄█▄▄█▄████░█░░░ +░░░░█░░░░▀▀▄░█░░░█░█▀██████░█░░ +░░░░░▀▄░░░░░▀▀▄▄▄█▄█▄█▄█▄▀░░█░░ +░░░░░░░▀▄▄░▒▒▒▒░░░░░░░░░░▒░░░█░ +░░░░░░░░░░▀▀▄▄░▒▒▒▒▒▒▒▒▒▒░░░░█░ +░░░░░░░░░░░░░░▀▄▄▄▄▄░░░░░░░░█░░ \ No newline at end of file From f28b36547cb5b2430e3dc0cb579df1e3d1862dd1 Mon Sep 17 00:00:00 2001 From: Marcel Pfeiffer Date: Sun, 26 Oct 2025 15:06:06 +0100 Subject: [PATCH 2/8] Initial setup --- .gitignore | 1 + .idea/workspace.xml | 47 ++++++++-------- compose.yaml | 132 ++++++++++++++++++++++++++------------------ 3 files changed, 103 insertions(+), 77 deletions(-) diff --git a/.gitignore b/.gitignore index 269cd83..e32cea8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /target .idea /ISM-Rust/target +realm.json \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index afaf6bc..934f360 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -12,8 +12,9 @@ - + + @@ -148,17 +151,6 @@ - - + - - { - "keyToString": { - "Cargo.Run ISM.executor": "Run", - "Cargo.Run.executor": "Run", - "Cargo.sqlx.executor": "Run", - "Docker.Dockerfile runtime.executor": "Run", - "Docker.Dockerfile.executor": "Run", - "Docker.compose.yaml.KeycloakDB: Compose Deployment.executor": "Run", - "Docker.compose.yaml.cassandra: Compose Deployment.executor": "Run", - "Docker.compose.yaml.console: Compose Deployment.executor": "Run", - "Docker.compose.yaml.keycloak: Compose Deployment.executor": "Run", - "Docker.compose.yaml.redpanda-0: Compose Deployment.executor": "Run", - "Docker.compose.yaml: Compose Deployment.executor": "Run", - "RunOnceActivity.ShowReadmeOnStart": "true", - "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager": "true", - "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true", - "RunOnceActivity.git.unshallow": "true", - "RunOnceActivity.rust.reset.selective.auto.import": "true", - "git-widget-placeholder": "master", - "ignore.virus.scanning.warn.message": "true", - "last_opened_file_path": "/Users/marcelpfeiffer/code/open_source/ISM", - "node.js.detected.package.eslint": "true", - "node.js.detected.package.tslint": "true", - "node.js.selected.package.eslint": "(autodetect)", - "node.js.selected.package.tslint": "(autodetect)", - "nodejs_package_manager_path": "npm", - "org.rust.cargo.project.model.PROJECT_DISCOVERY": "true", - "org.rust.cargo.project.model.impl.CargoExternalSystemProjectAware.subscribe.first.balloon": "", - "org.rust.first.attach.projects": "true", - "settings.editor.selected.configurable": "preferences.editor", - "vue.rearranger.settings.migration": "true" + +}]]> @@ -369,14 +367,7 @@ - - - - @@ -783,7 +782,6 @@ - @@ -808,7 +806,8 @@ - diff --git a/src/sql/migrations/20251026141354_create_initial_tables.down.sql b/src/sql/migrations/20251026141354_create_initial_tables.down.sql new file mode 100644 index 0000000..086f98c --- /dev/null +++ b/src/sql/migrations/20251026141354_create_initial_tables.down.sql @@ -0,0 +1,3 @@ +DROP TABLE chat_room_participant; +DROP TABLE chat_room; +DROP TABLE app_user; \ No newline at end of file diff --git a/src/sql/migrations/20251026141354_create_initial_tables.up.sql b/src/sql/migrations/20251026141354_create_initial_tables.up.sql new file mode 100644 index 0000000..184308e --- /dev/null +++ b/src/sql/migrations/20251026141354_create_initial_tables.up.sql @@ -0,0 +1,76 @@ +-- 1. Create app_user (no dependencies) +create table app_user +( + id uuid not null primary key, + created_at timestamp(6) with time zone not null, + deleted_at timestamp(6) with time zone, + description varchar(250), + display_name varchar(255) not null, + friends_count bigint not null, + last_modified_at timestamp(6) with time zone, + profile_picture varchar(255), + raw_name varchar(255) +); + +alter table app_user + owner to postgres; + +create index user_rawname + on app_user (raw_name); + +create unique index idx_unique_displayname_if_not_deleted + on app_user (display_name) + where (deleted_at IS NULL); + + +-- 2. Create chat_room (no dependencies) +create table chat_room +( + id uuid not null + primary key, + created_at timestamp(6) with time zone not null, + latest_message timestamp(6) with time zone, + latest_message_preview_text varchar(255), + room_image_url varchar(255), + room_name varchar(255), + room_type varchar(255) not null + constraint chat_room_room_type_check + check ((room_type)::text = ANY ((ARRAY ['Single'::character varying, 'Group'::character varying])::text[])) + ); + +alter table chat_room + owner to postgres; + +create index idx_room_type + on chat_room (room_type); + +create index idx_room_latest_message + on chat_room (latest_message); + + +-- 3. Create chat_room_participant (depends on app_user and chat_room) +create table chat_room_participant +( + joined_at timestamp(6) with time zone not null, + last_message_read_at timestamp(6) with time zone, + participant_state varchar(255) not null + constraint chat_room_participant_participant_state_check + check ((participant_state)::text = ANY + ((ARRAY ['Joined'::character varying, 'Invited'::character varying, 'Left'::character varying])::text[])), + room_id uuid not null + constraint fk677gcppc5fneuseoige64fsnm + references chat_room, + user_id uuid not null + constraint fkdjp8ps7q8cjcitu5e8fgkhxq0 + references app_user, + primary key (room_id, user_id) +); + +alter table chat_room_participant + owner to postgres; + +create index idx_participants_user_room_id + on chat_room_participant (user_id, room_id); + +create index idx_participants_room_id_membership + on chat_room_participant (room_id, participant_state); \ No newline at end of file From 8772fbd94d397a33bf926a96de1f8321fb8984d3 Mon Sep 17 00:00:00 2001 From: Marcel Pfeiffer Date: Sun, 26 Oct 2025 15:37:05 +0100 Subject: [PATCH 5/8] Revert 'If I can push this on dev you failed' This reverts commit c6e5a4e4d548195df04020e64c28ef5807411f6b. --- src/if_i_can_push_this_on_dev_you_failed.txt | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 src/if_i_can_push_this_on_dev_you_failed.txt diff --git a/src/if_i_can_push_this_on_dev_you_failed.txt b/src/if_i_can_push_this_on_dev_you_failed.txt deleted file mode 100644 index 82a9ed4..0000000 --- a/src/if_i_can_push_this_on_dev_you_failed.txt +++ /dev/null @@ -1,15 +0,0 @@ -░░░░░▄▄▄▄▀▀▀▀▀▀▀▀▄▄▄▄▄▄░░░░░░░ -░░░░░█░░░░▒▒▒▒▒▒▒▒▒▒▒▒░░▀▀▄░░░░ -░░░░█░░░▒▒▒▒▒▒░░░░░░░░▒▒▒░░█░░░ -░░░█░░░░░░▄██▀▄▄░░░░░▄▄▄░░░░█░░ -░▄▀▒▄▄▄▒░█▀▀▀▀▄▄█░░░██▄▄█░░░░█░ -█░▒█▒▄░▀▄▄▄▀░░░░░░░░█░░░▒▒▒▒▒░█ -█░▒█░█▀▄▄░░░░░█▀░░░░▀▄░░▄▀▀▀▄▒█ -░█░▀▄░█▄░█▀▄▄░▀░▀▀░▄▄▀░░░░█░░█░ -░░█░░░▀▄▀█▄▄░█▀▀▀▄▄▄▄▀▀█▀██░█░░ -░░░█░░░░██░░▀█▄▄▄█▄▄█▄████░█░░░ -░░░░█░░░░▀▀▄░█░░░█░█▀██████░█░░ -░░░░░▀▄░░░░░▀▀▄▄▄█▄█▄█▄█▄▀░░█░░ -░░░░░░░▀▄▄░▒▒▒▒░░░░░░░░░░▒░░░█░ -░░░░░░░░░░▀▀▄▄░▒▒▒▒▒▒▒▒▒▒░░░░█░ -░░░░░░░░░░░░░░▀▄▄▄▄▄░░░░░░░░█░░ \ No newline at end of file From e021dc3a841dcfdaba979636949a3bd80207b7c6 Mon Sep 17 00:00:00 2001 From: Marcel Pfeiffer Date: Sat, 6 Dec 2025 11:33:24 +0100 Subject: [PATCH 6/8] Add redpanda volume --- compose.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compose.yaml b/compose.yaml index 2f34b5a..141dee6 100644 --- a/compose.yaml +++ b/compose.yaml @@ -141,6 +141,8 @@ volumes: driver: local room_data: driver: local + redpanda-0: + driver: local networks: From 7140701fea123a92544235b7309e9972ac040c7c Mon Sep 17 00:00:00 2001 From: Marcel Pfeiffer Date: Sat, 6 Dec 2025 11:34:34 +0100 Subject: [PATCH 7/8] Remove .idea folder --- .idea/ISM.iml | 11 - .idea/modules.xml | 8 - .idea/vcs.xml | 14 - .idea/workspace.xml | 866 -------------------------------------------- 4 files changed, 899 deletions(-) delete mode 100644 .idea/ISM.iml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml delete mode 100644 .idea/workspace.xml diff --git a/.idea/ISM.iml b/.idea/ISM.iml deleted file mode 100644 index cf84ae4..0000000 --- a/.idea/ISM.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 97101ca..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index d5b23a5..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index a9fc914..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,866 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { - "lastFilter": { - "state": "OPEN", - "assignee": "JrTimha" - } -} - { - "selectedUrlAndAccountId": { - "url": "https://github.com/JrTimha/ISM.git", - "accountId": "7e42ddce-4e81-4a2a-b5df-e0b46b7da343" - } -} - - - - - { - "associatedIndex": 3 -} - - - - { - "keyToString": { - "Cargo.Run ISM.executor": "Run", - "Cargo.Run.executor": "Run", - "Cargo.sqlx.executor": "Run", - "Docker.Dockerfile runtime.executor": "Run", - "Docker.Dockerfile.executor": "Run", - "Docker.compose.yaml.cassandra: Compose Deployment.executor": "Run", - "Docker.compose.yaml.console: Compose Deployment.executor": "Run", - "Docker.compose.yaml.redis: Compose Deployment.executor": "Run", - "Docker.compose.yaml.redpanda-0: Compose Deployment.executor": "Run", - "Docker.compose.yaml: Compose Deployment.executor": "Run", - "RunOnceActivity.ShowReadmeOnStart": "true", - "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager": "true", - "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true", - "RunOnceActivity.git.unshallow": "true", - "RunOnceActivity.rust.reset.selective.auto.import": "true", - "com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultAutoModeForALLUsers.v1": "true", - "com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1": "true", - "git-widget-placeholder": "master", - "ignore.virus.scanning.warn.message": "true", - "junie.onboarding.icon.badge.shown": "true", - "last_opened_file_path": "/Users/timvosskuehler/RustroverProjects/ISM/src/repository", - "node.js.detected.package.eslint": "true", - "node.js.detected.package.tslint": "true", - "node.js.selected.package.eslint": "(autodetect)", - "node.js.selected.package.tslint": "(autodetect)", - "nodejs_package_manager_path": "npm", - "org.rust.cargo.project.model.PROJECT_DISCOVERY": "true", - "org.rust.cargo.project.model.impl.CargoExternalSystemProjectAware.subscribe.first.balloon": "", - "org.rust.first.attach.projects": "true", - "settings.editor.selected.configurable": "language.rust.cargo.check", - "to.speed.mode.migration.done": "true", - "vue.rearranger.settings.migration": "true" - }, - "keyToStringList": { - "DatabaseDriversLRU": [ - "postgresql" - ] - } -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1736102111592 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -