|
1 | | -## Foundry |
| 1 | +# ChatChain |
| 2 | +**The Messenger Where Groups Govern Themselves** |
2 | 3 |
|
3 | | -**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.** |
| 4 | +### 💬 **WhatsApp Meets Blockchain** |
| 5 | +ChatChain is a secure messaging app with a revolutionary twist: **decentralized group governance**. Enjoy real-time P2P chats with blockchain-verified transparency, where every member has a voice in group decisions. |
4 | 6 |
|
5 | | -Foundry consists of: |
| 7 | +--- |
6 | 8 |
|
7 | | -- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools). |
8 | | -- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data. |
9 | | -- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network. |
10 | | -- **Chisel**: Fast, utilitarian, and verbose solidity REPL. |
| 9 | +## Key Features |
11 | 10 |
|
12 | | -## Documentation |
| 11 | +### 🏛️ **DAO-Powered Group Chats** |
| 12 | +**No More Admin Tyranny** – Groups run democratically: |
| 13 | +- **Add/Remove Members** via voting (e.g., "Should we add Bob?") |
| 14 | +- **Change Group Settings** with proposals (e.g., "Set 24h vote duration") |
| 15 | +- **Transparent Voting** recorded on Polygon blockchain |
| 16 | +- **Custom Rules** per group (quorums, approval thresholds) |
13 | 17 |
|
14 | | -https://book.getfoundry.sh/ |
| 18 | +**Example Workflow:** |
| 19 | +1. Alice proposes adding Bob to "Family Group" |
| 20 | +2. Members vote via chat buttons (✅/❌) within 24h |
| 21 | +3. Smart contract auto-adds Bob if 60% vote "Yes" |
15 | 22 |
|
16 | | -## Usage |
| 23 | +### 🔒 **Military-Grade Security** |
| 24 | +- **End-to-End Encryption** (Signal Protocol) |
| 25 | +- **Biometric Wallet Login** – No passwords, just your face/fingerprint |
| 26 | +- **Blockchain-Verified Integrity** – Every message hash stored on Polygon |
| 27 | +- **Optional IPFS Backup** – Encrypted and decentralized |
17 | 28 |
|
18 | | -### Build |
| 29 | +### ⚡ **Real-Time Hybrid Messaging** |
| 30 | +```mermaid |
| 31 | +graph TB |
| 32 | +A[User A] -->|Encrypt| B(Signal Protocol) |
| 33 | +B -->|Hash & Store| C[Polygon Blockchain] |
| 34 | +B -->|Send| D[P2P Network] |
| 35 | +D -->|Decrypt| E[User B] |
| 36 | +C -->|Optional| F[IPFS Backup] |
| 37 | +``` |
| 38 | +1. Messages encrypted **before leaving your device** |
| 39 | +2. Hashes stored on-chain for **tamper-proof verification** |
| 40 | +3. Delivered via **blazing-fast P2P/WebSocket** |
19 | 41 |
|
20 | | -```shell |
21 | | -$ forge build |
22 | | -``` |
| 42 | +--- |
23 | 43 |
|
24 | | -### Test |
| 44 | +## 🌍 **Why ChatChain?** |
| 45 | +| Traditional Apps | ChatChain | |
| 46 | +|-----------------|-----------| |
| 47 | +| ❌ Admins have absolute power | ✅ Democratic group governance | |
| 48 | +| ❌ Closed-source encryption | ✅ Proven Signal Protocol + blockchain checks | |
| 49 | +| ❌ No audit trails | ✅ Every vote/message hash recorded on Polygon | |
25 | 50 |
|
26 | | -```shell |
27 | | -$ forge test |
28 | | -``` |
| 51 | +**Perfect for:** |
| 52 | +- Families deciding on new members |
| 53 | +- DAOs coordinating in real-time |
| 54 | +- Communities with transparent governance |
29 | 55 |
|
30 | | -### Format |
| 56 | +--- |
31 | 57 |
|
32 | | -```shell |
33 | | -$ forge fmt |
34 | | -``` |
| 58 | +## License |
| 59 | +MIT License - Free to use, modify, and distribute. |
35 | 60 |
|
36 | | -### Gas Snapshots |
| 61 | +**Ready to democratize your chats?** [Get Started](#) |
37 | 62 |
|
38 | | -```shell |
39 | | -$ forge snapshot |
40 | | -``` |
| 63 | +--- |
41 | 64 |
|
42 | | -### Anvil |
43 | 65 |
|
44 | | -```shell |
45 | | -$ anvil |
46 | | -``` |
47 | | - |
48 | | -### Deploy |
49 | | - |
50 | | -```shell |
51 | | -$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key> |
52 | | -``` |
53 | | - |
54 | | -### Cast |
55 | | - |
56 | | -```shell |
57 | | -$ cast <subcommand> |
58 | | -``` |
59 | | - |
60 | | -### Help |
61 | | - |
62 | | -```shell |
63 | | -$ forge --help |
64 | | -$ anvil --help |
65 | | -$ cast --help |
66 | | -``` |
0 commit comments