# Decentral Ninja The easiest way to connect with others without the need for phone numbers or email exchanges! ## Install & Run - git submodule init - git submodule update - npm install - npm run serve ### TODO: - [x] choose license (https://www.infoworld.com/article/3703768/the-open-source-licensing-war-is-over.html?utm_source=changelog-news) - [x] move exampleTwo to here... - [x] textarea instead of input field - [x] reorganize exampleTwo, hidden appear effect, chat-, room-, user-, provider- controller - [x] finish completely style/transform exampleTwo - [x] src/es/chat/es/components/molecules/Users.js listen to "yjs-users" event dispatched from controller/Users.js with func. detail.getData() and not awareness-change event!!! - [x] pimp Router to open new components on certain query parameters (as key) and make room view to choose room or create room - [x] header controls in dialog (nav modal) - [x] replace confirm box with input dialog and fix lost username by storing it to local storage - [x] controllers/Rooms.js getting a room event from EventDrivenYjs.js and maintaining the rooms at local storage for further consumption at Rooms view / manifest to fullscreen / give option to open in new tab - [x] delete room local storage - [x] add an atom listening to "yjs-room" any event and displaying the "room name" info "in the header" (also replace 'yjs-get-room' in the header with that atom) where ever placed (general element with info batch support and dispatch Event to open dialog menu) & nickname on each message which on click opens the nickname window and updates on yjs-nickname - [x] on app reset directly route to last visited room vs. home - [x] room overview show current chat grayed out - [x] notification on request per room (deliver through message channel), cache notification at sw cache with room name (cache this uid, see MasterServiceWorker.js L:37), badge: https://developer.mozilla.org/en-US/docs/Web/API/Badging_API - [x] MasterServiceWorker add a Notification Queue which can be read through events - [x] WebWorkers for controller/Notifications.js _updateNotifications, controller/User.js + controller/Provider.js - [ ] **ipfs and webtorrent integrations (https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler?retiredLocale=de)** with WakeLock for video playing | https://developer.mozilla.org/en-US/docs/Web/API/Media_Session_API | https://developer.mozilla.org/en-US/docs/Web/API/Picture-in-Picture_API - [ ] add scroll down/not read messages button - [ ] other (notSelf) nickname open users dialog, keep link in footer - [ ] Answer to a certain or multiple messages - [ ] QR code generator (something like https://github.com/sumimakito/Awesome-qr.js#browsers) and print css https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Printing - [ ] Kill Room Button for KeepAlive at "You are alone" disconnect - [ ] user give a room a hint name (local storage only) - [ ] video call in iframe from flux (https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-ljm-api) - [ ] Service Worker for caching assets PWA, https://docs.pwabuilder.com/#/home/native-features?id=periodic-background-sync-overview, https://docs.pwabuilder.com/#/home/sw-intro?id=pre-caching-during-the-install-event - [ ] Update yjs rollup stuff - [ ] share room, share api + https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API, https://docs.pwabuilder.com/#/home/native-features?id=web-share-api, https://docs.pwabuilder.com/#/home/native-features?id=how-to-share-from-your-pwa - [ ] https://www.runonflux.io/ - [ ] mobile on focus ask by dialog to refresh (reload), when the last activity to provider is old: https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API - [ ] BugFix, persistence clears document before timeout or possible never saved it, research: https://github.com/Weedshaker/y-websocket/blob/master/bin/utils.js#L243 --- Beta --- - [ ] security and text & room link encryption - [ ] chat end to end encryption https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto with asymmetrical private/public key -> https://github.com/mdn/dom-examples/blob/main/web-crypto/derive-key/ecdh.js (read & write [key pair], only read [private key ? must not include pub key], only write [public key]) | https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API | explanation video: https://www.ted.com/talks/andy_yen_think_your_email_s_private_think_again - [ ] key pair share encrypt with jwt - [ ] user pick a color (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color) - [ ] speech (tests/exampleThree.html) see tests/exampleThree/Input.js - [ ] record audio https://developer.mozilla.org/en-US/docs/Web/API/MediaStream_Recording_API - [ ] QR code scanner: https://github.com/nimiq/qr-scanner | https://developer.mozilla.org/en-US/docs/Web/API/Barcode_Detection_API - [ ] Pick past usernames analog room name storage - [ ] open pwa on decentral.ninja link - [ ] Chat full text search (https://github.com/nextapps-de/flexsearch#installation) - [ ] IndexedDB delete Option per room, etc. general Storage management: https://developer.mozilla.org/en-US/docs/Web/API/Storage_API - [ ] fix Iphone/IOS Notifications/Batches (https://devtails.xyz/@adam/how-to-setup-web-push-notifications-in-ios-safari#server-side-push-notifications) : alternative when app open go through all rooms, get the new messages and release event with the notifications, that at least the user doesn't have to check each room but just open the app - [ ] controllers/Providers.js when on automatic connect look for the most favorable connections and avoid orphans else allow manual choice at Providers view (User controller if not connected offer to connect to other urls max. 2 per socket / connecting to other servers according user crdt data [provider has mutually connected users with some connected to other providers with mutually connected users and vice versa]) + handle on error ws connection at provider - [ ] go through check list (https://github.com/Weedshaker/event-driven-web-components-yjs/blob/master/readme.md) - [ ] CRDT Corrupted undo option with Room change --- Version One --- - [ ] native operating system share dialog behavior (https://docs.pwabuilder.com/#/builder/manifest?id=share_target-object) - [ ] Chat message on intersection declare as read by filling it into array with own uid (https://github.com/mits-gossau/web-components-toolbox/blob/master/src/es/components/prototypes/Intersection.js) - [ ] Keep chat scroll position by intersection (https://github.com/mits-gossau/web-components-toolbox/blob/master/src/es/components/prototypes/Intersection.js) - [ ] Pin and sort rooms (https://github.com/shresthalucky/sortable-dnd/blob/master/src/sortable-dnd.js + https://artecher.github.io/react-dnd-ax-demo/?selectedKind=Button&selectedStory=Complex%20Example&full=0&down=1&left=1&panelRight=0&downPanel=storybook%2Factions%2Factions-panel + https://github.com/blackboard/react-dnd-ax) - [ ] On Desktop keep chat rooms alive even with route or focus lost. Ether just hide at route.js or set the following attributes on EventDrivenYjs controller (https://github.com/Weedshaker/event-driven-web-components-yjs/blob/master/src/es/EventDrivenYjs.js#L938 + https://github.com/Weedshaker/event-driven-web-components-yjs/blob/master/src/es/EventDrivenYjs.js#L986) - [ ] enable sending money https://docs.metamask.io/wallet/how-to/connect/set-up-sdk/javascript/pure-js/ | https://developer.mozilla.org/en-US/docs/Web/API/Payment_Request_API - [ ] yjs in webworker (https://github.com/y-js/y-webworker) - [ ] check security requirements from https://www.securemessagingapps.com - [ ] Mail Notifications or voluntary authentication by mail (https://github.com/nodemailer/nodemailer) - [ ] draw https://github.com/tldraw/tldraw - [ ] dns (link board) / dns crdt - [ ] id, room administrators (nostr) - [ ] organization (DAO?) - [ ] Add Spaces that act as buckets for rooms and Users - [ ] Add Contact Book Functionality --> Users "list" - [ ] Preserve nickname, color, and recently used emojis on the "device" and enable synchronization with other devices through a QR code and link Add Chat Options: - [ ] Delete Messages Recipients See "This message was deleted": Instead of the deleted message, recipients see a notice saying "This message was deleted." This is visible in place of the original message. Time Limit for Deletion: 1 hour, 8 minutes, and 16 seconds after sending. Offline Deletion: If the recipient is offline or the message hasn't been delivered, the sender can delete the message, and won't be sent. - [ ] Change the Color for a User in a Room or set UserName Colors automatically as WhatsApp does --- UI / UX --- - [ ] create UI similar to element.io - [ ] Add Days or/and Date of the message section --- Emoji TODO --- - [ ] Output larger if only emoji is sent - [x] Make EmojiPicker Responsive - [x] create top global used emojis list - [ ] search function for emojis - [ ] display recent used emojis - [ ] add emojis where cursor is in text - [ ] dont hide emoji picker when clicked in textarea - [ ] use "own" emoji style --> symbl.cc