Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
505f6d9
-
kumawatkaran523 Jun 4, 2025
5a178ba
removed env
kumawatkaran523 Jun 9, 2025
61894ff
removed chainlink
kumawatkaran523 Jun 9, 2025
a6c2fac
removed chainlink
kumawatkaran523 Jun 9, 2025
3231f30
added env-copy
kumawatkaran523 Jun 9, 2025
8a05a03
removed unecessary folder
kumawatkaran523 Jun 9, 2025
91c1925
changed app.jsx
kumawatkaran523 Jun 9, 2025
86982f7
readme update
kumawatkaran523 Jun 9, 2025
e7c3f41
readme update
kumawatkaran523 Jun 9, 2025
77f3b14
updated contract
kumawatkaran523 Jun 16, 2025
3c9220a
updated UI and contract ABI
kumawatkaran523 Jun 16, 2025
1b7aecd
refactor: optimize Lit client init and invoice fetch
kumawatkaran523 Jul 3, 2025
ce51cbe
update readme
kumawatkaran523 Jul 3, 2025
e412537
updated contract
kumawatkaran523 Jul 3, 2025
54fefc3
removed calculation error
kumawatkaran523 Jul 3, 2025
3aa274f
removed calculation error
kumawatkaran523 Jul 3, 2025
4bc2776
correct typo
kumawatkaran523 Jul 3, 2025
ab1bafc
Security concern: Insufficient access control validation
kumawatkaran523 Jul 3, 2025
673ffa1
Updated dashboard,treasury account and routes
kumawatkaran523 Jul 4, 2025
4cd4795
correct some error
kumawatkaran523 Jul 5, 2025
86c54ef
Merge branch 'main' into main
kumawatkaran523 Jul 5, 2025
a54324c
added mobile menu
kumawatkaran523 Jul 8, 2025
538e82c
added erc20 token,updated contract,erc20abi,frontend
kumawatkaran523 Jul 10, 2025
1ce69bb
updated contract
kumawatkaran523 Jul 10, 2025
e390b0f
added erc20 logic
kumawatkaran523 Jul 12, 2025
c98624e
update ui
kumawatkaran523 Jul 12, 2025
99defe6
treasure fee set
kumawatkaran523 Jul 13, 2025
545031b
contract update with cancel property
kumawatkaran523 Aug 14, 2025
e46a4f3
frontend update with cancel property
kumawatkaran523 Aug 14, 2025
9a5ae47
frontend update with cancel property
kumawatkaran523 Aug 14, 2025
7717396
file conflict resolve
kumawatkaran523 Aug 14, 2025
c43085e
-
kumawatkaran523 Aug 14, 2025
363b696
-
kumawatkaran523 Aug 14, 2025
bfc9f7a
prefilled url feature open
kumawatkaran523 Aug 21, 2025
2670801
prefilled url feature complete
kumawatkaran523 Aug 22, 2025
dffd379
conftlict resolve
kumawatkaran523 Aug 22, 2025
8d67011
conftlict resolve
kumawatkaran523 Aug 22, 2025
ed7d128
Merge branch 'main' of https://github.com/StabilityNexus/Chainvoice
kumawatkaran523 Aug 26, 2025
622f85b
token selector improvement
kumawatkaran523 Aug 26, 2025
3917838
token selector improvement
kumawatkaran523 Aug 26, 2025
10ef878
token selector improvement
kumawatkaran523 Aug 26, 2025
86109c0
Update README with stability standard
kumawatkaran523 Sep 1, 2025
7754f2b
Update README with stability standard
kumawatkaran523 Sep 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
232 changes: 159 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,90 +1,176 @@
<!-- Don't delete it -->
<div name="readme-top"></div>

<!-- Logos -->
<p align="center">
<img alt="Stability Nexus" src="frontend/public/nexus.png" width="140">
&nbsp;&nbsp;&nbsp;&nbsp;
<img alt="Chainvoice" src="frontend/public/logo.png" width="140">
</p>

<p align="center">
<a href="#"><img alt="Stability Nexus · Chainvoice" src="https://img.shields.io/badge/Stability_Nexus-Chainvoice-228B22?style=for-the-badge&labelColor=FFC517"></a>
</p>

