Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
ae874bd
fix: comment out static file server paths and related embed directive…
XJuanCarlosXD Sep 17, 2025
5c68c8a
fix: add input background color to Tailwind config, update routing fo…
XJuanCarlosXD Sep 18, 2025
23bf18d
fix: add react-datepicker dependency, update navbar for token swaps, …
XJuanCarlosXD Sep 20, 2025
3342c80
fix: update ESLint configuration, add @number-flow/react dependency, …
XJuanCarlosXD Sep 23, 2025
5ccc591
fix: add date-fns dependency, implement real pagination for transacti…
XJuanCarlosXD Sep 25, 2025
4bd445e
fix: enhance analytics components with improved time formatting, upda…
XJuanCarlosXD Sep 25, 2025
e937089
master
XJuanCarlosXD Sep 26, 2025
bb4aad6
fix: update typography to DM Sans, enhance footer and navbar componen…
XJuanCarlosXD Sep 29, 2025
f17c70f
master
XJuanCarlosXD Sep 29, 2025
226cda4
master
XJuanCarlosXD Sep 29, 2025
18cb720
master
XJuanCarlosXD Oct 9, 2025
e796f7d
feat: add new explorer build target and update static directory for t…
XJuanCarlosXD Oct 9, 2025
3380dd2
refactor: replace React Router Links with external anchor tags in Foo…
XJuanCarlosXD Oct 10, 2025
10f2c43
Merge branch 'main' of https://github.com/canopy-network/canopy into …
XJuanCarlosXD Oct 13, 2025
ab85601
feat: update build process for new explorer, adjust ESLint rules, and…
XJuanCarlosXD Oct 13, 2025
cce7b78
master
XJuanCarlosXD Oct 13, 2025
0e679f2
master
XJuanCarlosXD Oct 17, 2025
d07b97c
feat: enhance analytics components with block range filtering and imp…
XJuanCarlosXD Oct 26, 2025
1190150
feat: update various components for improved functionality and user e…
XJuanCarlosXD Oct 28, 2025
3341cbe
feat: enhance search functionality with improved filtering and dedupl…
XJuanCarlosXD Oct 28, 2025
9070b0b
refactor: update comments for clarity and consistency across components
XJuanCarlosXD Oct 28, 2025
a9f66e6
chore: add configuration files and update build settings for new expl…
XJuanCarlosXD Oct 28, 2025
2e33fa6
refactor: enhance type safety and remove unused Block page
XJuanCarlosXD Oct 28, 2025
cb85f30
chore: simplify build script in package.json for cleaner TypeScript c…
XJuanCarlosXD Oct 28, 2025
8d979e1
refactor: update Navbar component to conditionally render NetworkSele…
XJuanCarlosXD Oct 28, 2025
5e91d92
master
XJuanCarlosXD Oct 28, 2025
4327d6d
chore: update Netlify configuration to set production environment var…
XJuanCarlosXD Oct 28, 2025
2ec8e3a
master
XJuanCarlosXD Oct 28, 2025
dd50a29
master
XJuanCarlosXD Oct 28, 2025
d268807
feat: implement network change handler to invalidate queries on netwo…
XJuanCarlosXD Oct 29, 2025
1583416
feat: enhance Explore page with new features and optimizations
XJuanCarlosXD Nov 3, 2025
ac43a57
refactor: simplify validator filtering logic in analytics and staking…
XJuanCarlosXD Nov 3, 2025
dc50d78
feat: enhance validator details and metrics display
XJuanCarlosXD Nov 3, 2025
1508d46
fix: update ValidatorMetrics to handle specific metric titles and imp…
XJuanCarlosXD Nov 3, 2025
1c68826
refactor: clean up ValidatorDetailPage and adjust metric subtitle dis…
XJuanCarlosXD Nov 3, 2025
5324250
feat: enhance transaction detail and table components with minimum fe…
XJuanCarlosXD Nov 4, 2025
2c54466
feat: enhance UI components with improved fee and amount displays
XJuanCarlosXD Nov 5, 2025
0523306
refactor: update fee display logic across transaction components to u…
XJuanCarlosXD Nov 5, 2025
dfe70cd
refactor: streamline validator data handling in KeyMetrics and enhanc…
XJuanCarlosXD Nov 6, 2025
981944b
feat: enhance Explore page with UI improvements and new features
XJuanCarlosXD Nov 11, 2025
d3e48ba
refactor: update routing and UI components for improved navigation an…
XJuanCarlosXD Nov 11, 2025
18d247c
refactor: enhance account and analytics components for improved data …
XJuanCarlosXD Nov 12, 2025
18f23cb
refactor: update AnalyticsFilters component for improved block time l…
XJuanCarlosXD Nov 12, 2025
8ac12d9
master
XJuanCarlosXD Nov 12, 2025
baddef4
refactor: update account components for improved data display and for…
XJuanCarlosXD Nov 13, 2025
198c7fc
refactor: improve time formatting logic in account transaction compon…
XJuanCarlosXD Nov 13, 2025
0dec36a
Merge branch 'main' of https://github.com/canopy-network/canopy into …
XJuanCarlosXD Dec 3, 2025
735a3b0
feat: enhance block detail display and search functionality
XJuanCarlosXD Dec 3, 2025
f58a280
refactor: improve component styling and layout for better responsiveness
XJuanCarlosXD Jan 3, 2026
7a185b9
Merge branch 'main' of https://github.com/canopy-network/canopy into …
XJuanCarlosXD Feb 12, 2026
4ecf24d
fix: update explorer static directory path in RPC server
XJuanCarlosXD Feb 12, 2026
be80c62
build: add new explorer build step to Dockerfile
XJuanCarlosXD Feb 12, 2026
7bff69c
build: update build dependencies for canopy and explorer
XJuanCarlosXD Feb 17, 2026
8efaf8e
refactor: enhance static file server and improve transaction sorting …
XJuanCarlosXD Feb 24, 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
1 change: 1 addition & 0 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ COPY . /go/src/github.com/canopy-network/canopy

