Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A human-readable Solana transaction explorer powered by Helius.

License

NotificationsYou must be signed in to change notification settings

helius-labs/xray

Repository files navigation

https://xray.helius.xyz/

Relevant Links

🔗Link:https://xray.helius.xyz/

🎥Demo:https://www.loom.com/share/402a4397ebd1403f8f4b7df8f024e9b8

🐤Twitter:https://twitter.com/xray_explorer

💬Discord:https://discord.gg/HjummjUXgq

Support

🤝 Contribute

  • Fork XRAY onto your own GitHub
  • Clone it and make sure you're on thedev branch.
  • Create a new branch named[initials]/[feature] off ofdev. Exampleq/added-a-cool-thing.

Create PR

When you're ready for your changes to be reviewed, create a PR with your new branch to be merged into thedev branch on the official repo.

Pro Tip (Draft PR)

If you're working on something and want to share the progress but aren't ready for merge, click the little arrow next to "Create PR" and chose "draft".

draft

Then when you're ready to create the PR, click "Ready for review".

ready

Test

To save time, run tests locally, but they will also run on all PRs todev andmain. Tests will need to be passing for your changes to be merged.

Auto mergedev ->main**

Once changes are approved and merged intodev, they will be assumed as good and auto merged tomain. From here they can be deployed by merging to either thevercel/staging orvercel/prod branches.

[Temp] Auto mergemain ->vercel/staging

For now we are auto deploying everything in main to staging.

🏃🏽‍♂️ Runbook

This is a TurboRepo monorepo that can run and build all apps/packages in parallel. Apps like the UI are located in/apps. Packages used across apps are located in/packages.

Recommended VSCode Extensions

Tech Stack

Setup Environment

In the root of the project, create a.env file with the values mentioned in.env.template.

Install

Run the install command from the root of the project to install dependencies for all apps and packages.

npm install

Dev

Start all packages and apps in dev mode which watches for changes and adds your local environment.

npm run dev

Lint

It's recommended you use VSCode beacuase if you do, ESLint is setup to auto fix/format as you're working.

npm run lint

Format

Formats files based on the Prettier and ESlint settings.

npm run format

Test

Tests the code, determines if it should be allowed to merge. We recommend running this locally before creating PRs.

npm runtest

Build

Build all apps and packages for production.

npm run build

Build Local Environment

Build all apps and packages for production using your.env file.

npm run build:env

🚀 Deployments

EnvironmentDescriptionDirectory
ProductionThe main deployment attached to the domain.vercel/prodhttps://xray.helius.xyz/
StagingStaging branch based on contents ofvercel/staginghttps://xray-web-git-vercel-staging-helius.vercel.app/

📦 Packages

NameDescriptionDirectory
@helius-labs/xray-webSvelteKit app with UI and backend endpoints.apps/web
@helius-labs/xray-protonParses transaction data to produce UI state.packages/xray-proton
@helius-labs/xray-database [WIP]Prisma client used for communicating with database.packages/xray-database

📱 @helius-labs/xray-web

A SvelteKit app that contains the main XRAY UI.

Important Files & Folders

📁./src/libCommon components, utilities, and libraries used throughout the app. Import things from this directory using the$lib/ alias.
📁./src/lib/trpcThe tRPC server which has all of our backend endpoints. Seetrpc/routes.
📁./src/lib/componentsShared components used throughout the app.
📁./src/lib/trpcThe tRPC server which has all of our backend endpoints.
📁./src/lib/typesGlobal types
📁./src/lib/configsConfig definitions for things like the icons, modals, and generating other types.
📁./src/routesAny+page or+server file in this directory becomes a page or an endpoint based on the folder structure.
📁./staticA place to put any static assets. The files in this directory are hosted at the root of the domain. When using images, try to import them in the<script> vs put them in./static when you can help it.
📄./app.postcssInitialize/config Tailwind + global styles.
📄./app.htmlThe top level HTML template that wraps all pages. Routes are injected into the%sveltekit.body% tag.

Routes

/Home
/apiREST endpoints (This is mostly replaces by tRPC now)
/[search]From the home page, users can navigate to/anything which attempts to resolve the search and then redirect them to/[search]/tx,/[search]/wallet, or/[search]/token based on the search.
/[search]/txDetails about a particular transaction where[search] is a transaction signature.
/[search]/walletDetails about a particular wallet where[search] is a public key.
/[search]/tokenDetails about a particular token where[search] is a token mint address.

Vercel Config

Build Commandcd ../.. && npx turbo run build --filter=web...
Output Directorapps/web/.svelte-kit
Install Commandnpm install --prefix=../..

Styles

TailwindCSS is used for base utilies andDaisyUI contains helpful UI components.

Icons

See list of available icons in$lib/config.

Use Icons

<script>    import Icon from "$lib/components/icon.svelte";</script><Iconid="paper-plane">

Add Icons

  1. Find the icon you want onIconMon. Most of these should render fine.
  2. Click "Embed" -> "Inline" and copy only the<path>.
  3. Add a new key to$lib/config.ts that is similar to the Icon Monsters name for the icon and add your<path>.

State Management

WIP

📦 @helius-labs/xray

A package that includes our parser, which helps make blockchain data pretty for the UI, and search function.

Important Files & Folders

📄./src/lib/parser/index.tsUI calls the function in this file to parse transactions
📄./src/lib/parser/types.tsContains the types, interfaces, and enums needed to understand to work on the parser.
📁./src/lib/parser/parsersContains all parser methods.
📄./src/lib/parser/parsers/index.tsExports parser files in./src/parsers.
📄./src/lib/parser/parsers/unknown.tsIf there is no dedicated parser file for a Helius transaction type, they are parsed in this file. Changing the label on the UI is in./apps/web/src/lib/config.ts.
📁./src/lib/parser/utilsUtility functions for the parser functions
📄./src/lib/search.tsThe function that resolves search inputs to a URL parameter.

📦 @helius-labs/xray-database [WIP]

A database for saving metadata like transaction views or user details.

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp