Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #7039

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
91 changes: 61 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,79 @@
# OpenChat
# 🌟 **OpenChat: Your Decentralized Chat Solution** 🌟

https://oc.app
🔗 **[Visit OpenChat](https://oc.app)**

OpenChat is a fully featured chat application running end-to-end on the Internet Computer blockchain.
OpenChat is a fully-featured chat platform, running **end-to-end on the Internet Computer blockchain**. 🌐 Experience secure, scalable, and decentralized communication like never before. 🚀

## Prerequisites

#### DFX 0.23.0

To install, run `DFX_VERSION=0.23.0 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"`

#### Rust

To install, run `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`

#### NPM

Download from https://nodejs.org/en/download
---

## Testing locally
## **Prerequisites 🛠️**

Start DFX using `dfx start`
### 1️⃣ **DFX 0.23.0**
Install using:
```bash
DFX_VERSION=0.23.0 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
```

To install all the necessary canisters (OpenChat and NNS) run `./scripts/deploy-local.sh`
### 2️⃣ **Rust**
Install with a single command:
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

To run the website run `npm --prefix frontend run dev`
### 3️⃣ **NPM**
Download Node.js from: [Node.js Official Website](https://nodejs.org/en/download)

To upgrade a canister run `./scripts/upgrade-canister-local.sh <DFX_IDENTITY_NAME> <CANISTER_NAME> <VERSION>` (eg. `./scripts/upgrade-canister-local.sh default user 1.0.0`)
---

To start again with a fresh install, stop DFX, then run `rm -rf .dfx`, then start from the top of these instructions again.
## **Testing Locally 🚀**

1️⃣ **Start DFX**
```bash
dfx start
```

2️⃣ **Deploy All Canisters (OpenChat + NNS)**
```bash
./scripts/deploy-local.sh
```

3️⃣ **Run the Frontend Website**
```bash
npm --prefix frontend run dev
```

4️⃣ **Upgrade Canisters (Example)**
```bash
./scripts/upgrade-canister-local.sh <DFX_IDENTITY_NAME> <CANISTER_NAME> <VERSION>
# Example: ./scripts/upgrade-canister-local.sh default user 1.0.0
```

5️⃣ **Fresh Start (Optional)**
- Stop DFX.
- Remove all previous configurations:
```bash
rm -rf .dfx
```
- Start again from step 1.

## Deterministic builds
---

We need builds to be deterministic so that code running inside a canister can be verified by comparing the
wasm hash locally with the wasm hash exposed by the IC.
## **Deterministic Builds 🔒**

You can build the OpenChat canister wasms by running `./scripts/docker-build-all-wasms.sh`
Ensure **verifiable and secure builds**:
- Build the OpenChat canister WASMs:
```bash
./scripts/docker-build-all-wasms.sh
```
- Verify by comparing local WASM hashes with those exposed on the Internet Computer.

## License
---

Copyright 2024 OpenChat Labs LTD
## **License 📜**

Licensed under the AGPLv3: https://www.gnu.org/licenses/agpl-3.0.html
© 2024 OpenChat Labs LTD
Licensed under **[AGPLv3](https://www.gnu.org/licenses/agpl-3.0.html)**

---

*Our tests run fast and cheap via [RunsOn](https://runs-on.com)*
💡 *Our tests run **fast** and **efficiently** with [RunsOn](https://runs-on.com).*