NITYA - Arweave Deployment Protocol
NITYA is a tool for permanently deploying web applications and onboarding users to the decentralized Arweave network. This README provides step-by-step instructions to set up and deploy your project using NITYA, including details on pool-based deployments for larger files.
Find Nitya website at https://nitya_enginesoup.ar.io/
Prerequisites
- Node.js and npm: Ensure Node.js (v14 or higher) and npm are installed.
- Git: Required for version control and automatic deployment setup. (Files up to 100KB can skip this step)
- Arweave Wallet: Install the Wander wallet extension for Arweave or prepare an Ethereum/Polygon private key.
Installation
Step-by-Step Setup and Deployment
Step 1: Connect Your Wallet
Step 2: Configure Your Project
Step 3: Initialize Your Project
Step 4: Fund and Grant Controller Access
-
Paste Project Wallet Address:
- In the NITYA interface, under "Wallet Operations," paste the project wallet address and click Set Project Wallet.
-
Top Up Project Wallet (for files >100KB with direct upload):
- Click Top Up Project Wallet to transfer 0.1 AR from your connected wallet to the project wallet. This is required for direct uploads of folders larger than 100KB.
- Confirm the transaction in your Wander wallet.
-
Grant Controller Access (if using ARNS):
- Select an ANT process from the dropdown (if not already selected).
- Click Grant Controller Access to allow the project wallet to manage the selected ARNS name.
- Confirm the transaction in your Wander wallet.
Step 5: Deploy Your Project
Automatic Deployment (Optional)
If you enabled Auto Deploy during initialization:
- A git
post-commit hook is created in .git/hooks/post-commit.
- Every git commit on the specified branch (e.g.,
main) will automatically run npm run build-and-deploy, prompting for pool selection if the folder exceeds 100KB.
Pool-Based Deployments
Pool-based deployments are designed for folders larger than 100KB, allowing uploads via a sponsor server to reduce wallet funding requirements. Here's how it works:
- When Triggered: If the deploy folder exceeds 100KB, the terminal prompts:
Folder size exceeds 100KB. Do you want to use the sponsor pool for deployment? (y/n):.
- Pool Selection:
- Choose
y to use a sponsor pool, then select:
1 for Community Pool (no credentials needed).
2 for Event Pool (requires pool name and password).
- Community pools are simpler, while event pools are for specific events with restricted access.
- Process:
- The deploy folder is zipped into
deploy.zip.
- The zip file, pool type, and (for event pools) credentials are sent to the sponsor server (
http://localhost:3000/upload) with an API key (deploy-api-key-123).
- The server handles the Arweave upload and returns a
manifestId.
- The temporary zip file is deleted.
- Requirements:
- A sponsor wallet must be configured at
~/.nitya/sponsor/config.json (set up via nitya-setup).
- The sponsor server must be running and accessible.
- Benefits: Reduces the need for AR funding in the project wallet, making large deployments more accessible.
- Limitations:
- Requires a running sponsor server (default: localhost).
- Event pool deployments need valid credentials, validated by the server.
- No real-time upload progress feedback for sponsor pool uploads.
Troubleshooting
Additional Notes
- Wallet Funding: For Arweave wallets, fund the project wallet with AR or Turbo credits via the NITYA interface or manually. Sponsor pools minimize this need for large files.
- Sponsor Pools: Community pools are ideal for general use, while event pools are suited for specific, credential-protected deployments.
- Configuration Storage: The
.perma-deploy/config.json file stores your project settings. Do not commit sensitive data (e.g., wallet files) to version control.
- Support: Refer to the "Need Help? Setup Guide" in the NITYA interface for visual instructions.
Example Commands
npx perma-init --project-name "my-project" --build "npm run build" --branch "main" --deploy-folder "dist" --auto-deploy
<<<<<<< HEAD
This project is licensed under the GNU Affero General Public License v3.0
## Acknowledgements
- Built with Arweave and AR.IO.
- Uses @ardrive/turbo-sdk for uploads and @ar.io/sdk for ARNS management.
- Inspired by the need for simple permaweb deployment tools.
The link to curl -s https://raw.githubusercontent.com/Arpitpassi/permadeploysetupsh/main/perma.sh | bash
=======
# Deploy project
npm perma-deploy
refs/remotes/origin/main