A comprehensive analytics platform for RMM (Real Money Market) protocol, providing detailed insights into your DeFi positions, interest calculations, and transaction history.
Before starting, ensure you have the following installed:
- Node.js (v18 or higher)
- npm (v8 or higher)
- Git
rmmgain/
βββ pages/ # Next.js pages and API routes
β βββ api/ # API routes (Next.js API routes)
β βββ index.tsx # Main frontend page
βββ lib/ # Library code
β βββ services/ # Business logic and API services
βββ components/ # React components
βββ utils/ # Utility functions and constants
βββ types/ # TypeScript type definitions
git clone git@github.com:Baptiste-Yucca/rmmgain.git
cd rmmgainnpm installCreate a .env file in the root directory:
# Environment Variables
NEXT_PUBLIC_GNOSISSCAN_API_KEY=your_gnosisscan_api_key_here
NEXT_PUBLIC_THEGRAPH_API_KEY=your_thegraph_api_key_here
NEXT_PUBLIC_THEGRAPH_API_URL=https://api.thegraph.com/subgraphs/id/QmVH7ota6caVV2ceLY91KYYh6BJs2zeMScTTYgKDpt7VRg
NEXT_PUBLIC_GNOSIS_RPC_URL=https://rpc.gnosischain.com/- Go to https://gnosisscan.io/
- Create a free account
- Navigate to "API-KEYs" in your profile
- Create a new API key
- Add it to your
.envfile asNEXT_PUBLIC_GNOSISSCAN_API_KEY
- Go to https://thegraph.com/
- Create an account
- Navigate to "API Keys"
- Create a new API key
- Add it to your
.envfile asNEXT_PUBLIC_THEGRAPH_API_KEY
npm run devThe application will start on http://localhost:3000
npm run build
npm startThe application will start on http://localhost:3000
# Press Ctrl+C in the terminal# Stop with Ctrl+C, then restart
npm run devnpm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint- Health Check:
GET / - RMM V2:
GET /api/rmm/v2/:address - RMM V3:
GET /api/rmm/v3/:address
# Test the API
curl http://localhost:3000/api/rmm/v3/0x7ca24d4443ff5298d9a1729622a116b712a58a56# Check what's using the port
lsof -i :3000
# Kill the process
kill -9 <PID># Verify .env file exists
ls -la .env
# Check if variables are loaded
echo $NEXT_PUBLIC_GNOSISSCAN_API_KEY
echo $NEXT_PUBLIC_THEGRAPH_API_KEY# Verify API keys in .env file
cat .env | grep API_KEY# Clear npm cache and reinstall
npm cache clean --force
rm -rf node_modules package-lock.json
npm install- Open your browser and navigate to
http://localhost:3000 - Enter an EVM address (e.g.,
0x3f3994bb23c48204ddeb99aa6bf6dd275abf7a3f) - Click "Analyze" to view your RMM data
- Explore the dashboard with charts, transactions, and financial summaries
- Frontend components go in
components/ - API routes go in
pages/api/ - Business logic and services go in
lib/services/ - Utility functions go in
utils/ - Update types in
types/
- Framework: Next.js with TypeScript
- Frontend: React hooks + TypeScript
- API: Next.js API routes (TypeScript)
- Styling: TailwindCSS
- Charts: Chart.js + React-Chartjs-2
If you encounter issues:
- Check the user guide
- Open an issue.
Please contact Realtoken DAO.
Happy analyzing! ππ