Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
dinkar-jain committed Dec 21, 2023
2 parents 5ee5614 + f4ad91c commit bafeaef
Show file tree
Hide file tree
Showing 26 changed files with 375 additions and 21 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ A set of white-label apps to get started in no time.
- [Web-Wallet](https://github.com/walt-id/waltid-identity/tree/main/waltid-web-wallet) - A custodial web-wallet (PWA) solution for credentials and tokens.
- [Portal](https://github.com/walt-id/waltid-identity/tree/main/waltid-web-portal) - An issuer and verifier portal for credentials.

## Use Services And Apps

Use the [walt.id identity package](https://github.com/walt-id/waltid-identity/tree/main/docker-compose) to run all APIs and Apps with docker:

```bash
cd docker-compose && docker compose up
```

Learn more about the exposed ports [here](https://github.com/walt-id/waltid-identity/tree/main/docker-compose).

## Architecture
The walt.id identity repo is part of The Community Stack, walt.id's collection of open-source products to build identity and wallet solutions. Learn more [here](https://walt.id/blog/p/community-stack).
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
allprojects {

version = "1.0.1"
version = "1.0.0-SNAPSHOT"

repositories {
mavenCentral()
Expand Down
6 changes: 6 additions & 0 deletions docker-compose/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
WALLET_FRONTEND_PORT=3000
WALLET_BACKEND_PORT=4545
WEB_PORTAL_PORT=4000
VC_REPO_PORT=5000
ISSUER_API_PORT=8000
VERIFIER_API_PORT=9000
61 changes: 61 additions & 0 deletions docker-compose/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
services:
# postgresdb: # Uncomment to connect a Postgres DB
# image: postgres
# environment:
# POSTGRES_PASSWORD: secret
wallet-backend:
image: waltid/wallet-backend:latest
volumes:
- ./wallet-backend/config:/waltid-web-wallet/config
- ./wallet-backend/walt.yaml:/waltid-web-wallet/walt.yaml
- ./wallet-backend/data:/waltid-web-wallet/data
wallet-frontend:
image: waltid/wallet-frontend:latest
environment:
NUXT_PUBLIC_ISSUER_CALLBACK_URL: "http://localhost:$WALLET_FRONTEND_PORT"
issuer-api:
image: waltid/issuer-api:latest
volumes:
- ./issuer-api/config:/waltid-issuer-api/config
verifier-api:
image: waltid/verifier-api:latest
volumes:
- ./verifier-api/config:/waltid-verifier-api/config
web-portal:
image: waltid/portal:latest
environment:
NEXT_PUBLIC_VC_REPO: "http://localhost:$VC_REPO_PORT"
NEXT_PUBLIC_ISSUER: "http://localhost:$ISSUER_API_PORT"
NEXT_PUBLIC_VERIFIER: "http://localhost:$VERIFIER_API_PORT"
NEXT_PUBLIC_WALLET: "http://localhost:$WALLET_FRONTEND_PORT"
vc-repo:
image: waltid/vc-repository:latest
ingress:
image: nginx:1.15.10-alpine
ports:
- target: $WALLET_FRONTEND_PORT
published: $WALLET_FRONTEND_PORT # wallet-frontend
protocol: tcp
mode: host
- target: $WALLET_BACKEND_PORT
published: $WALLET_BACKEND_PORT # wallet-backend
protocol: tcp
mode: host
- target: $WEB_PORTAL_PORT
published: $WEB_PORTAL_PORT # web-portal
protocol: tcp
mode: host
- target: $VC_REPO_PORT
published: $VC_REPO_PORT # vc-repo
protocol: tcp
mode: host
- target: $ISSUER_API_PORT
published: $ISSUER_API_PORT # issuer-api
protocol: tcp
mode: host
- target: $VERIFIER_API_PORT
published: $VERIFIER_API_PORT # verifier-api
protocol: tcp
mode: host
volumes:
- ./ingress.conf:/etc/nginx/conf.d/default.conf # API gateway configuration
64 changes: 64 additions & 0 deletions docker-compose/ingress.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

# wallet-frontend
server {
listen 3000;
location ~* /wallet-api/ {
proxy_pass http://wallet-backend:4545;
proxy_redirect default;
}

location / {
proxy_pass http://wallet-frontend:3000;
proxy_redirect default;
}
}

# wallet-backend
server {
listen 4545;

location / {
proxy_pass http://wallet-backend:4545;
proxy_redirect default;
}
}

# web-portal
server {
listen 4000;

location / {
proxy_pass http://web-portal:3000;
proxy_redirect default;
}
}

# vc-repo
server {
listen 5000;

location / {
proxy_pass http://vc-repo:3000;
proxy_redirect default;
}
}

# issuer-api
server {
listen 8000;

location / {
proxy_pass http://issuer-api:7000;
proxy_redirect default;
}
}

# verifier-api
server {
listen 9000;

location / {
proxy_pass http://verifier-api:7001;
proxy_redirect default;
}
}
1 change: 1 addition & 0 deletions docker-compose/issuer-api/config/issuer-service.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
baseUrl = "http://issuer-api:7000"
2 changes: 2 additions & 0 deletions docker-compose/issuer-api/config/web.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
webHost = "0.0.0.0"
webPort = "7000"
55 changes: 55 additions & 0 deletions docker-compose/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# walt.id Identity Package

This package is a docker compose configuration that starts all the services and apps of the identity repo

## Executing The Package

```bash
docker compose up
```

## Services Exposed
port mapping below

- Issuer API: `8000`
- Verifier API: `9000`
- Wallet API: `4545`

## Apps
port mapping below

- Web Wallet: `3000`
- Web Portal: `4000`
- VC Repo: `5000`


## Configurations

Config locations:

- wallet API: `wallet-backend`
- issuer API: `issuer-api/config`
- verifier API: `verifier-api/config`
- ingress: `ingress.conf`
- environment: `.env`

## Troubleshooting

---
#### Display of VC verification result on success page of portal doesn't work

We are working on fixing this issue.

---

#### Updating ports doesn't work

Make sure the ports are also updated in:
- ingress.conf
- walletkit/config
- issuer-config.json
- verifier-config.json
- wallet-config.json
- wallet-backend/config
- wallet.conf
- web.conf
1 change: 1 addition & 0 deletions docker-compose/verifier-api/config/verifier-service.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
baseUrl = "http://verifier-api:7001"
2 changes: 2 additions & 0 deletions docker-compose/verifier-api/config/web.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
webHost = "0.0.0.0"
webPort = "7001"
7 changes: 7 additions & 0 deletions docker-compose/wallet-backend/config/chainexplorer.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
explorers = [
{chain = "ethereum", url = "https://etherscan.io/address/%s"},
{chain = "polygon", url = "https://polygonscan.com/address/%s"},
{chain = "mumbai", url = "https://mumbai.polygonscan.com/address/%s"},
{chain = "tezos", url = "https://tzkt.io/%s/operations"},
{chain = "ghostnet", url = "https://ghostnet.tzkt.io/%s/operations"},
]
1 change: 1 addition & 0 deletions docker-compose/wallet-backend/config/db.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
database = "db.sqlite"
38 changes: 38 additions & 0 deletions docker-compose/wallet-backend/config/db.postgres.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
hikariDataSource {
# -- Database location

# "jdbc:postgresql://localhost:12346/test" for PostgreSQL
# "jdbc:sqlite:data.db" for sqlite3
jdbcUrl = "jdbc:postgresql://127.0.0.1:5432/postgres"

# See https://github.com/JetBrains/Exposed/wiki/DataBase-and-DataSource for other driver names
# "org.postgresql.Driver" for PostgreSQL
# "org.sqlite.JDBC" for sqlite3
driverClassName = "org.postgresql.Driver"

# -- Database credentials

# Leave both empty for sqlite3
username = "postgres"
password = "postgres"

# Isolation

// NAME____________:_PROBLEMS________________________________________:_ID
// None : Transactions unsupported : 0
// Read uncommitted: Phantom reads, non-repeatable reads, dirty reads: 1
// Read committed: Phantom reads, non-repeatable reads : 2
// Repeatable read : Phantom reads : 4
// Serialized : NONE : 8
# dbIsolationLevel = 8
transactionIsolation = "TRANSACTION_SERIALIZABLE"

maximumPoolSize = 5
minimumIdle: 0
autoCommit = false
dataSource {
journalMode = WAL
fullColumnNames = false
}
}
recreateDatabaseOnStart = false
37 changes: 37 additions & 0 deletions docker-compose/wallet-backend/config/db.sqlite.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
hikariDataSource {
# -- Database location

# "jdbc:postgresql://localhost:12346/test" for PostgreSQL
# "jdbc:sqlite:data.db" for sqlite3
jdbcUrl = "jdbc:sqlite:/waltid-web-wallet/data/data.db"

# See https://github.com/JetBrains/Exposed/wiki/DataBase-and-DataSource for other driver names
# "org.postgresql.Driver" for PostgreSQL
# "org.sqlite.JDBC" for sqlite3
driverClassName = "org.sqlite.JDBC"

# -- Database credentials

# Leave both empty for sqlite3
username = ""
password = ""

# Isolation

// NAME____________:_PROBLEMS________________________________________:_ID
// None : Transactions unsupported : 0
// Read uncommitted: Phantom reads, non-repeatable reads, dirty reads: 1
// Read committed: Phantom reads, non-repeatable reads : 2
// Repeatable read : Phantom reads : 4
// Serialized : NONE : 8
# dbIsolationLevel = 8
transactionIsolation = "TRANSACTION_SERIALIZABLE"

maximumPoolSize = 5
autoCommit = false
dataSource {
journalMode = WAL
fullColumnNames = false
}
}
recreateDatabaseOnStart = false
7 changes: 7 additions & 0 deletions docker-compose/wallet-backend/config/marketplace.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
marketplaces = [
{chain = "ethereum", name = "OpenSea", url = "https://opensea.io/assets/ethereum/%s/%s"},
{chain = "polygon", name = "OpenSea", url = "https://opensea.io/assets/matic/%s/%s"},
{chain = "tezos", name = "Rarible", url = "https://rarible.com/token/tezos/%s/%s"},
{chain = "flow", name = "FlowVerse", url = "https://nft.flowverse.co/marketplace/%s/%s"},
{chain = "unique", name = "Unique", url = "https://unqnft.io/market/%s/%s"},
]
1 change: 1 addition & 0 deletions docker-compose/wallet-backend/config/wallet.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
remoteWallet = "http://localhost:8080" # walletkit
2 changes: 2 additions & 0 deletions docker-compose/wallet-backend/config/web.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
webHost = "0.0.0.0"
webPort = 4545
61 changes: 61 additions & 0 deletions docker-compose/wallet-backend/walt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
hikariDataSource:
jdbcUrl: jdbc:sqlite:data/walt.db
maximumPoolSize: 5
autoCommit: false
dataSource:
journalMode: WAL
fullColumnNames: false

azureKeyVaultConfig:
baseURL:
id:
secret:

providers:
ethereum: "ethereum"
goerli: "https://eth-goerli.g.alchemy.com/v2/5TYSteGJgJwJjaQTNN3j_4JtYcvdr3Uy"
sepolia: "https://eth-sepolia.g.alchemy.com/v2/MBOqmZ2X5rRqHqA4Mu_nB3cy9LqndpCX"
polygon: "https://polygon-mainnet.g.alchemy.com/v2/5TYSteGJgJwJjaQTNN3j_4JtYcvdr3Uy"
mumbai: "https://polygon-mumbai.g.alchemy.com/v2/5TYSteGJgJwJjaQTNN3j_4JtYcvdr3Uy"
astar: "https://evm.astar.network"
moonbeam: "https://rpc.api.moonbeam.network"
unique: "https://rpc.unique.network"
opal: "https://rpc-opal.unique.network"

privateKey: "bd4cb3e507f342ee3a710370cef39dda48f17b0a158b0b8dd3f000fbd5b2c2d9"

keys:
0xaf87c5Ce7a1fb6BD5aaDB6dd9C0b8EF51EF1BC31: "bd4cb3e507f342ee3a710370cef39dda48f17b0a158b0b8dd3f000fbd5b2c2d9"
0x8448Ff4b2733b52f62d81ca46d64bD16786299Cd: "d720ef2cb49c6cbe94175ed413d27e635c5acaa1b7cf03d1faad3a0abc2f53f3"
0x6E7448a6335d5C947953994d071D4Dc1F6e5BE96: "b4680ed04f685a2334dea52c069dfa696c02bd3c14e94b99187f5925a555eebe"
0xc8ca7c4f2dc014d7e4fc6973052da1517b4c54da: "9b9c46d0873a9982ade718ab3f4cfc57172b2f07c21b9901ddf239e931d2d6dc"


indexersUrl:
uniqueUrl: "https://api-unique.uniquescan.io/v1/graphql"
opalUrl: "https://api-opal.uniquescan.io/v1/graphql"


polkadotAccounts:
- seed: "unhappy crew auto cloud seat trial room later label sight letter famous"
seedPassword: "testtest"
- seed: "motor swim often garbage often year fly raccoon summer van home swallow"
seedPassword: "testtest"
- seed: "word monkey pride fitness viable leave own eight title joy genre online"
seedPassword: "testtest"
- seed: "clip review orange grocery menu cram gaze job input control cup fetch"
seedPassword: "testtest"
- seed: "loyal parade runway vote myself gossip climb select reflect brass science spray"
seedPassword: "testtest"




apiKeys:
ethereumBlockExplorer: "JGD5ZUUBHE8CUXPNKZASVQPHRGBMB7A5XV"
polygonBlockExplorer: "DZ3PFVWGJE5B8DMDQPRZ5JFBR6U484B82G"
alchemy: "5TYSteGJgJwJjaQTNN3j_4JtYcvdr3Uy"
nftstorage: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweDYwNDNEYThENjU2RTU3NTg2ZDk3MkM1ZDM5RUNENzI1NTNCM2Q1NjAiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTY1NDYxNTQ2NjIwNCwibmFtZSI6Ik5GVCBLSVQifQ.PkMJpU3aJMQXqzq1nPnHJcWJR-32as3bQed3GBszMdg"
subscan: ""

tezosBackendServer: "http://nftkit-js:80"
Loading

0 comments on commit bafeaef

Please sign in to comment.