Coder Social home page Coder Social logo

fiatjaf / branle Goto Github PK

View Code? Open in Web Editor NEW
111.0 4.0 70.0 1.99 MB

A Twitter-like Nostr client made with Quasar

Home Page: https://branle.netlify.app/

License: MIT License

JavaScript 44.90% Vue 53.61% HTML 0.51% CSS 0.06% Go 0.92%
nostr twitter client

branle's Introduction

branle

an experimental twitter-like nostr client using absurd-sql.

Branle.des.Lavandieres-gZyiQpUXIAM.mp4

branle assumes it will be deployed to Netlify. If you want to deploy it elsewhere in your own machine you'll have to find a way to mimic the custom headers and avatar proxy function. See netlify.toml.

Install the dependencies

yarn

Start the app in development mode (hot-code reloading, error reporting, etc.)

./node_modules/.bin/quasar dev

Customize the brand

Edit customize.json and replace the colors, icon, name and dark mode setting. When setting the dark mode, you can also set the colors "dark-page" and "dark".

branle's People

Contributors

cameri avatar dadbeef avatar fiatjaf avatar giszmo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

branle's Issues

Make build independent of base url

Deploying the built files to anything but the root folder breaks links.

Expected behaviour: Easy deployment in existing server by dropping the compiled files into some sub folder of my otherwise working website. This is how I had https://github.com/arcbtc/nostr deployed in no time.

Actual behaviour:

[2022-04-06 13:10:28] ERROR `/js/962.0d5c7870.js' not found.
[2022-04-06 13:10:28] ERROR `/js/532.9c3f5fab.js' not found.
[2022-04-06 13:10:44] ERROR `/js/962.0d5c7870.js' not found.
[2022-04-06 13:10:44] ERROR `/js/532.9c3f5fab.js' not found.
...

Python not found

Getting the below when building Docker image. Me only?

#12 27.60 [5/5] Building fresh packages...
#12 28.09 error /app/build/node_modules/utf-8-validate: Command failed.
#12 28.09 Exit code: 1
#12 28.09 Command: node-gyp-build
#12 28.09 Arguments:
#12 28.09 Directory: /app/build/node_modules/utf-8-validate
#12 28.09 Output:
#12 28.09 gyp info it worked if it ends with ok
#12 28.09 gyp info using [email protected]
#12 28.09 gyp info using [email protected] | linux | arm64
#12 28.09 gyp ERR! find Python
#12 28.09 gyp ERR! find Python Python is not set from command line or npm configuration
#12 28.09 gyp ERR! find Python Python is not set from environment variable PYTHON
#12 28.09 gyp ERR! find Python checking if "python" can be used
#12 28.09 gyp ERR! find Python - "python" is not in PATH or produced an error
#12 28.09 gyp ERR! find Python checking if "python2" can be used
#12 28.09 gyp ERR! find Python - "python2" is not in PATH or produced an error
#12 28.09 gyp ERR! find Python checking if "python3" can be used
#12 28.09 gyp ERR! find Python - "python3" is not in PATH or produced an error
#12 28.09 gyp ERR! find Python
#12 28.09 gyp ERR! find Python **********************************************************
#12 28.09 gyp ERR! find Python You need to install the latest version of Python.
#12 28.09 gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#12 28.09 gyp ERR! find Python you can try one of the following options:
#12 28.09 gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
#12 28.09 gyp ERR! find Python   (accepted by both node-gyp and npm)
#12 28.09 gyp ERR! find Python - Set the environment variable PYTHON
#12 28.09 gyp ERR! find Python - Set the npm configuration variable python:
#12 28.09 gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
#12 28.09 gyp ERR! find Python For more information consult the documentation at:
#12 28.09 gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#12 28.09 gyp ERR! find Python **********************************************************
#12 28.09 gyp ERR! find Python
#12 28.09 gyp ERR! configure error
#12 28.09 gyp ERR! stack Error: Could not find any Python installation to use
#12 28.09 gyp ERR! stack     at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:307:47)
#12 28.09 gyp ERR! stack     at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:136:21)
#12 28.09 gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:179:16)
#12 28.09 gyp ERR! stack     at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:271:16)
#12 28.09 gyp ERR! stack     at exithandler (child_process.js:315:5)
#12 28.09 gyp ERR! stack     at ChildProcess.errorhandler (child_process.js:327:5)
#12 28.09 gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
#12 28.09 gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
#12 28.09 gyp ERR! stack     at onErrorNT (internal/child_process.js:470:16)
#12 28.09 gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:84:21)
#12 28.09 gyp ERR! System Linux 5.10.104-linuxkit
#12 28.09 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
#12 28.09 gyp ERR! cwd /app/build/node_modules/utf-8-validate
#12 28.09 gyp ERR! node -v v12.22.11
#12 28.09 gyp ERR! node-gyp -v v5.1.0
#12 28.09 gyp ERR! not ok
#12 28.09 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
------
executor failed running [/bin/sh -c yarn]: exit code: 1

