A full-stack web application for analyzing cryptocurrency tokens with real-time data fetching, storage, and export capabilities.
- Real-time Cryptocurrency Data: Fetch live market data from CoinGecko API
- Smart Search: Search cryptocurrencies by name or symbol with auto-suggestions
- Data Persistence: SQLite database for storing cryptocurrency information
- JSON Export: Download fetched cryptocurrency data as JSON files
- Multi-Platform Support: Track tokens across Ethereum, Solana, Binance Smart Chain, and Polygon
- Comprehensive Market Data: Price data, market cap, percentage changes, and historical metrics
- Responsive UI: Modern React interface with Tailwind CSS styling
- React - User interface framework
- Tailwind CSS - Utility-first CSS framework
- JavaScript (ES6+) - Programming language
- Node.js - Runtime environment
- Express.js - Web application framework
- SQLite3 - Lightweight database
- node-fetch - HTTP client for API requests
- CORS - Cross-origin resource sharing
- dotenv - Environment variable management
- CoinGecko API - Cryptocurrency market data source
Before running this application, make sure you have:
- Node.js (v14.0.0 or higher)
- npm (v6.0.0 or higher)
- CoinGecko API Key (free tier available)
-
Clone the repository
git clone <repository-url> cd crypto-token-analysis
-
Install root dependencies
npm install
-
Install frontend dependencies
cd frontend npm install cd ..
-
Install backend dependencies
cd backend npm install cd ..
-
Set up environment variables
Create a
.envfile in thebackenddirectory:COINGECKO_API_KEY=your_coingecko_api_key_here
-
Initialize the database
npm run init-db
Start both frontend and backend simultaneously:
npm startThis command uses concurrently to run:
- Backend server on
http://localhost:5000 - Frontend development server on
http://localhost:3000
npm run startWithInitStart backend only:
npm run serverStart frontend only:
npm run clientcrypto-token-analysis/
โโโ package.json # Root package configuration
โโโ backend/ # Backend application
โ โโโ index.js # Express server and API routes
โ โโโ initDB.js # Database initialization script
โ โโโ package.json # Backend dependencies
โ โโโ coinData.db # SQLite database (created after init)
โ โโโ fetchedData/ # Directory for JSON exports
โ โโโ pre_loads/ # Pre-loaded cryptocurrency data
โ โโโ CoinList.json # Master list of cryptocurrencies
โโโ frontend/ # React application
โ โโโ src/
โ โ โโโ components/
โ โ โ โโโ Search.js # Main search component
โ โ โโโ App.js # Main React component
โ โ โโโ index.js # React entry point
โ โโโ package.json # Frontend dependencies
โ โโโ public/ # Static assets
โโโ README.md # This file
| Endpoint | Method | Description |
|---|---|---|
/api/getTokenData |
POST | Fetch detailed token data from CoinGecko |
/api/searchCoins |
GET | Search cryptocurrencies by name or symbol |
Get Token Data:
POST /api/getTokenData
Content-Type: application/json
{
"id": "bitcoin"
}Search Coins:
GET /api/searchCoins?query=bitcoinThe SQLite database contains a coin table with the following structure:
| Column | Type | Description |
|---|---|---|
id |
TEXT (Primary Key) | Unique CoinGecko identifier |
symbol |
TEXT | Cryptocurrency symbol (e.g., BTC) |
name |
TEXT | Full cryptocurrency name |
ethereum |
TEXT | Ethereum contract address |
solana |
TEXT | Solana program address |
binance_smart_chain |
TEXT | BSC contract address |
polygon_pos |
TEXT | Polygon contract address |
- CoinGecko API: Primary source for real-time cryptocurrency data
- Local Database: Cached cryptocurrency metadata for fast search
- JSON Files: Exported data stored in
backend/fetchedData/
| Variable | Description | Required |
|---|---|---|
COINGECKO_API_KEY |
Your CoinGecko API key | Yes |
- Search for Cryptocurrencies: Use the search bar to find specific tokens
- View Detailed Information: Click on search results to fetch comprehensive data
- Export Data: Download fetched data as JSON files for further analysis
- Monitor Multiple Metrics: View price data, market cap, and percentage changes
- Type-ahead search with real-time suggestions
- Search by cryptocurrency name or symbol
- Database-backed fast search results
- Real-time data from CoinGecko API
- Comprehensive market data including:
- Current prices (USD and BTC)
- All-time highs and percentage changes
- Market cap and volume data
- Price change percentages (24h, 7d, 14d, 30d, 60d, 200d, 1y)
- Automatic JSON file generation
- Organized file storage in
fetchedDatadirectory - Filtered data focusing on USD and BTC pairs
Database Not Found:
npm run init-dbAPI Rate Limiting:
- Ensure you have a valid CoinGecko API key
- Check your API key usage limits
Port Conflicts:
- Backend runs on port 5000
- Frontend runs on port 3000
- Ensure these ports are available
Dependencies Issues:
# Clean install
rm -rf node_modules package-lock.json
npm install- Real-time price charts and visualization
- Portfolio tracking capabilities
- Price alerts and notifications
- Historical data analysis
- Technical indicators integration
- User authentication and saved searches
- Mobile app development
- Additional cryptocurrency exchange integrations
This project is licensed under the ISC License.
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
For support and questions, please open an issue in the GitHub repository.
Built with โค๏ธ for the crypto community