RUN make build/wallet
RUN make build/explorer
RUN make build/explorer-new
RUN go build -a -o bin ./cmd/main/...

FROM alpine:3.19
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ vendor
cmd/web/explorer/.idea
**/.DS_Store
/cmd/tps/data
node_modules
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ GO_BIN_DIR := ~/go/bin
CLI_DIR := ./cmd/main/...
WALLET_DIR := ./cmd/rpc/web/wallet
EXPLORER_DIR := ./cmd/rpc/web/explorer
EXPLORER_NEW_DIR := ./cmd/rpc/web/explore-new
DOCKER_DIR := ./.docker/compose.yaml

# ==================================================================================== #
Expand All @@ -16,7 +17,7 @@ help:
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'

# Targets, this is a list of all available commands which can be executed using the make command.
.PHONY: build/canopy build/canopy-full build/wallet build/explorer test/all dev/deps docker/up \
.PHONY: build/canopy build/canopy-full build/wallet build/explorer build/explorer-new test/all dev/deps docker/up \
docker/down docker/build docker/up-fast docker/down docker/logs \
build/plugin build/kotlin-plugin build/go-plugin build/all-plugins docker/plugin \
docker/run docker/run-kotlin docker/run-go docker/run-typescript docker/run-python docker/run-csharp
Expand All @@ -26,11 +27,11 @@ help:
# ==================================================================================== #

## build/canopy: build the canopy binary into the GO_BIN_DIR
build/canopy:
build/canopy: build/explorer-new
go build -o $(GO_BIN_DIR)/canopy $(CLI_DIR)

## build/canopy-full: build the canopy binary and its wallet and explorer altogether
build/canopy-full: build/wallet build/explorer build/canopy
build/canopy-full: build/wallet build/explorer build/explorer-new build/canopy

## build/wallet: build the canopy's wallet project
build/wallet:
Expand All @@ -40,6 +41,10 @@ build/wallet:
build/explorer:
npm install --prefix $(EXPLORER_DIR) && npm run build --prefix $(EXPLORER_DIR)

## build/explorer-new: build the canopy's new explorer project
build/explorer-new:
npm install --prefix $(EXPLORER_NEW_DIR) && npm run build --prefix $(EXPLORER_NEW_DIR)

# ==================================================================================== #
# TESTING
# ==================================================================================== #
Expand Down
38 changes: 21 additions & 17 deletions cmd/rpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const (
ApplicationJSON = "application/json; charset=utf-8"

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

// Server represents a Canopy RPC server with configuration options.
Expand Down Expand Up @@ -335,7 +335,7 @@ func (h logHandler) Handle(resp http.ResponseWriter, req *http.Request, p httpro
h.h(resp, req, p)
}

//go:embed all:web/explorer/out
//go:embed all:web/explore-new/dist
var explorerFS embed.FS

//go:embed all:web/wallet/out
Expand All @@ -352,23 +352,13 @@ func (s *Server) runStaticFileServer(fileSys fs.FS, dir, port string, conf lib.C

// Create a new ServeMux to handle incoming HTTP requests
mux := http.NewServeMux()
fileServer := http.FileServer(http.FS(distFS))

// 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" {

serveIndex := 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 @@ -382,12 +372,26 @@ func (s *Server) runStaticFileServer(fileSys fs.FS, dir, port string, conf lib.C
// Set the response header as HTML and write the injected content to the response
w.Header().Set("Content-Type", "text/html")
w.WriteHeader(http.StatusOK)
w.Write([]byte(injectedHTML))
_, _ = w.Write([]byte(injectedHTML))
}

// Serve `index.html` with dynamic config injection
if r.URL.Path == "/" || r.URL.Path == "/index.html" {
serveIndex()
return
}

// For all other requests, serve the files directly from the file system
http.FileServer(http.FS(distFS)).ServeHTTP(w, r)
// Serve real static assets if they exist.
requestPath := strings.TrimPrefix(path.Clean(r.URL.Path), "/")
if requestPath != "" {
if _, e := fs.Stat(distFS, requestPath); e == nil {
fileServer.ServeHTTP(w, r)
return
}
}

// SPA fallback: unknown client-side routes resolve to index.html.
serveIndex()
})

// Start the HTTP server in a new goroutine and listen on the specified port
Expand Down
7 changes: 7 additions & 0 deletions cmd/rpc/web/explore-new/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dist/
node_modules/
*.config.js
*.config.ts
vite.config.ts
postcss.config.js
tailwind.config.js
24 changes: 24 additions & 0 deletions cmd/rpc/web/explore-new/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
1 change: 1 addition & 0 deletions cmd/rpc/web/explore-new/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
Loading
Loading