This is the core repository containing reusable packages for building Solana microsites. It serves as the source of truth for shared components, configurations, and integrations. Packages within this repo are published to npm for easy consumption in individual microsite projects.
UI components for microsites. Includes:
- Reusable React components
- Custom hooks for common functionality
- Utility functions
- Modern UI components with Tailwind CSS v4 support
Integration utilities for microsites. Provides:
- Standardized third-party service integrations
- API client utilities
- Common integration patterns
- Authentication helpers
Shared configuration for microsites. Features:
- ESLint configuration with React and TypeScript support
- Prettier setup with import sorting
- TypeScript configuration with strict type checking
- Stylelint setup for modern CSS
- Vitest configuration for testing
- PostCSS setup with Tailwind CSS v4 integration
-
Clone the repository:
git clone https://github.com/solana-foundation/solana-ms-tools.git cd solana-ms-tools
-
Install dependencies:
pnpm install
-
Build all packages:
pnpm build
pnpm test
- Run all testspnpm lint
- Run lintingpnpm build
- Build all packagespnpm format
- Run Prettierpnpm changeset
- Create a new changeset for version management
Add this to your .npmrc
to use these public packages from the GitHub registry:
@solana-foundation:registry=https://npm.pkg.github.com
And authenticate with GitHub Package Registry:
-
Generate a Classic Personal Access Token (PAT):
- Go to GitHub Settings > Developer Settings > Personal Access Tokens > Tokens (classic)
- Click "Generate new token (classic)"
- Select at least
read:packages
scope - Copy your token
-
Login to the registry:
npm login --registry=https://npm.pkg.github.com
When prompted:
- Username: your GitHub username
- Password: your classic PAT (not your GitHub password)
pnpm add @solana-foundation/ms-tools-ui
pnpm add @solana-foundation/ms-tools-integrations
pnpm add @solana-foundation/ms-tools-config
-
ESLint Setup:
import baseConfig from '@solana-foundation/ms-tools-config/eslint.config.base.js' export default [...baseConfig]
-
Prettier Setup:
import baseConfig from '@solana-foundation/ms-tools-config/prettier.config.js' export default { ...baseConfig }
-
TypeScript Setup:
{ "extends": "@solana-foundation/ms-tools-config/tsconfig.json" }
For detailed configuration options, refer to each package's README.
We use Changesets for version management and package publishing. The release process is automated through GitHub Actions.
-
Create a changeset for your changes:
pnpm changeset
-
Commit the changeset and push to main branch
-
The release workflow will automatically:
- Version the packages
- Update the changelog
- Create a release PR
- Publish to GitHub Package Registry when merged
For detailed release instructions, see RELEASE.md.
- Create a new branch for your changes
- Make your changes and add tests if applicable
- Create a changeset to document your changes and bump the version
- Submit a pull request
- Ensure all checks pass