A modern, feature-rich blockchain explorer for the Quantus Network built with React.js 19 + Tanstack Router, TypeScript, and GraphQL. Explore transactions, blocks, and accounts with real-time data visualization and an intuitive user interface.
- 🔍 Universal Search - Search across transactions, blocks, and accounts with intelligent auto-complete
- 📊 Real-time Data - Live blockchain statistics and recent activity updates
- 📱 Responsive Design - Optimized for desktop, tablet, and mobile devices
- 🌙 Dark/Light Theme - Toggle between themes with system preference support
- ⚡ Fast Performance - Server-side rendering with Next.js 14 App Router
- 💰 Transactions - Browse all network transactions with detailed information
- 🧱 Blocks - Explore block data including height, hash, and timestamp
- 👤 Accounts - View account balances and transaction history
- 📈 Chain Statistics - Network metrics and activity summaries
- Type-Safe GraphQL - Automated code generation for GraphQL queries
- Modern UI Components - Built with Radix UI primitives and Tailwind CSS
- Accessibility First - WCAG compliant components and keyboard navigation
- React.js 19 - The library for web user interfaces
- Tanstack Router - Modern and scalable router
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- Radix UI - Accessible component primitives
- Lucide React - Beautiful icons
- Apollo Client - GraphQL client with caching
- GraphQL Code Generator - Type-safe GraphQL operations
- Date-fns - Date manipulation utilities
- Storybook - Component development environment
- Jest - Testing framework
- ESLint - Code linting
- Prettier - Code formatting
- Husky - Git hooks
- Node.js 18.x or higher
- Yarn 1.22.x or higher
- Git for version control
git clone https://github.com/Quantus-Network/explorer.git
cd explorerbun installCreate a .env.local file in the root directory:
# Required
VITE_SITE_URL=http://localhost:3100
# Optional
ANALYZE=falsebun gql:compilebun devVisit http://localhost:3100 to see the application.
quantus-block-explorer/
├── src/
│ ├── __generated__/ # Auto-generated GraphQL types
│ ├── api/ # GraphQL queries and mutations
│ ├── app/ # Next.js App Router pages
│ │ ├── accounts/ # Account pages
│ │ ├── blocks/ # Block pages
│ │ ├── transactions/ # Transaction pages
│ │ └── layout.tsx # Root layout
│ ├── components/ # React components
│ │ ├── features/ # Feature-specific components
│ │ ├── layout/ # Layout components
│ │ └── ui/ # Reusable UI components
│ ├── config/ # Configuration files
│ ├── constants/ # Application constants
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utility libraries
│ ├── schemas/ # TypeScript schemas
│ ├── types/ # Type definitions
│ └── utils/ # Utility functions
├── public/ # Static assets
├── .storybook/ # Storybook configuration
├── .github/ # GitHub workflows
└── package.json
| Command | Description |
|---|---|
bun dev |
Start development server |
bun run build |
Build for production |
bun start |
Start production server |
bun lint |
Run ESLint |
bun test |
Run tests |
bun format |
Format code with Prettier |
bun storybook |
Start Storybook |
bun gql:compile |
Generate GraphQL types |
bun testbun storybook
bun test-storybook:ciWe use Storybook for component development and testing:
bun storybookComponents are organized by feature and include:
- Stories for different states
- Accessibility testing
- Visual regression testing
The project uses Apollo Client for GraphQL integration with automatic code generation:
- Create query in
src/api/ - Run
bun gql:compileto generate types - Import and use in components
export const exampleQuery = {
useGetData: (config?: QueryHookOptions) => {
const GET_DATA = gql`
query GetData($id: String!) {
data(id: $id) {
id
name
}
}
`;
return useQuery<DataResponse>(GET_DATA, config);
}
};- CSR - Client-side rendering for smooth and fast interactions
- Code Splitting - Automatic code splitting with Vite.js
- Bundle Analysis - Use
ANALYZE=true bun run buildto analyze bundle size
| Variable | Description | Required |
|---|---|---|
VITE_SITE_URL |
Site base URL | Yes |
VITE_GRAPHQL_URL |
GraphQL API endpoint | Yes |
ANALYZE |
Enable bundle analyzer | No |
bun run buildWe welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Run tests and linting
bun test bun lint - Commit your changes
git commit -m 'Add amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Use TypeScript for all new code
- Follow the existing naming conventions
- Add tests for new features
- Update documentation as needed
This project maintains high code quality through:
- ESLint - Airbnb configuration with TypeScript support
- Prettier - Consistent code formatting
- Husky - Pre-commit hooks for quality checks
- TypeScript - Type safety throughout the codebase
GraphQL Types Not Generated
bun gql:compileDevelopment Server Won't Start
bun clean
bun dev- Check the Issues page
- Create a new issue with detailed information
This project is licensed under the MIT License - see the LICENSE file for details.
- React.js - The library for web and native user interfaces
- Tanstack Router - Modern and scalable routing for React and Solid applications
- Tailwind CSS - Utility-first CSS
- Radix UI - Accessible components
- Apollo Client - GraphQL client
- Quantus Network - The blockchain network
Built with ❤️ by the Quantus Team
For more information, visit our website
