Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
cd8f784
master
XJuanCarlosXD Oct 2, 2025
4c51917
master
XJuanCarlosXD Oct 2, 2025
2932674
master
XJuanCarlosXD Oct 3, 2025
aace1d0
- Refactor hook `useBalanceHistory` to optimize query mechanism and i…
ECHOAD Oct 7, 2025
9532e62
- Refactored `RecentTransactionsCard` to improve transaction mapping,…
ECHOAD Oct 9, 2025
9f73d19
- Refactored and restructured components by introducing `StatsCards`,…
ECHOAD Oct 16, 2025
2cf7ac1
Refactor AccountsProvider and RecentTransactionsCard for improved per…
ECHOAD Oct 17, 2025
32ddb9d
Enhance action UI and validation handling with advanced forms, confir…
ECHOAD Oct 17, 2025
99d470b
Introduce toast notification system with manifest integration and mod…
ECHOAD Oct 20, 2025
8f4b4fc
Add `tableSelect` field type with support for dynamic rendering, enha…
ECHOAD Oct 21, 2025
0836167
Refactor and enhance core components with expanded UI capabilities an…
ECHOAD Nov 3, 2025
361612c
Add new field components and enhance existing ones for improved form …
ECHOAD Nov 7, 2025
984d26d
Add new field components and enhance existing ones for improved form …
ECHOAD Nov 7, 2025
075f681
Expand and refactor core form handling, templating utilities, and val…
ECHOAD Nov 9, 2025
a31cb10
Enhance transaction handling and UI components; add fundsWay mapping …
ECHOAD Nov 11, 2025
0ace027
Enhance UI components and add new hooks; update ToastProvider for bet…
ECHOAD Nov 13, 2025
5ca17ef
Enhance UI components and add new hooks; update ToastProvider for bet…
ECHOAD Nov 13, 2025
97a2b1d
Enhance UI components and add new hooks; update ToastProvider for bet…
ECHOAD Nov 14, 2025
0ae0f4c
Enhance UI components and add new hooks; update ToastProvider for bet…
ECHOAD Nov 14, 2025
737b24d
Refactor percentage calculations and improve UI readability; consolid…
ECHOAD Nov 14, 2025
8ce1804
Add wallet-new project and config updates
ECHOAD Nov 14, 2025
7a31904
Update netifly.toml
ECHOAD Nov 14, 2025
16f1a53
Refactor wallet-new to DS fetchers and single-node
ECHOAD Nov 14, 2025
d4f5f88
Add new wallet build process and update configurations; include new w…
ECHOAD Nov 14, 2025
e5e4319
Refactor wallet web UI and key management
ECHOAD Nov 14, 2025
ea3a2d6
Merge remote-tracking branch 'canopy-origin/main' into feature/walllet
ECHOAD Nov 14, 2025
76012b9
Add New Wallet ports to Node-1 and Node-2
ECHOAD Nov 17, 2025
cf566b7
Add New Wallet ports to Node-1 and Node-2
ECHOAD Nov 17, 2025
f17c3a7
Refactor staking components and tidy manifest
ECHOAD Nov 17, 2025
6a0962d
feat: enhance wallet action modal with prefilled data and improve res…
ECHOAD Nov 18, 2025
6f32d2f
refactor: remove debug logging for validator action mapper
ECHOAD Nov 18, 2025
c0c3509
Swap WalletPort and WalletNewPort values
ECHOAD Nov 18, 2025
8980661
Swap Wallet and New Wallet default ports
ECHOAD Nov 18, 2025
a89880b
Merge branch 'feature/wallet' of https://github.com/canopy-network/ca…
ECHOAD Nov 18, 2025
6b514aa
refactor: consolidate wallet directory structure and remove new walle…
ECHOAD Nov 18, 2025
b377a36
refactor: consolidate wallet directory structure and remove new walle…
ECHOAD Nov 18, 2025
8e0fcae
fix: set base path for Vite configuration
ECHOAD Nov 18, 2025
c354c75
fix: use relative paths in wallet-new for production deployment
ECHOAD Nov 18, 2025
44170a1
docs: add wallet deployment debugging guide and improve vite config
ECHOAD Nov 18, 2025
054e521
fix: configure Vite base path for production deployment
ECHOAD Nov 19, 2025
f73a3f4
feat: add environment-based base path configuration for wallet
ECHOAD Nov 19, 2025
76e9a13
docs: enhance README with detailed features and architecture overview…
ECHOAD Nov 19, 2025
54f8b61
fix: adjust Vite base path handling for development and production en…
ECHOAD Nov 19, 2025
7f6d222
fix: update favicon link path to ensure correct loading
ECHOAD Nov 19, 2025
7d7d733
fix: use BASE_URL for plugin path to respect deployment base path
ECHOAD Nov 19, 2025
231ef63
fix: add VITE_BASE_URL to .env.example and update BASE_URL fallback i…
ECHOAD Nov 19, 2025
2cf4a0c
fix: update RPC paths in chain.json to use relative URLs
ECHOAD Nov 19, 2025
e53a612
fix: update RPC paths in chain.json to use relative URLs
ECHOAD Nov 19, 2025
6e7c658
fix: adjust BASE_URL handling for Traefik deployment and update manif…
ECHOAD Nov 20, 2025
f691026
Merge branch 'refs/heads/main' into feature/wallet
ECHOAD Nov 26, 2025
33caef6
feat: Introduce new wallet application with deployment documentation,…
ECHOAD Nov 27, 2025
b7b3cf4
feat: Add new web wallet UI with Vite build, deployment configuration…
ECHOAD Nov 27, 2025
39f1285
Merge branch 'feature/wallet' of https://github.com/canopy-network/ca…
ECHOAD Nov 27, 2025
7981557
feat: Add new wallet frontend with action forms, prefilled field mana…
ECHOAD Nov 28, 2025
c9ac976
Merge remote-tracking branch 'origin/main' into feature/wallet
ECHOAD Jan 2, 2026
6b18a8c
feat: Add new keystore APIs to chain.json and update dependencies wit…
ECHOAD Jan 2, 2026
45109ac
Merge branch 'main' into feature/wallet
Feb 9, 2026
8e572c0
Add a new wallet to the Docker build flow
Feb 12, 2026
75734fb
Add a new wallet to the Docker build flow
Feb 12, 2026
dab1bba
add chain.json.tempalte
Feb 12, 2026
e841c22
Refactor UI components and improve performance in wallet feature
Feb 14, 2026
28e5488
Refactor wallet UI components for improved styling and performance
Feb 17, 2026
d1c4037
Refactor wallet UI components for improved styling and performance
Feb 18, 2026
4cc49d2
Refactor wallet UI components for improved styling and performance
Feb 18, 2026
d93bfeb
Refactor dashboard layout and improve UI components for better perfor…
Feb 18, 2026
d712190
Add NumberField component and update governance features with new pol…
Feb 18, 2026
9a97861
Replace MapPin icon with WalletCards in AllAddressesCard and remove u…
Feb 18, 2026
abff242
Enhance wallet management UI with improved styling, new icons, and ad…
Feb 18, 2026
0787d4e
Merge branch 'refs/heads/main' into feature/wallet
Feb 18, 2026
e7ae29c
feat: enhance form handling and UI components for better user experience
Feb 19, 2026
5024e50
feat: improve ActionModal styling and update manifest for better user…
Feb 19, 2026
3643a0d
feat: add documentation for declarative architecture and configuratio…
Feb 19, 2026
a07e18d
Merge branch 'main' into feature/wallet
Feb 19, 2026
f82288e
feat: add RangeField component and enhance form elements with new sty…
Feb 23, 2026
600dd62
feat: enhance ActionModal and ActionRunner components with improved s…
Feb 24, 2026
4e865fc
feat: enhance ActionModal and ActionRunner components with improved s…
Feb 24, 2026
7e1f53f
chore: make ui less opaque
pablocampogo Feb 26, 2026
2ac94f0
chore: translate comments to english
pablocampogo Feb 26, 2026
4da77d1
chore: eliminate use of env var, set everything in the docker compose
pablocampogo Feb 26, 2026
71d1036
Merge branch 'main' of github.com:canopy-network/canopy into feature/…
pablocampogo Feb 26, 2026
2e0654b
fix: orders to work
pablocampogo Feb 27, 2026
8bdc42f
fix: orders to work
pablocampogo Feb 27, 2026
3116491
fix: monitoring screen set logs to real time and not showing correct …
pablocampogo Feb 27, 2026
1d6c796
Merge branch 'feature/wallet' of github.com:canopy-network/canopy int…
pablocampogo Feb 27, 2026
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
12 changes: 12 additions & 0 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,21 @@ FROM golang:1.24-alpine AS builder

