{"id":18454595,"url":"https://github.com/likecoin/likecoin-poc","last_synced_at":"2025-06-21T17:36:15.434Z","repository":{"id":80369404,"uuid":"107682915","full_name":"likecoin/likecoin-poc","owner":"likecoin","description":"Meme Generator - a proof of concept of LikeCoin content footprint","archived":false,"fork":false,"pushed_at":"2019-02-11T12:21:44.000Z","size":77,"stargazers_count":4,"open_issues_count":2,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-23T06:11:21.521Z","etag":null,"topics":["ethjs","ipfs","nodejs"],"latest_commit_sha":null,"homepage":"https://meme.like.co","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/likecoin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-10-20T13:42:56.000Z","updated_at":"2019-05-01T12:56:23.000Z","dependencies_parsed_at":"2023-09-17T20:15:23.709Z","dependency_job_id":null,"html_url":"https://github.com/likecoin/likecoin-poc","commit_stats":{"total_commits":55,"total_committers":2,"mean_commits":27.5,"dds":"0.054545454545454564","last_synced_commit":"a18b107a0c8cd799bd62c1117f1120249c56893e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/likecoin%2Flikecoin-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/likecoin%2Flikecoin-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/likecoin%2Flikecoin-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/likecoin%2Flikecoin-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/likecoin","download_url":"https://codeload.github.com/likecoin/likecoin-poc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247779796,"owners_count":20994569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ethjs","ipfs","nodejs"],"created_at":"2024-11-06T08:05:26.878Z","updated_at":"2025-04-08T04:33:44.451Z","avatar_url":"https://github.com/likecoin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Meme Generator\n\n[![NSP Status](https://nodesecurity.io/orgs/likecoin/projects/a5bea3a5-795d-47a3-9059-c5c9c313e1d3/badge)](https://nodesecurity.io/orgs/likecoin/projects/a5bea3a5-795d-47a3-9059-c5c9c313e1d3)\n\na proof of concept of LikeCoin content footprint\n\n## Live Demo\nhttps://meme.like.community\n\n## Quick startup\n- Prepare a ethereum wallet in rinkeby testnet, [make sure you have eth for running smart contracts](https://faucet.rinkeby.io/)\n- Replace `address` and `privateKey` field in [config/accounts.js](./config/accounts.js)\n- Run `docker-compose up -d`.\nIt will create a [ipfs container](https://hub.docker.com/r/ipfs/go-ipfs/), a [nginx container](https://hub.docker.com/_/nginx/) and build the `like-server` container.\nThe `like-server` container contains the production build of the [frontend](https://github.com/lakoo/like-poc-web) and the nodejs api server.\n\n## How it works\n### `/upload`\nPOST endpoint for uploading new image file with metadata\n- The image fingerprint is generated by puting the uploaded image into `sha256()` function.\n- The image is then added to local ipfs by `ipfs.add()`, yielding its ipfs address.\n- The fingerprint, ipfs address and other metadata are then written to the smart contract by calling `ethjs-signer` and `sendRawTransaction`.\n- The result eth transaction hash is then sent back to frontend for tracking.\n\n### `/query/:key`\nGET endpoint for query metadata given its fingerprint\n- Using `ethjs-contract`, we call `likeContract.get()` with the input key(fingerprint) as the param.\n- The result in array format is converted into key-value mapping, then returned to frontend.\n\n### `/meme/:key`\nPOST endpoint for creating meme image base on another existing image with fingerprint\n- Similar to query, `likeContract.get()` is called to extract metadata from the fingerprint.\n- The actual image data is retrieved by calling `ipfs.cat()` with the ipfs address stored in metadata.\n- The image data is then pass to `imageMagick` for annotating text.\n- The result of `imageMagick` is then pass to `sha256()` and `ipfs.add()` again for yielding fingerprint and ipfs address.\n- The new fingerprint and ipfs address, together with the parent fingerprint contained in the metadata is written into smart contract by `sendRawTransaction()`.\n- The result eth transaction hash is then sent back to frontend for tracking.\n\n## Smart contract used\n[like-media-contracts-poc](https://github.com/lakoo/like-media-contracts-poc)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flikecoin%2Flikecoin-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flikecoin%2Flikecoin-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flikecoin%2Flikecoin-poc/lists"}