<p align="center">
<a href="https://t.me/StabilityNexus"><img src="https://img.shields.io/badge/Telegram-24A1DE?style=flat&logo=telegram&logoColor=white" alt="Telegram"></a>
&nbsp;
<a href="https://x.com/StabilityNexus"><img src="https://img.shields.io/twitter/follow/StabilityNexus" alt="X (Twitter)"></a>
&nbsp;
<a href="https://discord.gg/YzDKeEfWtS"><img src="https://img.shields.io/discord/995968619034984528?style=flat&logo=discord&logoColor=white&label=Discord&labelColor=5865F2&color=57F287" alt="Discord"></a>
&nbsp;
<a href="https://news.stability.nexus/"><img src="https://img.shields.io/badge/Medium-white?style=flat&logo=medium&logoColor=black" alt="Medium"></a>
&nbsp;
<a href="https://linkedin.com/company/stability-nexus"><img src="https://img.shields.io/badge/LinkedIn-0A66C2?style=flat&logo=linkedin&logoColor=white" alt="LinkedIn"></a>
&nbsp;
<a href="https://www.youtube.com/@StabilityNexus"><img src="https://img.shields.io/youtube/channel/subscribers/UCZOG4YhFQdlGaLugr_e5BKw?style=flat&logo=youtube&logoColor=white&labelColor=FF0000&color=FF0000" alt="YouTube"></a>
</p>

---

# Chainvoice

Chainvoice is a decentralized invoice management system built on blockchain technology. It offers a secure, transparent, and tamper-proof platform for creating, managing, and paying invoices. Leveraging Ethereum smart contracts, Chainvoice ensures trust, automation, and eliminates the need for intermediaries in financial transactions.
Chainvoice is a decentralized invoicing platform that enables secure, transparent, and tamper‑proof invoice creation, management, and payments on blockchain. Powered by Ethereum-compatible smart contracts, Chainvoice automates payment flows and reduces reliance on intermediaries.

## Table of Contents

