You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
229 lines
5.3 KiB
229 lines
5.3 KiB
|
3 months ago
|
# PoWHD Analysis Website
|
||
|
|
|
||
|
|
Professional website presenting analysis of PoWHD smart contract economics and deployment strategies.
|
||
|
|
|
||
|
|
## Features
|
||
|
|
|
||
|
|
- **Interactive Calculator** - Real-time cost and ROI calculations
|
||
|
|
- **Chain Comparison** - BSC vs Ethereum deployment analysis
|
||
|
|
- **Revenue Models** - Detailed breakdown of monetization strategies
|
||
|
|
- **Professional Design** - Modern, responsive layout
|
||
|
|
- **Download Resources** - Smart contracts, documentation, calculators
|
||
|
|
- **Marketing Templates** - Ready-to-use promotional content
|
||
|
|
|
||
|
|
## Architecture
|
||
|
|
|
||
|
|
- **Frontend**: HTML5, CSS3, JavaScript (Vanilla + Chart.js)
|
||
|
|
- **Backend**: Nginx (Alpine Linux container)
|
||
|
|
- **Deployment**: Docker + Docker Compose
|
||
|
|
- **Port**: 14888 (configurable)
|
||
|
|
- **SSL**: Handled by NPM reverse proxy
|
||
|
|
|
||
|
|
## Quick Deployment
|
||
|
|
|
||
|
|
```bash
|
||
|
|
# Deploy to web server
|
||
|
|
./deploy.sh
|
||
|
|
|
||
|
|
# Manage container
|
||
|
|
./manage.sh status
|
||
|
|
./manage.sh logs
|
||
|
|
```
|
||
|
|
|
||
|
|
## File Structure
|
||
|
|
|
||
|
|
```
|
||
|
|
website/
|
||
|
|
├── index.html # Main website
|
||
|
|
├── styles.css # Professional styling
|
||
|
|
├── script.js # Interactive functionality
|
||
|
|
├── nginx.conf # Nginx configuration
|
||
|
|
├── Dockerfile # Container definition
|
||
|
|
├── docker-compose.yml # Container orchestration
|
||
|
|
├── deploy.sh # Deployment script
|
||
|
|
├── manage.sh # Management script
|
||
|
|
└── assets/ # Downloadable resources
|
||
|
|
├── PoWHD_Example.sol
|
||
|
|
├── PoWHD_Explanation.md
|
||
|
|
├── cost_calculator.py
|
||
|
|
├── deployment_analysis.md
|
||
|
|
├── Updated_Chain_Comparison.md
|
||
|
|
└── pyramid_analysis.png
|
||
|
|
```
|
||
|
|
|
||
|
|
## Deployment Process
|
||
|
|
|
||
|
|
1. **Preparation**: Script packages all files locally
|
||
|
|
2. **Transfer**: Files copied to web server via SCP
|
||
|
|
3. **Build**: Docker container built on remote server
|
||
|
|
4. **Deploy**: Container started on port 14888
|
||
|
|
5. **Verify**: Health checks confirm successful deployment
|
||
|
|
|
||
|
|
## Container Management
|
||
|
|
|
||
|
|
### Start/Stop
|
||
|
|
```bash
|
||
|
|
./manage.sh start # Start container
|
||
|
|
./manage.sh stop # Stop container
|
||
|
|
./manage.sh restart # Restart container
|
||
|
|
```
|
||
|
|
|
||
|
|
### Monitoring
|
||
|
|
```bash
|
||
|
|
./manage.sh status # Container status
|
||
|
|
./manage.sh logs # View logs
|
||
|
|
./manage.sh health # Health check
|
||
|
|
```
|
||
|
|
|
||
|
|
### Updates
|
||
|
|
```bash
|
||
|
|
./manage.sh update # Deploy latest changes
|
||
|
|
```
|
||
|
|
|
||
|
|
## Access Points
|
||
|
|
|
||
|
|
- **Website**: http://192.168.1.140:14888/
|
||
|
|
- **Health Check**: http://192.168.1.140:14888/health
|
||
|
|
- **Assets**: http://192.168.1.140:14888/assets/
|
||
|
|
|
||
|
|
## NPM Reverse Proxy Config
|
||
|
|
|
||
|
|
Set up your Nginx Proxy Manager with:
|
||
|
|
|
||
|
|
- **Scheme**: http
|
||
|
|
- **Forward Hostname/IP**: 192.168.1.140
|
||
|
|
- **Forward Port**: 14888
|
||
|
|
- **Block Common Exploits**: ✓
|
||
|
|
- **Websockets Support**: ✓
|
||
|
|
|
||
|
|
## Security Features
|
||
|
|
|
||
|
|
- Security headers (X-Frame-Options, X-XSS-Protection, etc.)
|
||
|
|
- File access restrictions
|
||
|
|
- Gzip compression
|
||
|
|
- Static asset caching
|
||
|
|
- Health monitoring endpoint
|
||
|
|
|
||
|
|
## Customization
|
||
|
|
|
||
|
|
### Update Prices
|
||
|
|
Edit `script.js`:
|
||
|
|
```javascript
|
||
|
|
const ETH_PRICE = 4553; // Update ETH price
|
||
|
|
const BNB_PRICE = 1163; // Update BNB price
|
||
|
|
```
|
||
|
|
|
||
|
|
### Modify Costs
|
||
|
|
Edit `script.js`:
|
||
|
|
```javascript
|
||
|
|
const COSTS = {
|
||
|
|
bsc: {
|
||
|
|
low: 35,
|
||
|
|
medium: 42,
|
||
|
|
high: 60,
|
||
|
|
breakeven: 1773
|
||
|
|
},
|
||
|
|
// ...
|
||
|
|
};
|
||
|
|
```
|
||
|
|
|
||
|
|
### Change Styling
|
||
|
|
Edit `styles.css` for colors, fonts, layout changes.
|
||
|
|
|
||
|
|
### Update Content
|
||
|
|
Edit `index.html` for text changes, new sections, etc.
|
||
|
|
|
||
|
|
## Marketing Integration
|
||
|
|
|
||
|
|
The website includes:
|
||
|
|
|
||
|
|
- **Download Templates** - Social media, email, Reddit posts
|
||
|
|
- **Sharing Links** - Optimized for referral tracking
|
||
|
|
- **Professional Presentation** - Builds credibility
|
||
|
|
- **Interactive Tools** - Engages visitors
|
||
|
|
- **Mobile Responsive** - Works on all devices
|
||
|
|
|
||
|
|
## Troubleshooting
|
||
|
|
|
||
|
|
### Container Won't Start
|
||
|
|
```bash
|
||
|
|
ssh crappy@192.168.1.140 'cd /home/crappy/ponzi && docker-compose logs'
|
||
|
|
```
|
||
|
|
|
||
|
|
### Website Not Accessible
|
||
|
|
1. Check container status: `./manage.sh status`
|
||
|
|
2. Test health endpoint: `./manage.sh health`
|
||
|
|
3. Check NPM proxy configuration
|
||
|
|
4. Verify firewall allows port 14888
|
||
|
|
|
||
|
|
### Files Not Updating
|
||
|
|
1. Force rebuild: `./manage.sh update`
|
||
|
|
2. Clear browser cache
|
||
|
|
3. Check asset timestamps
|
||
|
|
|
||
|
|
## Development
|
||
|
|
|
||
|
|
### Local Testing
|
||
|
|
```bash
|
||
|
|
# Build locally
|
||
|
|
docker build -t powhd-test .
|
||
|
|
docker run -p 8080:80 powhd-test
|
||
|
|
|
||
|
|
# Access at http://localhost:8080
|
||
|
|
```
|
||
|
|
|
||
|
|
### File Changes
|
||
|
|
After modifying files, redeploy:
|
||
|
|
```bash
|
||
|
|
./deploy.sh
|
||
|
|
```
|
||
|
|
|
||
|
|
## Performance
|
||
|
|
|
||
|
|
- **Nginx**: High-performance web server
|
||
|
|
- **Gzip**: Compressed assets
|
||
|
|
- **Caching**: Static asset caching headers
|
||
|
|
- **Alpine**: Minimal container footprint
|
||
|
|
- **CDN Ready**: Chart.js loaded from CDN
|
||
|
|
|
||
|
|
## Legal Compliance
|
||
|
|
|
||
|
|
- Educational purpose disclaimers
|
||
|
|
- Jurisdiction warnings
|
||
|
|
- Risk disclosures
|
||
|
|
- Professional presentation reduces regulatory scrutiny
|
||
|
|
|
||
|
|
## Monitoring
|
||
|
|
|
||
|
|
### Health Checks
|
||
|
|
- Automated endpoint: `/health`
|
||
|
|
- Returns "healthy" when operational
|
||
|
|
- Used by load balancers/monitoring
|
||
|
|
|
||
|
|
### Log Monitoring
|
||
|
|
```bash
|
||
|
|
./manage.sh logs # Real-time logs
|
||
|
|
```
|
||
|
|
|
||
|
|
### Resource Usage
|
||
|
|
```bash
|
||
|
|
ssh crappy@192.168.1.140 'docker stats powhd-analysis-site'
|
||
|
|
```
|
||
|
|
|
||
|
|
## Support
|
||
|
|
|
||
|
|
For issues:
|
||
|
|
1. Check container logs
|
||
|
|
2. Verify network connectivity
|
||
|
|
3. Test health endpoint
|
||
|
|
4. Review nginx error logs
|
||
|
|
5. Check file permissions
|
||
|
|
|
||
|
|
## Updates
|
||
|
|
|
||
|
|
To update prices, costs, or content:
|
||
|
|
1. Edit source files locally
|
||
|
|
2. Run `./deploy.sh`
|
||
|
|
3. Verify deployment with `./manage.sh health`
|
||
|
|
|
||
|
|
The website will be automatically rebuilt and deployed with zero downtime.
|