lbryio / spee.ch Goto Github PK
View Code? Open in Web Editor NEWAn image hosting service on top of the LBRY protocol.
Home Page: https://spee.ch
License: MIT License
An image hosting service on top of the LBRY protocol.
Home Page: https://spee.ch
License: MIT License
story: as a user, when I share a spee.ch link on twitter I want twitter to load the image from the link so that my followers can see the image without having to click through the link.
issue: At the moment, twitter does not retrieve the asset and display it in your tweet, it just shows the link.
steps to reproduce (from @finer9 ) in twitter
The back end should validate the url params received by the routes before initiating action on them. The daemon will reject them, but it would be better to catch it up front.
For example: checking for correct characters in the name, checking the length of the uri, etc.
The affected routes include:
As a user, I want to get a speech url with my image's extension on it so I can easily tell that it is a direct link to that image.
story: As a user who publishes a video, I want to be able to change the options on the video and have the html embed code change for me so I can adapt my video for my desired use without knowing html.
for sharing links, add buttons with options for autoplay, looping, etc. and have the html snippet adapt accordingly.
options to offer
https://spee.ch/cow-air-balloon triggers a file download, rather than being served. Likely related to the headers being sent, but I did not dig very far.
If client indicates the size of the image requested, provide the asset in that size.
Examples:
spee.ch/example/h40
, spee.ch serves an image with height of 40 (while maintaining aspect ratio)spee.ch/example/w60
, spee.ch serves an image with width of 60 (while maintaining aspect ratio)spee.ch/example/40x60
, spee.ch serves an image with height of 40 and width of 60 (stretching original image)Story: as a developer, I want to see how many visitors are coming from each country, so that I can better understand spee.ch's audience.
Issue: google analytics were showing all 'serve' requests coming from Virginia.
Solution: I believe this is happening because google is receiving some of spee.ch's server's data rather than the user's. I will adjust the universal-analytics params to ensure it is sending data about the request and not spee.ch.
Story: As a user, I want to know that the claim name is the url at which my image will be published, so that I know what the input is for.
solution: prefix the input box with 'spee.ch/'
user story: As a user, I want to be able to publish images from the spee.ch homepage and through spee.ch's api, so that I can share those images across the internet.
issue: On publish, users are receiving Network Rules (18: bad-txns-inputs-spent)
error.
This appears to be an issue with the wallet and daemon, and perhaps with a race condition in which transactions are not being recorded correctly. It has been reported on lbry here lbryio/lbry-sdk#737.
A short term fix that has worked so far is removing the wallet and creating a new one, but that only seems to solve the issue for a short while.
It is unknown whether this is result purely from the volume of transactions or as a result of setting the claim_address
in the publish params (which was a fix to the issue where every publish created a new wallet-address).
Certain images that spee.ch serves have been updated elsewhere via lbry but the updated file does not show up on spee.ch.
This appears to be a result of spee.ch's daemon thinking it already has the most recent image and not retrieving the updated one. As seen below, a resolve
call to the spee.ch daemon will show the updated outpoint. However, a get
call to the same uri will return the old asset with the old outpoint. The daemon logs (see below) confirm that it believes it already has the most recent file and I believe is therefore not going out and re-downloading the file from lbry.
I have not yet reported an issue on lbryio/lbry. @kaykurokawa mentioned this may have to do with caching.
$ curl 'http://localhost:5279/lbryapi' --data '{"method":
"resolve","params":{"uri":"meme-fodder#61bcc109366c2b66c1507866211fa8d7ea53bb9b"} }'
{
"id": null,
"jsonrpc": "2.0",
"result": {
"meme-fodder#61bcc109366c2b66c1507866211fa8d7ea53bb9b": {
"claim": {
"address": "bJpWLpQwq5xdQ6EzW2TPUkvf3B8v3MQxvt",
"amount": 2000000,
"claim_id": "61bcc109366c2b66c1507866211fa8d7ea53bb9b",
"claim_sequence": 2,
"decoded_claim": true,
"depth": 282,
"effective_amount": 1000000,
"has_signature": false,
"height": 199308,
"hex": "080110011a9b0108011254080410011a0b6d656d652d666f6464657222216d65
6d652d666f64646572207075626c69736865642076696120737065652e63682a07737065652e6368
320d5075626c696320446f6d61696e38004a0052005a001a41080110011a3098e731bf406b0440a5
0f3d1bdc29036139c8b76db61f9cce127e471cacde21af7526000206143b80465d3971080e134522
09696d6167652f706e67",
"name": "meme-fodder",
"nout": 0,
"supports": [],
"txid": "6aeb24bde5389064e036888b9efdad5b87bcadf49228e83f99e5ac3ca9b4406
0",
"valid_at_height": 199314,
"value": {
"claimType": "streamType",
"stream": {
"metadata": {
"author": "spee.ch",
"description": "meme-fodder published via spee.ch",
"language": "en",
"license": "Public Domain",
"licenseUrl": "",
"nsfw": false,
"preview": "",
"thumbnail": "",
"title": "meme-fodder",
"version": "_0_1_0"
},
"source": {
"contentType": "image/png",
"source": "98e731bf406b0440a50f3d1bdc29036139c8b76db61f9cce127e471
cacde21af7526000206143b80465d3971080e1345",
"sourceType": "lbry_sd_hash",
"version": "_0_0_1"
},
"version": "_0_0_1"
},
"version": "_0_0_1"
}
}
}
}
}
$ curl 'http://localhost:5279/lbryapi' --data '{"method":
"get","params":{"uri":"meme-fodder#61bcc109366c2b66c1507866211fa8d7ea53bb9b"} }
'
{
"id": null,
"jsonrpc": "2.0",
"result": {
"claim_id": "61bcc109366c2b66c1507866211fa8d7ea53bb9b",
"completed": true,
"download_directory": "/home/lbry/Downloads",
"download_path": "/home/lbry/Downloads/owl.jpeg",
"file_name": "owl.jpeg",
"has_signature": false,
"key": "9b4f23be86dbc5568e9f997caeebf05c",
"message": "Started owl.jpeg, got 1/1 blobs, stream status: completed",
"metadata": {
"claimType": "streamType",
"stream": {
"metadata": {
"author": "spee.ch",
"description": "meme-fodder published via spee.ch",
"language": "en",
"license": "Public Domain",
"licenseUrl": "",
"nsfw": false,
"preview": "",
"thumbnail": "",
"title": "meme-fodder",
"version": "_0_1_0"
},
"source": {
"contentType": "image/png",
"source": "98e731bf406b0440a50f3d1bdc29036139c8b76db61f9cce127e471cacd
e21af7526000206143b80465d3971080e1345",
"sourceType": "lbry_sd_hash",
"version": "_0_0_1"
},
"version": "_0_0_1"
},
"version": "_0_0_1"
},
"mime_type": "image/jpeg",
"name": "meme-fodder",
"outpoint": "4849f7e567641ef23db735ae9ad485b660e41619d7e58beac92c5739f8ebdb9
8:0",
"points_paid": 0.0,
"sd_hash": "0c38f31b8050a10d438fba060e6e622beca6cebd5cc8d50c29eb2597a4097312
effec6f3a658b254b429b0509cda72bf",
"stopped": true,
"stream_hash": "c6c1627aecf755c2e4a2d4b0e390d9f868f31e7ec4dcc007383b0811e3ea
c33b5da3fe62b432fdae452a12e6499d38c4",
"stream_name": "owl.jpeg",
"suggested_file_name": "owl.jpeg",
"total_bytes": 28032,
"written_bytes": 28026
}
}
(from the Daemon logs: )
Jun 30 18:44:39 ip-172-55-1-123 lbrynet-daemon[911]: 2017-06-30 18:44:39,761 INFO lbrynet.core.Wallet:810: Resolving meme-fodder#61bcc109366c2b66c1507866211fa8d7ea53bb9b
Jun 30 18:44:39 ip-172-55-1-123 lbrynet-daemon[911]: 2017-06-30 18:44:39,896 INFO lbrynet.daemon.Daemon:1524: Already have a file for meme-fodder
At the moment it's possible to publish a file of any size, and also download a file of any size. We should probably add a sensible limit to both, something around 5 to 10MB maybe?
Story: As a user, I want to be given a short url, so that I can use that url to embed or link to without having to remember or copy a very long url string.
add a meme generator, based off of the publish tool, as its own page.
User story: As a user, I want to be able to view images in my browser along with metadata and tools, so that I can learn more about the image and easily share/embed it where I need to.
Add a 'show' route for claims. This route will display the image in a web page as opposed to serving the asset directly. The show route page will include a couple simple tools (copy to clipboard, etc).
After publish, spee.ch should redirect the user to the show route.
As a spee.ch user, I want to see which images are trending within the spee.ch community without it being clouded by images being frequently requested by other apps, so that I can see fun images and partake in trending image challenges.
User story: As a user, after I publish an image, I want to be shown the direct link to that image and be able to copy it easily, so that I can share or embed it elsewhere on the internet.
After a publish is complete, it should display links/buttons for sharing the published asset.
Currently the copy-to-clipboard button is broken. That needs to be fixed.
It should also offer 'tweet', 'post to reddit', embedding options (like an image tag using your spee.ch url), and other helpful sharing buttons.
Use lbrynet-cli claim_list_mine
Story: As a developer, I want to be able to commit my changes to master and have those changes go live, so that I do not have to spend time manually updating the version on the server.
Story: As a user, I want to be told when my input is not acceptable in a way that does not disrupt my user experience, so that I can easily complete my goal of submitting the input.
Front end validation on inputs (specifically the 'name' field) is letting in "_" which should not be allowed. Regex needs to be updated.
Validation is also using alerts to tell users of invalid characters. This needs to be changed to something user friendly, like red text above the offending inputs.
https://spee.ch/show/giphy/84e4bd123b96feaa2397a8a8bcce51f5dad6b456
Cannot read property 'height' of undefined
At least until the daemon supports multiple publishes to the same name.
As a user, I'd prefer to be told I entered an invalid name as soon as possible, rather than after I submit the form.
Currently when you publish a new image with a name matching an existing claim, it does not outbid that claim and the publish process continues as though it has worked correctly.
It should either:
I'm curious if named claims are really the best way forward, it sure is cool to be able to name your image, but is it practical to implement it that way, and does it solve any real world problem?
right now, if no claims are found for spee.ch/example, the server sends an html file with status 307. The server should check the request and see whether the client will accept html, and if it will not send a different type of response (json?);
Story: As a developer, I want the spee.ch app to retrieve the download directory from the daemon directly on startup, so that it will always be correct and won't require keeping an environmental variable updated.
as a user I want to know where to submit feedback and ask for support
I uploaded lbry://lbrylogo2 and when I went to https://spee.ch/lbrylogo2, I got an error about height being undefined with a white background, plain black text.
After clicking refresh, the page loaded correctly.
Per @billbitt , this only happens on claims the first time they are loaded through spee.ch
user story: As a slack user, I want to be able to type !speech lake
and get the claim from spee.ch for the name 'lake' (https://spee.ch/lake), so that I don't have to type out the full url.
A bot to provide interaction with spee.ch from slack. The ideal bot will be great for lbry, but also for other slack communities who can install it and benefit from the fun/helpful tools it provides.
@filipnyquist is working on this.
As a spee.ch user, sometimes I upload my image and then accidentally close the tab or forget what URL I used. It would be useful if I could see my recent publishes (or really all of my publishes, as long as my cookie hasn't changed).
Right now spee.ch is stopping the user from submitting files with certain file names. Spee.ch should allow all file names through the upload portion and then rename those files on the server side instead.
Typing a character in the middle of the name input will move the cursor to the end.
See here. We'd definitely want the main four. You can also look at what lbry.io or other sites do.
routes/show-routes.js.exports
story: As a user, I want to see a preview frame of my video file before I click submit, so that I can see it has been accepted and staged for publishing.
Story: As developers, we want to test the capabilities of the server in responding to requests, so that we can ensure our user's requests will be handled without failure.
Currently spee.ch's logic returns an error to the controller if a free, public claim is not found, and then the router serves a page with a 307 status code telling client there are no claims. This is not technically an error, it is a successful request that returned no results. The functionality should stay the same, but the architecture should be adjusted so this is not treated as an error.
As a user, when I view on my phone I want the top bar content to lay out nicely.
Story: As a user, I want the trending images to be displayed in a nice orderly fashion of somewhat uniform size so that they are pleasant to the eye.
As a developer, I want the javascript that organizes the trending images to be triggered after all images have loaded, so that they are laid out without overlapping eachother.
(thanks @lyoshenka )
story: as a user, I want to know quickly whether the requested content is unavailable, so that I do not have to wait and then be dissapointed.
Some get requests to daemon are resulting in timeouts which the daemon is getting confused by.
When the daemon times out, it will hang and then send a timeout message. (note: shortening the timeout by specifying it in the get parameters does not work atm. I specified 30 seconds but it still takes 180 to timeout, which seems to be what creates the 'hanging'). Once the daemon has fully timed out, it sends the timeout error.
When the request is made a second time, the daemon will log that it is already downloading the file (2017-06-30 15:35:03,701 INFO lbrynet.daemon.Daemon:1513: Already waiting on lbry://example to start downloading
) and then responds to the client with the following: "{\"id\":null,\"jsonrpc\":\"2.0\",\"result\":null}"
This seems to be an error with the daemon, but spee.ch should be able to handle this by detecting the timeout and then responding to the client with further direction. Unfortunately, the subsequent calls that return the result of null are a little more tricky to deal with.
As a user, I want to be able to upload my video thumbnail to spee.ch without leaving the lbry app so that I can publish my videos faster.
Strip out the non-essential info from the homepage and move it to a subpage.
Per a slack user, channel name followed by claim name does not resolve. See below.
https://spee.ch/anarch/neko -doesn't work
https://spee.ch/neko - works
https://spee.ch/anarch/ccb0bf9f6705b2c9641d997e430c9f62430075e7 - works
Since the last example works, I think it should be able to resolve by name also.
Just something to get out of the way as early as possible, it would be nice to follow these coding standards for PHP as they are quite widely used, especially by composer packages.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.