An interactive dashboard displaying key metrics and visualizations for the Solana blockchain ecosystem, focusing on DeFi and DEX activity.
- Real-time metrics for TVL, volume, and trader activity
- Interactive time-series charts with customizable time filters
- DEX program category breakdown
- CSV data exports for further analysis
- Responsive design for desktop and mobile viewing
- Admin panel to dynamically add and configure charts
- PostgreSQL database for persistent chart storage
The dashboard supports multiple chart types:
- Bar Charts: Visualize categorical data with support for stacked variants
- Line Charts: Display time series data with interactive tooltips
- Area Charts: Show trends with filled areas below the line
- Stacked Area Charts: Visualize part-to-whole relationships over time
All charts feature:
- Consistent color schemes based on categories
- Interactive tooltips showing precise values
- Automatic data normalization and field matching
- CSV export functionality
- Next.js
- React
- TypeScript
- Tailwind CSS
- Visx (for data visualization)
- Prisma with PostgreSQL
- Clone the repository:
git clone https://github.com/yourusername/state_of_solana.git
cd state_of_solana- Install dependencies:
npm install-
Set up your PostgreSQL database:
- Create a PostgreSQL database
- Copy
.env.sampleto.envand update theDATABASE_URLwith your database credentials:
DATABASE_URL="postgresql://username:password@localhost:5432/solana_charts?schema=public" -
Initialize the database:
npm run db:push- Run the development server:
npm run devOpen http://localhost:3000 with your browser to see the result.
- Connect your GitHub repository to Vercel or Netlify
- Add the
DATABASE_URLenvironment variable pointing to your PostgreSQL instance - Deploy the application
Both platforms provide PostgreSQL add-ons that can be easily integrated:
- Create a new project on Railway/Heroku
- Add a PostgreSQL database through their add-ons
- Connect your GitHub repository
- The database connection string will be automatically added to your environment variables
- Deploy the application
- Set up a server with Node.js and PostgreSQL
- Clone the repository and install dependencies
- Create a production build:
npm run build- Start the server:
npm startAccess the admin panel at http://localhost:3000/admin to:
- Create new charts with a simple form interface
- Add charts to any page in the dashboard
- Configure data sources for each chart
- Preview charts during creation
This dashboard uses data from TopLedger's analytics API to provide accurate and up-to-date metrics on Solana's DeFi ecosystem.
MIT