From 62280265b43e65b0ab3aeec94fba94fa2bf2e9cd Mon Sep 17 00:00:00 2001 From: Sinan Date: Sun, 18 Jan 2026 13:10:12 +0100 Subject: [PATCH] feat: Implement enhanced user profiles with social features including direct messaging, post comments, and reposts, and introduce new routing for Docs and Changelog views. --- README.md | 15 +- client/nginx.conf | 8 +- client/package-lock.json | 24 +- client/package.json | 5 +- client/src/App.vue | 8 +- client/src/components/ChangelogView.vue | 76 ++++ client/src/components/ChatLayout.vue | 444 +++++++++++++++++++---- client/src/components/DocsView.vue | 72 ++++ client/src/components/MessageList.vue | 127 ++++--- client/src/components/MusicPlayer.vue | 122 +++---- client/src/components/UserList.vue | 32 +- client/src/components/UserProfile.vue | 265 ++++++++++++-- client/src/components/WalletConnect.vue | 48 ++- client/src/main.js | 3 + client/src/router/index.js | 64 ++++ client/src/stores/__tests__/chat.spec.js | 34 +- client/src/stores/chat.js | 224 ++++++++++-- docker-compose.yml | 11 +- docs/vision.md | 9 +- server/db.js | 141 +++---- server/index.js | 443 +++++++++++++++++----- server/test_profile_fix.js | 46 +++ server/tests/social.test.js | 63 ++++ 23 files changed, 1826 insertions(+), 458 deletions(-) create mode 100644 client/src/components/ChangelogView.vue create mode 100644 client/src/components/DocsView.vue create mode 100644 client/src/router/index.js create mode 100644 server/test_profile_fix.js create mode 100644 server/tests/social.test.js diff --git a/README.md b/README.md index 6d816d1..87c3917 100644 --- a/README.md +++ b/README.md @@ -24,12 +24,13 @@ Plexus is a **Club 2.0** platform—a hybrid between a live chat and a social ne Explore our detailed documentation in the `docs/` directory: -- [🏗 Architecture](file:///home/sinan/Documents/repositories/local/plexus/docs/architecture.md) - High-level system design. -- [📂 Structure](file:///home/sinan/Documents/repositories/local/plexus/docs/structure.md) - Directory and file organization. -- [⚙️ Functions & API](file:///home/sinan/Documents/repositories/local/plexus/docs/functions.md) - Socket events and backend logic. -- [📊 Data Model](file:///home/sinan/Documents/repositories/local/plexus/docs/data-model.md) - Database schema and migrations. -- [📈 Scalability](file:///home/sinan/Documents/repositories/local/plexus/docs/scalability.md) - Future roadmap and scaling strategies. -- [📝 Task Tracker](file:///home/sinan/Documents/repositories/local/plexus/docs/tasks.md) - How to use the internal task management tool. +- [O Vision](./docs/vision.md) - Platform vision. +- [🏗 Architecture](./docs/architecture.md) - High-level system design. +- [📂 Structure](./docs/structure.md) - Directory and file organization. +- [⚙️ Functions & API](./docs/functions.md) - Socket events and backend logic. +- [📊 Data Model](./docs/data-model.md) - Database schema and migrations. +- [📈 Scalability](./docs/scalability.md) - Future roadmap and scaling strategies. +- [📝 Task Tracker](./docs/tasks.md) - How to use the internal task management tool. ## 🚦 Quick Start @@ -55,7 +56,7 @@ cd client && npm run dev ## 🤝 Contributing -We follow a strict development workflow. Please read [CONTRIBUTING.md](file:///home/sinan/Documents/repositories/local/plexus/CONTRIBUTING.md) before starting. +We follow a strict development workflow. Please read [CONTRIBUTING.md](./CONTRIBUTING.md) before starting. 1. **Pick a Task**: Use `make task-list` to find something to work on. 2. **Code**: Implement your changes. diff --git a/client/nginx.conf b/client/nginx.conf index c46edb9..0642e38 100644 --- a/client/nginx.conf +++ b/client/nginx.conf @@ -11,13 +11,17 @@ server { # Proxy API requests to backend location /socket.io/ { - proxy_pass http://server:3000; + proxy_pass http://api:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; } location /api/ { - proxy_pass http://server:3000; + proxy_pass http://api:3000; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; } } diff --git a/client/package-lock.json b/client/package-lock.json index ad30a7f..7858a19 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -15,7 +15,8 @@ "pinia": "^3.0.4", "socket.io-client": "^4.8.3", "tweetnacl": "^1.0.3", - "vue": "^3.5.24" + "vue": "^3.5.24", + "vue-router": "^4.6.4" }, "devDependencies": { "@vitejs/plugin-vue": "^6.0.1", @@ -5849,6 +5850,27 @@ "eslint": ">=6.0.0" } }, + "node_modules/vue-router": { + "version": "4.6.4", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.6.4.tgz", + "integrity": "sha512-Hz9q5sa33Yhduglwz6g9skT8OBPii+4bFn88w6J+J4MfEo4KRRpmiNG/hHHkdbRFlLBOqxN8y8gf2Fb0MTUgVg==", + "license": "MIT", + "dependencies": { + "@vue/devtools-api": "^6.6.4" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + }, + "peerDependencies": { + "vue": "^3.5.0" + } + }, + "node_modules/vue-router/node_modules/@vue/devtools-api": { + "version": "6.6.4", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.4.tgz", + "integrity": "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==", + "license": "MIT" + }, "node_modules/w3c-xmlserializer": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", diff --git a/client/package.json b/client/package.json index 444982d..9616efb 100644 --- a/client/package.json +++ b/client/package.json @@ -17,7 +17,8 @@ "pinia": "^3.0.4", "socket.io-client": "^4.8.3", "tweetnacl": "^1.0.3", - "vue": "^3.5.24" + "vue": "^3.5.24", + "vue-router": "^4.6.4" }, "devDependencies": { "@vitejs/plugin-vue": "^6.0.1", @@ -31,4 +32,4 @@ "vite": "^7.2.4", "vitest": "^4.0.17" } -} +} \ No newline at end of file diff --git a/client/src/App.vue b/client/src/App.vue index 12ab093..2905219 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -1,8 +1,6 @@ - + + diff --git a/client/src/components/DocsView.vue b/client/src/components/DocsView.vue new file mode 100644 index 0000000..ccd2cbf --- /dev/null +++ b/client/src/components/DocsView.vue @@ -0,0 +1,72 @@ + + + diff --git a/client/src/components/MessageList.vue b/client/src/components/MessageList.vue index da05392..24da011 100644 --- a/client/src/components/MessageList.vue +++ b/client/src/components/MessageList.vue @@ -2,17 +2,19 @@ import { ref, onUpdated, nextTick } from 'vue'; import { useChatStore } from '../stores/chat'; import { storeToRefs } from 'pinia'; -import { Send, Hash, Smile } from 'lucide-vue-next'; +import { Send, Hash, Smile, ExternalLink, Copy, Check } from 'lucide-vue-next'; const chatStore = useChatStore(); const { currentMessages, currentChannel, walletAddress } = storeToRefs(chatStore); const newMessage = ref(''); const messagesContainer = ref(null); -const showEmojiPicker = ref(null); // messageId +const showEmojiPicker = ref(null); +const copiedTxId = ref(null); -const EMOJIS = ['👍', '❤️', '🔥', '😂', '😮', '😢']; +const EMOJIS = ['👍', '❤️', '🔥', '😂', '😮', '😢', '🚀', '💎']; const toggleReaction = (messageId, emoji) => { + console.log('Toggling reaction:', messageId, emoji); chatStore.toggleReaction(messageId, emoji); showEmojiPicker.value = null; }; @@ -51,18 +53,21 @@ const formatTime = (isoString) => { return new Date(isoString).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }); }; +const copyTxId = (txId) => { + navigator.clipboard.writeText(txId); + copiedTxId.value = txId; + setTimeout(() => { copiedTxId.value = null; }, 2000); +}; + const emit = defineEmits(['view-profile']);