{"id":13456855,"url":"https://github.com/helius-labs/xray","last_synced_at":"2025-04-12T14:56:07.051Z","repository":{"id":65764263,"uuid":"590722097","full_name":"helius-labs/xray","owner":"helius-labs","description":"A human-readable Solana transaction explorer powered by Helius.","archived":false,"fork":false,"pushed_at":"2025-01-06T08:22:26.000Z","size":48449,"stargazers_count":183,"open_issues_count":4,"forks_count":78,"subscribers_count":6,"default_branch":"dev","last_synced_at":"2025-04-03T14:10:28.623Z","etag":null,"topics":["daisyui","solana","svelte","tailwindcss","tanstack-query","trpc","typescript"],"latest_commit_sha":null,"homepage":"https://xray.helius.xyz","language":"Svelte","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/helius-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-19T03:22:50.000Z","updated_at":"2025-03-27T08:05:50.000Z","dependencies_parsed_at":"2023-12-20T21:26:19.170Z","dependency_job_id":"81b5aacb-8949-405b-9e1a-cff68a05bcec","html_url":"https://github.com/helius-labs/xray","commit_stats":{"total_commits":497,"total_committers":27,"mean_commits":18.40740740740741,"dds":0.647887323943662,"last_synced_commit":"900dd5a03c914cc435c958eccba94f2dc22f0372"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helius-labs%2Fxray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helius-labs%2Fxray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helius-labs%2Fxray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helius-labs%2Fxray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helius-labs","download_url":"https://codeload.github.com/helius-labs/xray/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586244,"owners_count":21128996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["daisyui","solana","svelte","tailwindcss","tanstack-query","trpc","typescript"],"created_at":"2024-07-31T08:01:29.006Z","updated_at":"2025-04-12T14:56:07.028Z","avatar_url":"https://github.com/helius-labs.png","language":"Svelte","funding_links":[],"categories":["Developer Resources","Development Tools and Libraries","Svelte"],"sub_categories":["Explorers","Development Tools"],"readme":"![https://xray.helius.xyz/](/doc/xray-cover-gh.jpg)\n\n## Relevant Links\n\n🔗 **Link**: https://xray.helius.xyz/\n\n🎥 **Demo**: https://www.loom.com/share/402a4397ebd1403f8f4b7df8f024e9b8\n\n🐤 **Twitter**: https://twitter.com/xray_explorer\n\n💬 **Discord**: https://discord.gg/HjummjUXgq\n\n## Support\n\n-   📝 [Start Discussion](https://github.com/helius-labs/xray/discussions)\n-   💡 [Submit Feature Request](https://github.com/helius-labs/xray/issues/new?assignees=\u0026labels=question\u0026template=FEATURE-REQUEST.yml\u0026title=%F0%9F%92%A1+%5BREQUEST%5D+-+%3Ctitle%3E)\n-   🐛 [Submit Bug Report](https://github.com/helius-labs/xray/issues/new?assignees=\u0026labels=bug\u0026template=BUG-REPORT.yml\u0026title=%F0%9F%90%9B+%5BBUG%5D+-+%3Ctitle%3E)\n\n## 🤝 Contribute\n\n-   Fork XRAY onto your own GitHub\n-   Clone it and make sure you're on the `dev` branch.\n-   Create a new branch named `[initials]/[feature]` off of `dev`. Example `q/added-a-cool-thing`.\n\n### Create PR\n\nWhen you're ready for your changes to be reviewed, create a PR with your new branch to be merged into the `dev` branch on the official repo.\n\n### Pro Tip (Draft PR)\n\nIf 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\".\n\n![draft](/doc/draft.png)\n\nThen when you're ready to create the PR, click \"Ready for review\".\n\n![ready](/doc/ready.png)\n\n### Test\n\nTo save time, run tests locally, but they will also run on all PRs to `dev` and `main`. Tests will need to be passing for your changes to be merged.\n\n### Auto merge `dev` -\u003e `main`\\*\\*\n\nOnce changes are approved and merged into `dev`, they will be assumed as good and auto merged to `main`. From here they can be deployed by merging to either the `vercel/staging` or `vercel/prod` branches.\n\n#### [Temp] Auto merge `main` -\u003e `vercel/staging`\n\nFor now we are auto deploying everything in main to staging.\n\n## 🏃🏽‍♂️ Runbook\n\nThis 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`.\n\n### Recommended VSCode Extensions\n\n-   [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)\n-   [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)\n-   [Prisma](https://marketplace.visualstudio.com/items?itemName=Prisma.prisma)\n-   [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode)\n-   [Better Comments](https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments)\n\n### Tech Stack\n\n-   [Node](https://nodejs.org/en/)\n-   [TurboRepo](https://turbo.build/repo)\n-   [TypeScript](https://www.typescriptlang.org/)\n-   [Prisma](https://www.prisma.io/)\n-   [tRPC](https://trpc.io/)\n-   [SvelteKit](https://kit.svelte.dev/)\n-   [TanstackQuery](https://tanstack.com/query/latest)\n-   [SvelteKit tRPC SvelteQuery Adapter](https://github.com/vishalbalaji/trpc-svelte-query-adapter)\n-   [Tailwind](https://tailwindcss.com/)\n-   [DaisyUI Components](https://daisyui.com/)\n\n### Setup Environment\n\nIn the root of the project, create a `.env` file with the values mentioned in `.env.template`.\n\n### Install\n\nRun the install command from the root of the project to install dependencies for all apps and packages.\n\n```\nnpm install\n```\n\n### Dev\n\nStart all packages and apps in dev mode which watches for changes and adds your local environment.\n\n```sh\nnpm run dev\n```\n\n### Lint\n\nIt's recommended you use VSCode beacuase if you do, ESLint is setup to auto fix/format as you're working.\n\n```sh\nnpm run lint\n```\n\n### Format\n\nFormats files based on the Prettier and ESlint settings.\n\n```sh\nnpm run format\n```\n\n### Test\n\nTests the code, determines if it should be allowed to merge. We recommend running this locally before creating PRs.\n\n```sh\nnpm run test\n```\n\n### Build\n\nBuild all apps and packages for production.\n\n```sh\nnpm run build\n```\n\n### Build Local Environment\n\nBuild all apps and packages for production using your `.env` file.\n\n```sh\nnpm run build:env\n```\n\n## 🚀 Deployments\n\n| Environment | Description                                               | Directory                                              |\n| ----------- | --------------------------------------------------------- | ------------------------------------------------------ |\n| Production  | The main deployment attached to the domain. `vercel/prod` | https://xray.helius.xyz/                               |\n| Staging     | Staging branch based on contents of `vercel/staging`      | https://xray-web-git-vercel-staging-helius.vercel.app/ |\n\n## 📦 Packages\n\n| Name                                                  | Description                                         | Directory                |\n| ----------------------------------------------------- | --------------------------------------------------- | ------------------------ |\n| [@helius-labs/xray-web](#@helius-labs/xray-app)       | SvelteKit app with UI and backend endpoints.        | `apps/web`               |\n| [@helius-labs/xray-proton](#@helius-labs/xray-proton) | Parses transaction data to produce UI state.        | `packages/xray-proton`   |\n| `@helius-labs/xray-database` [WIP]                    | Prisma client used for communicating with database. | `packages/xray-database` |\n\n# 📱 @helius-labs/xray-web\n\nA SvelteKit app that contains the main XRAY UI.\n\n## Important Files \u0026 Folders\n\n|                           |                                                                                                                                                                                                             |\n| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| 📁 `./src/lib`            | Common components, utilities, and libraries used throughout the app. Import things from this directory using the `$lib/` alias.                                                                             |\n| 📁 `./src/lib/trpc`       | The tRPC server which has all of our backend endpoints. See `trpc/routes`.                                                                                                                                  |\n| 📁 `./src/lib/components` | Shared components used throughout the app.                                                                                                                                                                  |\n| 📁 `./src/lib/trpc`       | The tRPC server which has all of our backend endpoints.                                                                                                                                                     |\n| 📁 `./src/lib/types`      | Global types                                                                                                                                                                                                |\n| 📁 `./src/lib/configs`    | Config definitions for things like the icons, modals, and generating other types.                                                                                                                           |\n| 📁`./src/routes`          | Any `+page` or `+server` file in this directory becomes a page or an endpoint based on the folder structure.                                                                                                |\n| 📁`./static`              | A 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 `\u003cscript\u003e` vs put them in `./static` when you can help it. |\n| 📄`./app.postcss`         | Initialize/config Tailwind + global styles.                                                                                                                                                                 |\n| 📄`./app.html`            | The top level HTML template that wraps all pages. Routes are injected into the `%sveltekit.body%` tag.                                                                                                     |\n\n## Routes\n\n|                    |                                                                                                                                                                                                    |\n| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `/`                | Home                                                                                                                                                                                               |\n| `/api`             | REST endpoints (This is mostly replaces by tRPC now)                                                                                                                                               |\n| `/[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. |\n| `/[search]/tx`     | Details about a particular transaction where `[search]` is a transaction signature.                                                                                                                |\n| `/[search]/wallet` | Details about a particular wallet where `[search]` is a public key.                                                                                                                                |\n| `/[search]/token`  | Details about a particular token where `[search]` is a token mint address.                                                                                                                         |\n\n## Vercel Config\n\n|                 |                                                   |\n| --------------- | ------------------------------------------------- |\n| Build Command   | `cd ../.. \u0026\u0026 npx turbo run build --filter=web...` |\n| Output Director | `apps/web/.svelte-kit`                            |\n| Install Command | `npm install --prefix=../..`                      |\n\n## Styles\n\n[TailwindCSS](https://tailwindcss.com/) is used for base utilies and [DaisyUI](https://daisyui.com/) contains helpful UI components.\n\n## Icons\n\nSee list of available icons in `$lib/config`.\n\n### Use Icons\n\n```js\n\u003cscript\u003e\n    import Icon from \"$lib/components/icon.svelte\";\n\u003c/script\u003e\n\n\u003cIcon id=\"paper-plane\"\u003e\n```\n\n### Add Icons\n\n1. Find the icon you want on [IconMon](https://iconmonstr.com/). Most of these should render fine.\n2. Click \"Embed\" -\u003e \"Inline\" and copy only the `\u003cpath\u003e`.\n3. Add a new key to `$lib/config.ts` that is similar to the Icon Monsters name for the icon and add your `\u003cpath\u003e`.\n\n## State Management\n\nWIP\n\n-   [TanstackQuery](https://tanstack.com/query/latest)\n-   [SvelteKit tRPC SvelteQuery Adapter](https://github.com/vishalbalaji/trpc-svelte-query-adapter)\n\n# 📦 @helius-labs/xray\n\nA package that includes our parser, which helps make blockchain data pretty for the UI, and search function.\n\n## Important Files \u0026 Folders\n\n|                                         |                                                                                                                                                                      |\n| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| 📄`./src/lib/parser/index.ts`           | UI calls the function in this file to parse transactions                                                                                                             |\n| 📄`./src/lib/parser/types.ts`           | Contains the types, interfaces, and enums needed to understand to work on the parser.                                                                                |\n| 📁`./src/lib/parser/parsers`            | Contains all parser methods.                                                                                                                                         |\n| 📄`./src/lib/parser/parsers/index.ts`   | Exports parser files in `./src/parsers`.                                                                                                                             |\n| 📄`./src/lib/parser/parsers/unknown.ts` | If 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`. |\n| 📁`./src/lib/parser/utils`              | Utility functions for the parser functions                                                                                                                           |\n| 📄`./src/lib/search.ts`                 | The function that resolves search inputs to a URL parameter.                                                                                                         |\n\n# 📦 @helius-labs/xray-database [WIP]\n\nA database for saving metadata like transaction views or user details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelius-labs%2Fxray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelius-labs%2Fxray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelius-labs%2Fxray/lists"}