GithubHelp home page GithubHelp logo

ankushkun / gitar Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 506 KB

Arweave project contribution reward platform

Home Page: https://gitar_ankushkun.g8way.io

License: GNU General Public License v3.0

JavaScript 23.63% HTML 0.78% TypeScript 74.12% CSS 1.48%
arweave bounty permaweb hackerhouse

gitar's Introduction

GitAR ๐ŸŽธ

About

Got a product? ๐Ÿค”
Need something to be fixed or a new feature to be added?
A blog to be written? or any contribution towards your product?

Now you can setup bounties for people and reward them with AR or Atomic Assets for their contributions ๐Ÿคฉ

This would encourage newcomers and more developers to contribute to the Arweave ecosystem in both code and non code forms yay!

Setup and Installation

Requirements

  • NodeJS LTS
  • An Arweave Wallet (better if funded)
  • ARNS test tokens in you want to deploy to your own ARNS subdomain

Installation

  1. Fork the repository

  2. Clone the repository

git clone https://github.com/<YOUR_USERNAME>/GitAR.git
  1. Install dependencies
cd GitAR
npm install
  1. Create a .env file
cp .env.dev .env
  1. Edit the .env file and add the variables

ARdrive setup

Install the ardrive-cli globally

npm i -g ardrive-cli

Generate seedphrase and wallet through which we will create the drive and folder and upload our files

ardrive generate-seedphrase
export SEED="<SEED>" # Output from previous command
ardrive generate-wallet -s "${SEED}" > wallet.json

Using the --turbo flag will allow us to upload files upto 500kb for free

ardrive create-drive -w wallet.json -n apps --turbo

Copy Drive entity id and root folder entity id from the output of above command and add them to the .env file

ardrive create-folder -w wallet.json -n "gitar" -F "<ROOT_FOLDER_EID>" --turbo

Copy the gitar folder entity id from the output of above command and add it to the .env file

also run export GITAR_FOLDER_EID=<Gitar folder entity id> to set the environment variable

After this the uploading process will be taken care by the deploy.js script, make sure to update the ANT TOKEN ADDRESS and SUBDOMAIN if required.

Github actions will automatically run the deploy script and upload the files to arweave on every push.

Manual deployment

npm run build
cd ./dist
ardrive upload-file -s "${SEED}" -l ./ -F ${GITAR_FOLDER_EID} --turbo
ardrive create-manifest -s "${SEED}" -f ${GITAR_FOLDER_EID} --turbo --dry-run > out.json
  • Open out.json and keep the manifest section and remove the rest of the contents
  • set index.path to "index.html"
  • Find and replace all occurrences of ./ with and empty string to avoid relative paths
Before
{
   "manifest": "arweave/paths",
   "version": "0.1.0",
   "index": {
      "path": "./404.html"
   },
   "paths": {
      "./404.html": {
         "id": "j-0gtXjXZoql1skhD3HNUbCn6ze-VnXYIt6x0Gajtow"
      },
      "./assets/index-c5b8b06a.css": {
          "id": "mY6nU2zuzMdDMADKybWkXb8WgJt-qdzi_lRH3O1Vxcg"
      },
      "./assets/wallet-f1ba16a9.svg": {
          "id": "6YXrOjpwqdHdTxUm1dd3MmBVFyXGs-b_gkb52K7GSPE"
      },
      "./index.html": {
          "id": "vNCT5Gv9YgC8TL6viN_t6zsDrR5Zdhoyp1AfQIuekUY"
      }
   }
}
After
{
   "manifest": "arweave/paths",
   "version": "0.1.0",
   "index": {
      "path": "index.html"
   },
   "paths": {
      "404.html": {
         "id": "j-0gtXjXZoql1skhD3HNUbCn6ze-VnXYIt6x0Gajtow"
      },
      "assets/index-c5b8b06a.css": {
          "id": "mY6nU2zuzMdDMADKybWkXb8WgJt-qdzi_lRH3O1Vxcg"
      },
      "assets/wallet-f1ba16a9.svg": {
          "id": "6YXrOjpwqdHdTxUm1dd3MmBVFyXGs-b_gkb52K7GSPE"
      },
      "index.html": {
          "id": "vNCT5Gv9YgC8TL6viN_t6zsDrR5Zdhoyp1AfQIuekUY"
      }
   }
}
ardrive upload-file -s "${SEED}" -l ./manifest.json --content-type application/x.arweave-manifest+json -F ${GITAR_FOLDER_EID} --turbo > ../out.json

Check out.json for a field called dataTxId, your website is now live at https://arweave.net/<dataTxId> ๐Ÿฅณ

This dataTxId can be used to register a custom subdomain on Permapages ARNS

Once you get ARNS Test tokens and register a subdomain, you can check the transaction history to get your ANT Contract Address

SmartWeave Contract

The smartweave contract is located in the contract folder.

To deploy the contract, run the following command

node contract/deploy.js

This will store the contract address in the deployment.json file.

License

This project is licensed under the GNU GPL v3.0 License - see the LICENSE file for details

Contributing

Feel free to open issues and pull requests. Both code and non code contributions are welcome ๐Ÿ˜Š

If you need any assistance feel free to email me or ping me on Discord @ankushkun

gitar's People

Contributors

ankushkun avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

gitar's Issues

Write a blog post about GitAR

Write a blog post about GitAR

This is a sample issue to be displayed on the GitAR platform

We need to write a blog post about GitAR and publish it on the permaweb.
The blog post should be about 500 words and should include the following topics:

  1. What is GitAR?
  2. How to use GitAR?
  3. How can it help arweave thrive?

Deploy on permaweb and setup Github Actions

Deploy on permaweb and setup Github Actions

This is an example issue created to be displayed on GitAR platform

The project is currently hosted on Github Pages. We need to deploy it on permaweb and setup Github Actions for automatic deployment on every push to the main branch

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.