🚀 Crypto Dashboard – Developer Test (VR Automations) | Created Using PERN (PostgreSQL, Express, ReactJS, NodeJS)
This is a full-stack crypto dashboard project built for the VR Automations developer test. It displays real-time and historical cryptocurrency data using CoinGecko API, PostgreSQL, Node.js, React, and Chart.js. It includes a backend cron job for fetching and storing data every hour.
- Frontend: http://13.201.249.52/
- Backend API Base URL: http://13.201.249.52/api/
/api/coins– Get all current coins/api/history/:coinId– Get historical data of a coin/api/history?coinIds=bitcoin,ethereum,...– Multiple coins’ historical chart
| Layer | Tech Used |
|---|---|
| Frontend | React.js, Bootstrap, Axios, Chart.js |
| Backend | Node.js, Express.js, PostgreSQL |
| Scheduler | node-cron (via PM2) |
| Database | PostgreSQL (hosted on EC2) |
| Hosting | EC2 Ubuntu 22.04, Nginx Reverse Proxy, PM2 |
| API Source | CoinGecko Public API |
# Clone the repo
git clone https://github.com/vicky87883/cryptotrack.git
cd crypto-dashboardcd server
npm install
node index.js # or pm2 start index.js --name backendEnsure .env has:
DATABASE_URL=postgresql://user:password@localhost:5432/crypto_db
PORT=5000cd client
npm install
npm start # or npm run build for productionThe backend uses node-cron to fetch data from CoinGecko every hour and save:
- Coin prices to
coinstable - Historic prices to
historytable
PM2 is used to keep the backend process running on the server.
pm2 list # check process
pm2 logs backend # view cron output
pm2 restart backend # restart servercoinstable with latest priceshistorytable with minute-wise price tracking
- Output logs via
pm2 logsshowing fetch/save intervals
crypto-track/
├── client/ # React frontend
│ ├── src/
│ │ ├── components/
│ │ │ ├── Coin.js
│ │ │ ├── CoinHistoryChart.js
│ │ │ ├── CoinList.js
│ │ │ ├── CoinTable.js
│ │ │ ├── Header.js
│ │ │ ├── Loader.js
│ │ │ └── SearchBar.js
│ │ ├── App.js
│ │ ├── index.js
│ │ ├── App.css
│ │ ├── index.css
│ │ └── ...
│ └── package.json
│
├── server/ # Express backend
│ ├── config/
│ │ └── config.json
│ ├── migrations/
│ │ ├── 20250723141548-create-coins.js
│ │ ├── 20250723141615-create-coinhistory.js
│ │ ├── 20250723160114-add-timestamps-to-coinhistory.js
│ │ └── migrations_create_coinhistory.js
│ ├── models/
│ │ ├── Coin.js
│ │ ├── CoinHistory.js
│ │ ├── create-coinhistory-fixed.js
│ │ └── index.js
│ ├── routes/
│ │ └── coinRoutes.js
│ ├── .env
│ ├── server.js
│ ├── cron.js
│ ├── package.json
│ └── package-lock.json
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/coins |
Get all current coin prices |
| GET | /api/history/:coinId |
Get historical prices for a coin |
| GET | /api/history?coinIds=bitcoin,... |
Get historical chart for multiple coins |
| Layer | Info |
|---|---|
| Instance | EC2 Ubuntu |
| Domain/IP | http://13.201.249.52 |
| Nginx | Reverse proxy for React frontend + proxy /api to backend |
| PostgreSQL | Running locally on EC2 instance |
| Backend | Running via pm2 as backend service |
- ✅ Live App on EC2
- ✅ PostgreSQL with historical data
- ✅ Running Cron Job via PM2
- ✅ GitHub repo with full code
- ✅ This README
- ✅ Screenshots (PostgreSQL + Cron logs)