const readme = `# Solana Price Monitor
A real-time Solana price monitoring service with SMS alerts and web dashboard.
- 🚀 Real-time Solana price tracking
- 📱 SMS alerts via Twilio (optional)
- 📊 WebSocket live updates
- 📈 Price history and charts
- 🔔 Customizable alert thresholds
- 🌐 REST API endpoints
- 💨 Easy cloud deployment
-
Clone the repository
-
Install dependencies: ```bash npm install ```
-
Create a `.env` file with your configuration: ``` PORT=3000 TWILIO_ACCOUNT_SID=your_sid_here TWILIO_AUTH_TOKEN=your_token_here TWILIO_PHONE_NUMBER=+1234567890 ```
-
Start the server: ```bash npm start ```
-
Open http://localhost:3000 in your browser
- Fork/upload this code to GitHub
- Go to render.com
- Connect your GitHub account
- Create a new "Web Service"
- Select your repository
- Use these settings:
- Environment: Node
- Build Command: `npm install`
- Start Command: `npm start`
- Add environment variables in Render dashboard
- Click "Create Web Service"
- Install Railway CLI: `npm i -g @railway/cli`
- Run: `railway login`
- Run: `railway init`
- Run: `railway up`
- Add environment variables in Railway dashboard
- Install Vercel CLI: `npm i -g vercel`
- Run: `vercel`
- Follow the prompts
- Add environment variables in Vercel dashboard
- Install Heroku CLI
- Run: ```bash heroku create your-app-name heroku config:set TWILIO_ACCOUNT_SID=your_sid heroku config:set TWILIO_AUTH_TOKEN=your_token heroku config:set TWILIO_PHONE_NUMBER=+1234567890 git push heroku main ```
- `GET /api/price` - Get current Solana price
- `GET /api/history` - Get price history
- `GET /api/alerts` - Get recent alerts
- `POST /api/subscribe` - Subscribe to SMS alerts
- `POST /api/unsubscribe` - Unsubscribe from alerts
- `PUT /api/subscription` - Update alert settings
- `GET /health` - Health check endpoint
Connect to WebSocket for real-time updates:
```javascript const ws = new WebSocket('wss://your-app.com');
ws.on('message', (data) => { const message = JSON.parse(data); // Handle price updates and alerts }); ```
| Variable | Description | Required |
|---|---|---|
| PORT | Server port (default: 3000) | No |
| TWILIO_ACCOUNT_SID | Twilio account SID | No |
| TWILIO_AUTH_TOKEN | Twilio auth token | No |
| TWILIO_PHONE_NUMBER | Your Twilio phone number | No |
- Sign up at twilio.com
- Get a phone number from Twilio
- Copy your Account SID and Auth Token
- Add them to your environment variables
MIT `;
// Export all configuration files module.exports = { packageJson, serverCode, envExample, vercelConfig, renderConfig, railwayConfig, dockerfile, readme };