npm.io
1.2.4 • Published 1 year agoCLI

nitya

Licence
—
Version
1.2.4
Deps
16
Size
132 kB
Vulns
0
Weekly
0
# šŸŽØ NityaV1 šŸš€ - Permanent Web Deployment Made Easy 

<br>
                              _.--""--._
                            .'          `.
                           /   O      O   \
                          |    \  ^^  /    |
                          \     `----'     /
                           `. _______ .'
                              //_____\\
                             (( ____ ))
                              `-----'

**Tagline:**  Effortlessly deploy your web apps to the Arweave permaweb.

<br>

[![NPM](https://img.shields.io/npm/v/nitya?style=for-the-badge)](https://www.npmjs.com/package/nitya)
[![GitHub license](https://img.shields.io/github/license/Arpitpassi/NityaV1?style=for-the-badge)](https://github.com/Arpitpassi/NityaV1/blob/main/LICENSE)
[![JavaScript](https://img.shields.io/badge/javascript-F7DF1E?style=for-the-badge&logo=javascript&logoColor=black)](https://www.javascript.com/)
[![Express.js](https://img.shields.io/badge/express.js-%23404d59.svg?style=for-the-badge&logo=express&logoColor=white)](https://expressjs.com/)
[![Redis](https://img.shields.io/badge/redis-%23DD0031.svg?style=for-the-badge&logo=redis&logoColor=white)](https://redis.io/)
[![AWS](https://img.shields.io/badge/Amazon%20Web%20Services-FF9900?style=for-the-badge&logo=amazonwebservices&logoColor=white)](https://aws.amazon.com/)


<br>

---

## 🌟 Feature Highlights ✨

*   **Seamless Wallet Integration:** Connect your Arweave (Wander) or Ethereum/Polygon wallet for easy deployment.
*   **Simplified Deployment Process:**  Deploy your application with intuitive commands.
*   **Automatic Deployment (Optional):** Set up automatic deployments on every git commit.
*   **Pool-Based Deployments (for large files):** Leverage sponsor pools to deploy large projects efficiently.  Minimizes AR funding requirements.
*   **ARNS Support:** Deploy to your own custom ARNS domain.
*   **Cross-Platform Compatibility:** Works seamlessly across various operating systems.
*   **Detailed Documentation and Support:** Comprehensive guides and resources available.

<br>

---

## šŸ› ļø Tech Stack šŸ“¦

| Technology     | Badge                                                                  |
|-----------------|-----------------------------------------------------------------------|
| Node.js        | [![Node.js](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white)](https://nodejs.org/) |
| Express.js     | [![Express.js](https://img.shields.io/badge/express.js-%23404d59.svg?style=for-the-badge&logo=express&logoColor=white)](https://expressjs.com/) |
| Redis          | [![Redis](https://img.shields.io/badge/redis-%23DD0031.svg?style=for-the-badge&logo=redis&logoColor=white)](https://redis.io/) |
| Arweave        | [![Arweave](https://img.shields.io/badge/Arweave-%2300a676.svg?style=for-the-badge&logo=arweave&logoColor=white)](https://www.arweave.org/) |
| AWS            | [![AWS](https://img.shields.io/badge/Amazon%20Web%20Services-FF9900?style=for-the-badge&logo=amazonwebservices&logoColor=white)](https://aws.amazon.com/) |
| Other Libraries |  [![Other Libraries](https://img.shields.io/badge/Other%20Libraries-Various-blue?style=for-the-badge)](https://github.com/Arpitpassi/NityaV1/blob/main/package.json) |


<br>

---

## šŸš€ Quick Start Guide ⚔

1.  **Installation:**

    ```bash
    npm install nitya@1.1.4
    ```

2.  **Initialization:**

    ```bash
    npx nitya init --project-name "my-project"  --build "npm run build" --deploy-folder "dist"
    ```

3.  **Deployment:**

    ```bash
    npm run build-and-deploy
    ```

<br>

---

## šŸ“– Detailed Usage šŸ“š

**(See detailed steps in the `Step-by-Step Setup and Deployment` section below)**

<br>

---

## šŸ—ļø Project Structure šŸ“

NityaV1/ ā”œā”€ā”€ bin/ │ ā”œā”€ā”€ nitya.js │ ā”œā”€ā”€ perma-deploy.js │ ā”œā”€ā”€ perma-init.js │ └── perma-begin.cjs ā”œā”€ā”€ website/ │ └── src/ │ └── index.js └── package.json


<br>

---

## šŸŽÆ API Documentation šŸ“–


| Method      | Endpoint              | Description                                       | Request Body   | Response Body |
|-------------|-----------------------|---------------------------------------------------|----------------|----------------|
| `POST`      | `/upload`             | Uploads a zipped project folder to Arweave.       | `formData`     | `{manifestId}` |
| `GET`       | `/status/:manifestId` | Retrieves the deployment status.                  |                | `{status}`     |
| `GET`      | `/arns`                | Retrieves available ARNS processes.                 |                | `[{processId, name}]`|


**Example using `axios`:**

```javascript
const axios = require('axios');

axios.post('/upload', formData, {
  headers: {
    'Content-Type': 'multipart/form-data'
  }
})
.then(response => {
  console.log('Deployment successful:', response.data.manifestId);
})
.catch(error => {
  console.error('Deployment failed:', error);
});


Configuration Options

Option Description Default Value
project-name Name of the project Current directory name
build Build command npm run build
install Install command npm install
branch Git branch to deploy main
deploy-folder Folder containing built assets dist
auto-deploy Enable automatic deployment on git commits false
ant-process ANT process ID (for ARNS)
arns ARNS name (for ARNS)
undername ARNS undername (for ARNS)
sponsor-wallet-address Sponsor wallet address (for pool deployments)


Screenshots/Demo

(Include screenshots/gifs here showcasing the NityaV1 interface and deployment process.)



Contributing Guidelines

  1. Fork the repository.
  2. Create a new branch.
  3. Make your changes.
  4. Test your changes thoroughly.
  5. Submit a pull request.


License and Acknowledgments

This project is licensed under the MIT License. We thank the Arweave and AR.IO communities for their support.



Contributors

(Add contributor avatars and links here)



Support and Contact

Twitter Email



Frequently Asked Questions (FAQ)

Q: What is Arweave?

A: Arweave is a decentralized storage network that allows you to permanently store data on the blockchain.

Q: How does NityaV1 work with Arweave?

A: NityaV1 simplifies the process of deploying your web application to Arweave's permanent storage, handling the technical complexities for you.

Q: Do I need to pay for using NityaV1?

A: NityaV1 itself is free to use. However, you will need to pay for Arweave storage fees (AR tokens) to store your application's data. Pool deployments minimize the AR required, but you still need AR tokens for direct uploads of large projects.

Q: What if I encounter an error during deployment?

A: Please refer to the Troubleshooting section of this README or contact us for assistance.



Roadmap

  • Implement support for more wallet types.
  • Add more advanced deployment options.
  • Improve error handling and logging.
  • Expand documentation and tutorials.
  • Initial Release