tipping-community-backend's Issues
Change image endpoint so it can be created without an existing profile
Add .chain names to website parser
crawl, save and return favicon
Currently when a website is crawled, only the meta information & potentially a screenshot is saved. This should be extended to include the favicon. It should be, when available:
- downloaded
- checked if it has a suitable size (should be at least 32x32 px but at most 256x256px) (excluding svgs.)
- converted to a usable format (jpg / png / svg)
- saved in the database along with the other infos
- saved in IPFS as backup
This can be tricky because websites might present different logos / favicons on their page. It would be necessary to get the best resolution available for the optimal result. These might be presented as app-icons
or similar.
Additionally test cases would need to be written to cover the added changes.
Starting points:
Add profile endpoints
Story: As a user I would like to add additional information about myself to my profile.
Required Endpoints:
GET /profile/:address
--> Returns single profile information
POST /profile/:address
--> Signature Auth --> Creates single profile
PUT /profile/:address
--> Signature Auth --> Updates single profile
DELETE /profile/:address
--> Signature Auth --> Deletes single profile
Profile Model:
{
publicKey: String(address),
avatar: Blob(image), // Could be base64 encoded and stored in db?
biography: String,
signature: String,
username: String // We could not offer this and use .chain names
}
Save images to temp folder and delete on challenge timeout
Move images to backend instead of serving links from remote websites
Create Reputation Scoring
For reference: https://forum.aeternity.com/t/micro-project-reputation-engine/6187
First reputation parameters
- Are one or multiple .chain names attached to the public key?, if so, how long are they
- How much did the public key spend? (& how much on average per tip)
- How much did the public key receive? (& how much on average per tip)
Stub aeternity.js in tests
highest rated tips filter
avatar still served after `delete` request
refactor tests to use const instead of let
Crawler sometimes errors
TypeError: Cannot read property 'parent' of null
at Function.exports.update (/app/node_modules/cheerio/lib/parse.js:69:26)
at module.exports (/app/node_modules/cheerio/lib/parse.js:19:11)
at Function.exports.load (/app/node_modules/cheerio/lib/static.js:27:14)
at Function.CheerioAdv.load (/app/node_modules/cheerio-advanced-selectors/index.js:23:26)
at module.exports (/app/node_modules/metascraper/src/load-html.js:6:11)
at /app/node_modules/metascraper/src/index.js:24:16
at Function.createPreviewForUrl (/app/logic/linkPreviewLogic.js:38:28)
at async Promise.all (index 0)
at async Function.updateTipsInDatabase (/app/logic/cacheLogic.js:62:9)
at async CacheLogic.init (/app/logic/cacheLogic.js:15:5)
Update verified to show full urls instead of domains
Replace tipId with urlId in all public apis
cache oracle contract stats
Paginate cached data in order to enable endless scroll
retips to update unique tippers counter
Retips are not updating the unique tipper's counter. E.g. if you havent created a tip, but rather only retipped others - this is not shown anywhere in the stats
return user indenticion instead of the default avatar
persist db on redeploy
Add Dockerfile
Create Database Migrations
with the primary goal to setup a system for future database changes
check if preview image is below a resolution threshold
Mismatch in comments documentation
When POST
ing a new comment the note
field is not used currently in favor of text
.
Add CI
display default image for user profiles avatars
allow filtered request of cached data, e.g. for user profile
linkpreview as screenshot instead of no image
Merge superhero in master and move corona to a different branch
Profile creation buggy
(node:1) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'filename' of undefined
at updateImage (/app/logic/profileLogic.js:56:26)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 45)
Write Tests
blacklisted websites
Initial list
https://facebook.com
https://weibo.com
https://www.pinterest.com
https://vk.com
https://quora.com
https://www.spotify.com
https://linkedin.com
backend is serving Html tags in tip preview info
Unlimited nested comments
Each comment can have parent comment id.
Linkpreviews throws error
WHERE parameter "author" has invalid "undefined" value
- step with signature in updating biography
add comments by user stat in profile (from backend)
add tests for stats
Create Pro-Active Error Monitoring
Build a system to get error notifications
compress images stored for url previews
compress and deliver low res/ compressed images for display in tiplist
Evaluate the hosting of own compiler
Stats endpoint
Endpoint for getting statistical data for usage:
- total comments
- total profiles etc
Integrate LinkPreviewAPI
Store selected .chain address for user profile
Store the selected .chain address of the user preference to be associated with in the superhero platform.
Document API
Aggregate tips value for URL
Aggregate tips + retips as a summed up value for URL.
This is probably dependent on the new contract which has the concept of retiping.
Verified URL
Do not serve default fallback avatar
Provide meaningful error code or response to be handled in the UI and extension when user did not upload custom avatar, as we are going to use jdenticon generated avatars on UI side.
Cache data for aggregator, to fetch all with one request
screenshot website as fallback
Create DB & File Backup
backup to remote server and to ipfs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.