error: A hash of at least 15 characters is required

Setup

Running quasar build and then quasar serve -h dist/spa or quasar dev

Error

This error comes in the browser, on on first use

error: A hash of at least 15 characters is required

I've tested it in a couple of places and on localhost, also @bumi got the same problem

I'm sure quasar dev has worked for me earlier in the week but not now

Will continue to debug ...

DM notification keeps popping up

When local data is deleted (cache and all that), DM turns from read to unread. Maybe this is because the "read-unread" property lives inside the client rather than relays.

To reproduce: Login to branle in other browser that has never been used to login into branle, or clean branle-related data before logging in again. Notifications will popup for previously-read DMs.

A solution would be putting the "read-unread" property inside relays, but that, I guess, would be bad for privacy.

feature request: onboarding guide

I already lost my account because i didn’t back up my keys and i didn’t know the browser would erase local storage so quickly.

oboarding should include:

  1. advise to backup keys or mnemonic in a password manager
  2. basic info on where post data is stored
  3. basic warnings on privacy (who can find you and how, data is all permanent, IP address exposure, best practice to separate identities since petnames can dox you)

can't reply to myself more than once

hey fiatjaf,

i think i found a small issue where I can't reply to myself more than once and was able to reproduce on branle (3rd post was from forked branle client I am building with fix applied):
image

when I logged it to the console usableTags seemed to be returning a proxy value rather than an array(2).
image

i fixed it by just changing usableTags (in Reply.vue sendReply method) from this:
let usableTags = this.event.tags.filter(
([t, v]) => (t === 'p' || t === 'e') && v
)

to this:
let usableTags = this.event.tags.filter(
([t, v]) => (t === 'p' || t === 'e') && v
).map(([t, v]) => { return [t, v] })

let me know if you'd like me to create a pull request to fix this... or if I am doing something wrong and it isn't actually broken :)

Feature Request: Local data backup & restore

Great that my identity can be initialised with the private key, but it comes back clean, without any of the earlier events or configuration of follows or relays.

If possible, a backup and restore (with some public/private key encryption) would be handy.

Feature Request: CTRL + Enter shortcut to add post/reply

Description
On Twitter and Mastodon I'm able to write a post or a comment and then do CTRL + Enter to create the post. I think that would be a good feature on Branle as well.

I don't have much front end experience myself so I can't contribute anything myself.

License?

I'm guessing I know the answer to this given the nostr-tools README, but: do you have a license intended to apply to this repo?

I'd like to avoid making any unfortunate assumptions about acceptable use.

A kind 3 event is adding a wrong relay for a contact

I created this event on branle.netlify.app: https://branle.netlify.app/event/be8e343386bcabe41e677a9bfd760487b07a17960523ccef5f0c9f05ca4ef6f1

For one, userid 32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245
has the relay mentioned as nostr.rocks in this event, but this user does not publish his events on nostr.rocks. His events are seen on other two relays, such as wss://nostr-pub.wellorder.net

So the correct behavior should be to mention the relay on which this user publishes in such an event.

Not working in private browsing

When using in a private browsing session the following error raises

Failed to open indexedDB, are you in private browsing mode? vendor.3d7f4559.js:26:111016

Browser:

Firefox Browser 94.0

Profile save button should be disable in public key mode

When only the public key is provided, the "Save" button on the profile is enabled. Attempting to save, will result in error only logged to debug console. The "Publish" button is disable in public key mode, the "Save" button should probably too be disabled.

feature request: multi-account management

Given that nip-005 will gossip your username all over the place, I think it will be necessary to allow people to maintain multiple accounts if they don't want social circles to overlap, or even if they just want a brand account and a personal account.

Multi-account management would be cool. Like if your device saves your keys for multiple accounts and you can switch between them quickly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.