RUN apk update && apk add --no-cache make bash nodejs npm

# Wallet-specific build configuration
# Default: / (for simple-stack deployment with direct port access)
ARG VITE_WALLET_BASE_PATH=/
# RPC proxy targets for chain.json generation
ARG VITE_WALLET_RPC_PROXY_TARGET=http://localhost:50002
ARG VITE_WALLET_ADMIN_RPC_PROXY_TARGET=http://localhost:50003

WORKDIR /go/src/github.com/canopy-network/canopy
COPY . /go/src/github.com/canopy-network/canopy

# Export build configuration to environment
ENV VITE_WALLET_BASE_PATH=${VITE_WALLET_BASE_PATH}
ENV VITE_WALLET_RPC_PROXY_TARGET=${VITE_WALLET_RPC_PROXY_TARGET}
ENV VITE_WALLET_ADMIN_RPC_PROXY_TARGET=${VITE_WALLET_ADMIN_RPC_PROXY_TARGET}

RUN make build/wallet
RUN make build/explorer
RUN go build -a -o bin ./cmd/main/...
Expand Down
34 changes: 22 additions & 12 deletions .docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,48 @@ services:
build:
context: ..
dockerfile: .docker/Dockerfile
args:
VITE_WALLET_BASE_PATH: /
VITE_EXPLORER_BASE_PATH: /
VITE_WALLET_RPC_PROXY_TARGET: http://localhost:50002
VITE_WALLET_ADMIN_RPC_PROXY_TARGET: http://localhost:50003
ports:
- 50000:50000 # Wallet
- 50001:50001 # Explorer
- 50002:50002 # RPC
- 50003:50003 # Admin RPC
- 9001:9001 # TCP P2P
- 6060:6060 # Debug
- 9090:9090 # Metrics
- 9001:9001 # TCP P2P
- 6060:6060 # Debug
- 9090:9090 # Metrics
networks:
- canopy
command: ["start"]
volumes:
- ./volumes/node_1:/root/.canopy
# deploy:
# resources:
# limits:
# memory: 2G
# cpus: "1.0"
# deploy:
# resources:
# limits:
# memory: 2G
# cpus: "1.0"

