MCPcopy Index your code
hub / github.com/6boris/web3-template

github.com/6boris/web3-template @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
4,304 symbols 10,188 edges 313 files 969 documented · 23%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Web3 Template

This is an open source Web3 Go solution from someone who has been working in the Web2 space for many years. This project uses microservices, containers, message queue related architecture, and can very comfortably cope with the logic related to the server side of Web3 business nowadays.

Framework technology is stable and powerful:

The use of microservices framework, this framework supports the stable operation of BILIBILI more than thousands of service framework, the workplace 100 million DAU.

Extensive Web3 server experience:

The project initiator has multiple startups in the Web3 field and has used this technology to support multiple project launches and runs.

Sufficient cases to refer:

The case will provide a very large number of Web3 functional examples, startup projects can save a lot of time using this.

Here is the architecture diagram and examples:

Logo

Logo

Quick Start

  • clone repo
git clone git@github.com:6boris/web3-template.git
cd web3-template
make clean && make start
  • Open Grafana http://localhost:60005
    • Login with admin/admin

Development Manual

Development Information

Some basic application services and basic service ports

Service HTTP PORT GRPC PORT Mark
app.interface.web3 61011 61012 a web3 generic gateway
app.service.demo 62011 62012 a demo application
app.service.data 62021 62022 a basis data application
app.service.dex-finance 62031 62032 dex financial services
app.service.dex-member 62041 62042 dex user applications
app.job.datawatch 63011 63012 watch Data on the chain
app.job.databus 63021 63022 handling some asynchronous messages
app.job.analysis 63031 63032 a data analysis task

some docker base app port | App | PORT | |:--------------------:|:----------------------:| | base.web3.mysql | 60001 | | base.web3.redis | 60002 | | base.web3.rabbitmq | http://127.0.0.1:60003 | | base.web3.prometheus | http://127.0.0.1:60004 | | base.web3.grafana | http://127.0.0.1:60005 |

External Dependency

  • Kratos A Go Framework for microservices
  • Web3 Go A Web3 Go Client

External Dependency

For other technical questions, you can contact email ....

Extension points exported contracts — how you extend this code

Consumer (Interface)
(no doc) [8 implementers]
app/job/databus/internal/consumer/server.go
Option (FuncType)
Option is metrics option.
pkg/metrics/metrics.go
Redacter (Interface)
Redacter defines how to log an object
pkg/logging/logging.go
ServerOption (FuncType)
(no doc)
app/service/data/internal/worker/server.go
Consumer (Interface)
(no doc) [8 implementers]
app/job/datawatch/internal/task/task.go
ServerOption (FuncType)
(no doc)
app/service/demo/internal/worker/server.go
ServerOption (FuncType)
(no doc)
app/job/analysis/internal/worker/server.go
ServerOption (FuncType)
(no doc)
app/job/databus/internal/consumer/server.go

Core symbols most depended-on inside this repo

Error
called by 527
api/service/demo/base.pb.validate.go
Key
called by 74
api/service/demo/base.pb.validate.go
String
called by 67
pkg/app/app.go
MetricsServer
called by 16
pkg/otel/metrics.go
WithContext
called by 15
app/job/analysis/storage/mysql/query/gen.go
GetAppLogger
called by 13
pkg/app/app.go
WithContext
called by 11
app/service/data/storage/mysql/query/gen.go
WithContext
called by 11
app/service/dex-finance/storage/mysql/query/gen.go

Shape

Method 3,370
Function 418
Struct 401
TypeAlias 64
Interface 43
FuncType 8

Languages

Go100%

Modules by API surface

api/service/dex-member/user.pb.validate.go130 symbols
api/service/demo/user.pb.validate.go130 symbols
app/service/demo/internal/conf/conf.pb.go105 symbols
app/service/data/internal/conf/conf.pb.go102 symbols
app/service/dex-member/internal/conf/conf.pb.go93 symbols
app/service/dex-finance/internal/conf/conf.pb.go93 symbols
app/job/analysis/internal/conf/conf.pb.go82 symbols
app/job/datawatch/internal/conf/conf.pb.go78 symbols
app/job/databus/internal/conf/conf.pb.go78 symbols
api/service/dex-member/auth.pb.validate.go78 symbols
api/service/data/base.pb.go77 symbols
api/service/dex-member/user.pb.go68 symbols

Datastores touched

(mysql)Database · 1 repos

For agents

$ claude mcp add web3-template \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact