Skip to content

๐Ÿ”ฅThe bold new archive that canโ€™t be burned, bulldozed or battering-rammed #PoweredByArweave

License

Notifications You must be signed in to change notification settings

mccallofthewild/alexandrias-revenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

54 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Alexandria's Revenge Logo

Permanent Storage for Curated Knowledge

https://alexandriasrevenge.herokuapp.com/

๐Ÿ‡ช๐Ÿ‡ฌ Inspiration

The Great Library of Alexandria in Alexandria, Egypt, was one of the largest and most significant libraries of the ancient world. Over time, however, it dilapidated into nothing but ash and rubble.
The Internet is the Library of Alexandria of our era, yet we take for granted just how vulnerable it is. Even with solar flares, natural disasters, and DDoS attacks aside, valuable knowledge is removed from the internet every day. Servers don't run for free, after all. Archive.org does a lot of great work in this space, but it is dangerous for our civilization to be so dependent on a centralized source. Arweave poises an opportunity to decentralize, and thereby secure the greatest library of our time. The purpose of this project is to capture that opportunity.

๐ŸŠโ€โ™€๏ธ Product Deepdive

  • Documents
    • Extractor: Scans for useful text and article metadata
    • Processor: Intelligently discovers useful metrics which users will be able to search and filter with in the future
      • AFINN Sentiment Score: Generated by the industry-standard sentiment scoring algorithm (displayed in human-readable format)
      • Reading Time: Inspired by Medium's estimated read time feature, the article estimates the read time for a user reading 200 words per minute. This is useful when deciding if you have enough time to read an article.
  • Images
    • Embedding: Archive Images are downloaded and injected directly into HTML archive documents as base64 data URI's.
    • Permaweb: Article processor extracts the most important image, uploads it to the Permaweb, and saves the Permalink to the tag data
  • SEO
    • Archive Metadata
      • OpenGraph
      • JSON-LD
  • Wallet Management
    • Auto-Wallet: To enable one-step deployment (see below), wallets are dynamically generated, then encrypted with a password. Along with a secret identifier tag, the encrypted wallet is then sent to a peer Alexandria's Revenge node. The peer node donates its own AR tokens to permanently store the wallet on the Arweave network. Once the storage is complete, the wallet can be found by its secret identifier tag, downloaded from the Arweave network, and decrypted for use. Importantly, the stored wallet can not be traced back to its address.
    • Custom: By placing a wallet.json file in the root directory and setting a password, an custom wallet can be specified and securely uploaded to the server. (see below)

๐Ÿš€ Usage & Deployment

๐ŸŽ Fast Track

  1. See this button? Click it!
    ๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡

ย ย ย ย  Deploy to Heroku

  1. Configure your App name
  2. Scroll down and click Deploy App. Wait while Heroku builds the app.
  3. Click โ†—๏ธ View to open your new Alexandrias Revenge node.
  4. Wait ~1-30 minutes while your wallet is generated, encrypted, and permanently stored on the blockweave.
  5. Once your wallet is provisioned, reload the app. Your new wallet address appears at the top of the screen after Donate:.
  6. As is, this node will be able to download archived files. However, you will need to send some AR (Arweave tokens) to the address in order to archive new websites.
  7. ๐Ÿ๐Ÿ๐Ÿ๐Ÿ๐Ÿ๐Ÿ๐Ÿ๐Ÿ

๐Ÿ–ผ Client

If you only want to build an archive front-end, don't worry about setting up up a server. Simply send queries to https://alexandriasrevenge.herokuapp.com/graphql and you're good to go.
The production GraphQL Playground & Documentation (at /graphql) makes it a piece of cake! ๐ŸŽ‚๐Ÿฐ

โš™๏ธ Server

Requirements

  • A non-empty Arweave wallet
  • Node.js >=v10.1.0
  • NPM or Yarn
  • Git

Looking to spin up the backend? That's a piece of cake too.

โฌ‡๏ธ Clone the repository

git clone https://github.com/mccallofthewild/alexandrias-revenge.git

โฌ‡๏ธ Install the node_modules

yarn

or

npm i

๐Ÿ’ฐ Configure Wallet

  1. Move an Arweave JWK wallet into the root directory of the project.
  2. Name it wallet.json.
  3. Create a file named env.json. Fill it with:
{
	"WALLET_FILE_SECRET": "yourcomplexandcryptographicallysecurepassword"
}

WALLET_FILE_SECRET is used to encrypt your wallet when you deploy it to the server and push it to your git repository. Ensure that it is long, complex, random and secure. Both wallet.json and env.json are in .gitignore, and thereby will not be made public in git.

From the command line, run:

yarn dev

This simultaneously starts the development server and updates the encrypted wallet (wallet.json.enc) to be your Arweave wallet encrypted with your password.

๐Ÿจ Host

Publish to Heroku, or your host of choice. Set the following environment variables accordingly:

Name Value
NODE_ENV production
WALLET_FILE_SECRET yourcomplexandcryptographicallysecurepassword

About

๐Ÿ”ฅThe bold new archive that canโ€™t be burned, bulldozed or battering-rammed #PoweredByArweave

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published