npm installThis will install all required packages including:
- React 18
- TypeScript
- Ethers.js (for blockchain interaction)
- Vite (build tool)
- Tailwind CSS (styling)
- Lucide React (icons)
Before deploying, update the base path in vite.config.ts to match your repository name:
export default defineConfig({
plugins: [react()],
base: '/your-repository-name/', // Change this!
build: {
outDir: 'dist',
sourcemap: true,
},
})For example, if your repo is at github.com/username/token-tracker, set:
base: '/token-tracker/',If deploying to a custom domain or root, use:
base: '/',npm run devThe app will be available at http://localhost:5173
npm run buildThis creates an optimized production build in the dist folder.
npm run preview- Push your code to GitHub:
git add .
git commit -m "Initial commit"
git push origin main-
Enable GitHub Pages:
- Go to your repository on GitHub
- Click Settings → Pages
- Under "Build and deployment", select GitHub Actions as the source
- The workflow file
.github/workflows/deploy.ymlis already configured
-
Every push to
mainwill automatically deploy to GitHub Pages -
Your site will be available at:
https://yourusername.github.io/your-repo-name/
- Build the project:
npm run build- Deploy the
distfolder to your hosting provider
sales-tracker/
├── .github/
│ └── workflows/
│ └── deploy.yml # GitHub Actions deployment
├── public/
│ └── vite.svg # Favicon
├── src/
│ ├── components/
│ │ ├── AnalysisForm.tsx # Main analysis form
│ │ ├── ConfigurationModal.tsx # API config
│ │ ├── ResultsView.tsx # Results display
│ │ └── WalletLabelsModal.tsx # Wallet labeling
│ ├── types/
│ │ └── index.ts # TypeScript types
│ ├── utils/
│ │ ├── blockchain.ts # Blockchain service
│ │ ├── storage.ts # LocalStorage utils
│ │ └── tracker.ts # Token tracking logic
│ ├── App.tsx # Main app component
│ ├── index.css # Global styles
│ ├── main.tsx # Entry point
│ └── vite-env.d.ts # Vite types
├── .eslintrc.cjs # ESLint config
├── .gitignore # Git ignore rules
├── index.html # HTML template
├── package.json # Dependencies
├── postcss.config.js # PostCSS config
├── tailwind.config.js # Tailwind config
├── tsconfig.json # TypeScript config
├── tsconfig.node.json # TypeScript node config
├── vite.config.ts # Vite config
├── README.md # Documentation
├── QUICKSTART.md # Quick start guide
└── SETUP.md # This file
This app doesn't use environment variables. All configuration (API keys, wallet labels) is stored in the browser's localStorage for security and convenience.
Important: API keys are stored locally in your browser and never sent to any server except the blockchain RPC provider you configure.
- Chrome/Edge: ✅ Full support
- Firefox: ✅ Full support
- Safari: ✅ Full support
- Mobile browsers: ✅ Responsive design
If you get TypeScript errors:
npm run build -- --mode developmentIf port 5173 is busy:
npm run dev -- --port 3000Clear cache and reinstall:
rm -rf node_modules package-lock.json
npm installMake sure:
- The
basepath invite.config.tsmatches your repo name - GitHub Pages is enabled in repository settings
- The workflow has run successfully (check Actions tab)
Vite provides instant hot reload. Changes to components will update without full page refresh.
The project uses strict TypeScript. This catches errors early but may require explicit typing.
Use Tailwind utility classes for styling. The config includes custom colors for the dark theme.
- Create components in
src/components/ - Add types in
src/types/index.ts - Add utilities in
src/utils/ - Import and use in
App.tsx
The app is optimized for:
- Code splitting: Vite automatically splits code
- Tree shaking: Unused code is removed
- Lazy loading: Components load on demand
- Caching: API responses can be cached
- Block limits: Respects RPC provider limits
- API keys are stored in localStorage (browser only)
- No backend server required
- All blockchain queries go directly to your RPC provider
- No data is sent to third parties
- Open source and auditable
For issues or questions:
- Check the README.md
- Check the QUICKSTART.md
- Open an issue on GitHub
- Review the code - it's well commented!
MIT License - Free to use and modify