node-2:
container_name: node-2
build:
context: ..
dockerfile: .docker/Dockerfile
args:
VITE_WALLET_BASE_PATH: /
VITE_EXPLORER_BASE_PATH: /
VITE_WALLET_RPC_PROXY_TARGET: http://localhost:40002
VITE_WALLET_ADMIN_RPC_PROXY_TARGET: http://localhost:40003
ports:
- 40000:40000 # Wallet
- 40001:40001 # Explorer
- 40002:40002 # RPC
- 40003:40003 # Admin RPC
- 9002:9002 # TCP P2P
- 6061:6060 # Debug
- 9091:9091 # Metrics
- 9002:9002 # TCP P2P
- 6061:6060 # Debug
- 9091:9091 # Metrics
networks:
- canopy
command: ["start"]
Expand Down Expand Up @@ -72,4 +82,4 @@ services:

networks:
canopy:
driver: bridge
driver: bridge
46 changes: 46 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
FROM golang:1.24-alpine AS builder

RUN apk update && apk add --no-cache make bash nodejs npm

ARG BIN_PATH
# Wallet-specific build configuration
# Default: /wallet/ (for monitoring-stack deployment with Traefik reverse proxy)
# Override with: docker build --build-arg VITE_WALLET_BASE_PATH=/
ARG VITE_WALLET_BASE_PATH=/wallet/
# RPC proxy targets for chain.json generation
# For monitoring-stack, these should be Traefik URLs
ARG VITE_WALLET_RPC_PROXY_TARGET=/wallet/rpc
ARG VITE_WALLET_ADMIN_RPC_PROXY_TARGET=/wallet/adminrpc

WORKDIR /go/src/github.com/canopy-network/canopy
COPY . /go/src/github.com/canopy-network/canopy

# Export build configuration to environment
# These are available during npm build for wallet and explorer
ENV VITE_WALLET_BASE_PATH=${VITE_WALLET_BASE_PATH}
ENV VITE_WALLET_RPC_PROXY_TARGET=${VITE_WALLET_RPC_PROXY_TARGET}
ENV VITE_WALLET_ADMIN_RPC_PROXY_TARGET=${VITE_WALLET_ADMIN_RPC_PROXY_TARGET}

RUN make build/wallet
RUN make build/explorer
RUN CGO_ENABLED=0 GOOS=linux go build -a -o bin ./cmd/auto-update/.

# Only build if the file at ${BIN_PATH} doesn't already exist
RUN if [ ! -f "${BIN_PATH}" ]; then \
echo "File ${BIN_PATH} not found. Building it..."; \
CGO_ENABLED=0 GOOS=linux go build -a -o "${BIN_PATH}" ./cmd/main/...; \
else \
echo "File ${BIN_PATH} already exists. Skipping build."; \
fi

FROM alpine:3.19