- [Overview](#overview)
- [Features](#features)
- [Project Structure](#project-structure)
- [Getting Started](#getting-started)
- [Frontend Setup](#frontend-setup)
- [Smart Contract Testing](#smart-contract-testing)
- [Deploy to Ethereum Classic](#deploy-to-ethereum-classic)
- [Environment Variables](#environment-variables)
- [Community and Support](#community-and-support)

## Overview

Chainvoice transforms traditional invoicing by leveraging blockchain technology to create a trustless, automated payment system. Users can create invoices, manage payments, and track transaction history with complete transparency and security.

## Features

- **Decentralized Invoice Creation** - Create and manage invoices on-chain
- **Multi-Token Support** - Pay using native currency or ERC-20 tokens
- **Immutable Records** - Verifiable transaction history and status tracking
- **Treasury Management** - Built-in fee management for platform sustainability
- **Privacy Protection** - Encrypted invoice data with access control
- **User-Friendly Interface** - Intuitive web application with wallet integration

## Project Structure

Chainvoice/
├── frontend/ # Web application (UI/UX, wallet integration)
├── contracts/ # Solidity smart contracts (core invoicing logic)
├── docs/ # Documentation and guides
└── README.md # This file

## Getting Started

1. Fork the Repository
2. Clone the forked repository to your local machine:
```bash
git clone https://github.com/yourusername/Chainvoice.git
```
3. Project Structure
The repository contains two main folders:
1. **Fork the repository**
2. **Clone your fork**

- frontend: The user interface of the application.
- contracts: The smart contracts powering the backend logic.
git clone https://github.com/yourusername/Chainvoice.git
cd Chainvoice

## Frontend Setup

1. Navigate to the frontend folder:
```bash
1. **Navigate to frontend directory**
cd frontend
```
2. Install the dependencies::
```bash

2. **Install dependencies**
npm install
```
3. Start the development server::
```bash


3. **Start development server**
npm run dev
```
4. Open the app in your browser at http://localhost:5173.


4. **Open application**
Navigate to `http://localhost:5173` in your browser

## Smart Contract Testing

1. Navigate to the contracts folder:
```bash
> **Prerequisites:** [Foundry](https://getfoundry.sh/) must be installed
1. **Navigate to contracts directory**
cd contracts
```
2. Install dependencies using Foundry:
```bash
forge install
```
3. Run tests
```bash

3. **Run test suite**
forge test
```
## Deploying to Ethereum Classic (ETC) with Foundry

This guide explains how to deploy Chainvoice smart contracts to the Ethereum Classic Mainnet using Foundry (Forge).

Prerequisites
- Foundry installed
- A funded wallet with ETC
- RPC URL (e.g. from Rivet, Ankr, or Chainstack)

1. Create .env File for Secrets

- Create a .env in your project root i.e. `contracts/`
- Copy all the varible from `contracts/.env.example` to newly created `.env`

`cp .env.example .env`
- Assign valid values to the variable.

2. Compile Contract

`forge build`
3. Load your .env in the terminal

`source .env`
4. Deploy the Contract using forge create

```
forge create contracts/src/Chainvoice.sol:Chainvoice \
--rpc-url $ETC_RPC_URL \
--private-key $PRIVATE_KEY \
--broadcast
```
5. Finally add Contract Address to Frontend `.env`
- Create a new .env file by copying .env.example:

`cp frontend/.env.example frontend/.env`
- Open the new .env file and update the variables, especially:
`VITE_CONTRACT_ADDRESS=your_deployed_contract_address_here`

Replace your_deployed_contract_address_here with the actual contract address you got after deployment.

- Save the .env file.

- Restart your frontend development server so the new environment variables are loaded.

4. **Run tests with verbosity (optional)**
forge test -vvv


## Deploy to Ethereum Classic

### Prerequisites
- [Foundry](https://getfoundry.sh/) installed
- Wallet funded with ETC
- ETC RPC URL (e.g., Rivet, Ankr, Chainstack)

### Deployment Steps

1. **Configure environment variables**
cp contracts/.env.example contracts/.env
Edit contracts/.env with your actual values

2. **Compile contracts**
cd contracts
forge build

3. **Load environment variables**
source .env

4. **Deploy to Ethereum Classic**
forge create contracts/src/Chainvoice.sol:Chainvoice
--rpc-url $ETC_RPC_URL
--private-key $PRIVATE_KEY
--broadcast


5. **Configure frontend**
cp frontend/.env.example frontend/.env
Edit frontend/.env and set:
VITE_CONTRACT_ADDRESS=your_deployed_contract_address_here

6. **Restart frontend development server**
cd frontend
npm run dev

## Environment Variables

### Frontend Configuration (`frontend/.env`)
VITE_CONTRACT_ADDRESS=your_deployed_contract_address_here
VITE_CHAIN_ID=61
VITE_RPC_URL=your_etc_rpc_url_here

### Contracts Configuration (`contracts/.env`)
PRIVATE_KEY=your_private_key_here
ETC_RPC_URL=your_etc_rpc_endpoint_here
ETHERSCAN_API_KEY=your_etherscan_api_key_here

> ⚠️ **Security Note:** Never commit `.env` files to version control. Keep your private keys secure.
## Community and Support

Join our community for support, updates, and discussions:

- **Telegram** - [t.me/StabilityNexus](https://t.me/StabilityNexus)
- **Discord** - [discord.gg/YzDKeEfWtS](https://discord.gg/YzDKeEfWtS)
- **X (Twitter)** - [@StabilityNexus](https://x.com/StabilityNexus)
- **Medium** - [news.stability.nexus](https://news.stability.nexus)
- **LinkedIn** - [linkedin.com/company/stability-nexus](https://linkedin.com/company/stability-nexus)
- **YouTube** - [youtube.com/@StabilityNexus](https://www.youtube.com/@StabilityNexus)

## Contributing

We welcome contributions! Please read our contributing guidelines and submit pull requests for any improvements.


<p align="center">
<strong>Built with ❤️ by Stability Nexus</strong>
</p>

<p align="right">(<a href="#readme-top">back to top</a>)</p>
8 changes: 6 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@
"@lit-protocol/lit-node-client": "^7.2.0",
"@mui/icons-material": "^6.4.6",
"@mui/material": "^6.4.6",
"@radix-ui/react-avatar": "^1.1.10",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-label": "^2.1.1",
"@radix-ui/react-popover": "^1.1.5",
"@radix-ui/react-select": "^2.2.5",
"@radix-ui/react-slot": "^1.1.1",
"@radix-ui/react-separator": "^1.1.7",
"@radix-ui/react-slot": "^1.2.3",
"@rainbow-me/rainbowkit": "^2.2.2",
"@tanstack/react-query": "^5.64.1",
"class-variance-authority": "^0.7.1",
Expand All @@ -31,7 +34,7 @@
"eth-crypto": "^2.7.0",
"ethereum-unit-converter": "^0.0.17",
"ethers": "^6.13.5",
"framer-motion": "^12.23.0",
"framer-motion": "^12.23.12",
"html2canvas": "^1.4.1",
"jspdf": "^3.0.0",
"lucide-react": "^0.471.1",
Expand All @@ -44,6 +47,7 @@
"react-router-dom": "^7.1.1",
"react-to-print": "^3.0.5",
"react-toastify": "^11.0.5",
"react-window": "^1.8.11",
"tailwind-merge": "^2.6.0",
"tailwindcss-animate": "^1.0.7",
"viem": "^2.22.9",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/TokenCrousel.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useRef } from "react";
import { motion } from "framer-motion";
import { SiEthereum } from "react-icons/si";
import { TOKEN_PRESETS } from "@/utils/erc20_token";
// import { TOKEN_PRESETS } from "@/utils/erc20_token";

const TokenCarousel = () => {
const carouselRef = useRef();
Expand Down
Loading