RUN apk add --no-cache pigz ca-certificates

ARG BIN_PATH

WORKDIR /app
COPY --from=builder /go/src/github.com/canopy-network/canopy/bin ./
COPY --from=builder /go/src/github.com/canopy-network/canopy/${BIN_PATH} ${BIN_PATH}
RUN chmod +x ${BIN_PATH}
ENTRYPOINT ["/app/bin"]
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
GO_BIN_DIR := ~/go/bin
CLI_DIR := ./cmd/main/...
AUTO_UPDATE_DIR := ./cmd/auto-update/...
WALLET_DIR := ./cmd/rpc/web/wallet
WALLET_DIR := ./cmd/rpc/web/wallet-new
EXPLORER_DIR := ./cmd/rpc/web/explorer
DOCKER_DIR := ./.docker/compose.yaml

Expand Down Expand Up @@ -37,6 +37,9 @@ build/canopy-full: build/wallet build/explorer build/canopy
build/wallet:
npm install --prefix $(WALLET_DIR) && npm run build --prefix $(WALLET_DIR)

## build/new-wallet: alias for build/wallet (for backward compatibility)
build/new-wallet: build/wallet

## build/explorer: build the canopy's explorer project
build/explorer:
npm install --prefix $(EXPLORER_DIR) && npm run build --prefix $(EXPLORER_DIR)
Expand Down
51 changes: 36 additions & 15 deletions cmd/rpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const (
ContentType = "Content-MessageType"
ApplicationJSON = "application/json; charset=utf-8"

walletStaticDir = "web/wallet/out"
walletStaticDir = "web/wallet-new/out"
explorerStaticDir = "web/explorer/out"
)

Expand Down Expand Up @@ -338,10 +338,10 @@ func (h logHandler) Handle(resp http.ResponseWriter, req *http.Request, p httpro
//go:embed all:web/explorer/out
var explorerFS embed.FS

//go:embed all:web/wallet/out
//go:embed all:web/wallet-new/out
var walletFS embed.FS

// runStaticFileServer creates a web server serving static files
// runStaticFileServer creates a web server serving static files with SPA fallback
func (s *Server) runStaticFileServer(fileSys fs.FS, dir, port string, conf lib.Config) {
// Attempt to get a sub-filesystem rooted at the specified directory
distFS, err := fs.Sub(fileSys, dir)
Expand All @@ -355,20 +355,13 @@ func (s *Server) runStaticFileServer(fileSys fs.FS, dir, port string, conf lib.C

// Define a handler function for the root path
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
// serve `index.html` with dynamic config injection
if r.URL.Path == "/" || r.URL.Path == "/index.html" {
requestedPath := r.URL.Path

// Helper function to serve index.html with config injection
serveIndexHTML := func() {
// Construct the file path for `index.html`
filePath := path.Join(dir, "index.html")

// Open the file and defer closing until the function exits
data, e := fileSys.Open(filePath)
if e != nil {
http.NotFound(w, r)
return
}
defer data.Close()

// Read the content of `index.html` into a byte slice
htmlBytes, e := fs.ReadFile(fileSys, filePath)
if e != nil {
Expand All @@ -383,11 +376,39 @@ func (s *Server) runStaticFileServer(fileSys fs.FS, dir, port string, conf lib.C
w.Header().Set("Content-Type", "text/html")
w.WriteHeader(http.StatusOK)
w.Write([]byte(injectedHTML))
}

// Serve index.html for root path
if requestedPath == "/" || requestedPath == "/index.html" {
serveIndexHTML()
return
}

// Check if the requested path has a file extension (indicates static asset)
// Common static asset extensions: .js, .css, .svg, .png, .jpg, .jpeg, .gif, .ico, .woff, .woff2, .ttf, .eot, .map
ext := path.Ext(requestedPath)
isStaticAsset := ext != ""

if isStaticAsset {
// Try to serve the static asset from the file system
// Remove leading slash for fs.Open
assetPath := strings.TrimPrefix(requestedPath, "/")

// Check if the file exists in the embedded filesystem
if _, err := distFS.Open(assetPath); err == nil {
// File exists, serve it
http.FileServer(http.FS(distFS)).ServeHTTP(w, r)
return
}

// Static asset not found, return 404
http.NotFound(w, r)
return
}

// For all other requests, serve the files directly from the file system
http.FileServer(http.FS(distFS)).ServeHTTP(w, r)
// For all other requests (no file extension = HTML navigation),
// serve index.html to enable SPA client-side routing
serveIndexHTML()
})

// Start the HTTP server in a new goroutine and listen on the specified port
Expand Down
Loading
Loading