A temporary, cross-device clipboard backed by DB-Chain. Share text, files, and data across devices with customizable expiration times.
- π Cross-device clipboard sharing
- β° Customizable expiration times
- π Secure storage on blockchain
- π± Responsive web interface
- π¨ Modern dark theme UI
- π§ Email notifications
- π Real-time synchronization
CopyPal consists of two main components:
- Frontend: React + TypeScript application built with Vite
- Backend: Node.js API server with blockchain integration
- Docker and Docker Compose
- Git
- A SendGrid account for email functionality
- Access to Arkiv blockchain network
git clone https://github.com/m00npl/copypal.git
cd copypalCopy the example environment files and fill in your values:
# Root environment
cp .env.example .env
# Backend environment
cp backend/.env.example backend/.env
# Frontend environment (optional for custom API endpoint)
cp frontend/.env.example frontend/.envEdit the .env file with your actual values:
# Required: Your Ethereum private key
ARKIV_PRIVATE_KEY=your_private_key_here
# Required: Your SendGrid API key
SENDGRID_API_KEY=your_sendgrid_api_key_here
# Required: Your domain
FROM_EMAIL=noreply@yourdomain.com
BASE_URL=https://yourdomain.com/apidocker compose up -dThe application will be available at:
- Frontend: http://localhost:8881
- Backend API: http://localhost:19234
CopyPal includes comprehensive smoke tests for backend, frontend, and integration scenarios.
Run locally (requires running containers):
bun test:smokeRun on production:
bun test:smoke:productionIndividual test suites:
bun test:smoke:backend # Backend API tests
bun test:smoke:frontend # Frontend UI tests
bun test:smoke:integration # End-to-end testsCustom environment:
API_BASE=https://custom.com/api FRONTEND_URL=https://custom.com bun test tests/smoke/*.test.tsSmoke tests run automatically on:
- Every push to
main - Every pull request
- Scheduled runs (every 6 hours)
- Manual trigger via GitHub Actions
- Ubuntu 20.04+ or similar Linux distribution
- Docker and Docker Compose installed
- Domain name with SSL certificate
- Reverse proxy (nginx recommended)
- Clone and configure on your server:
git clone https://github.com/m00npl/copypal.git
cd copypal
# Copy and configure environment
cp .env.example .env
# Edit .env with your production values- Build and deploy:
# Build backend image
cd backend
docker buildx build --platform linux/amd64 -t yourusername/copypal-backend:latest . --push
# Build frontend image
cd ../frontend
docker buildx build --platform linux/amd64 -t yourusername/copypal-frontend:latest . --push
# Update docker-compose.yml with your image names
cd ..
# Edit docker-compose.yml to use your images
# Deploy
docker compose up -d- Configure reverse proxy (nginx example):
server {
listen 80;
server_name yourdomain.com;
location / {
proxy_pass http://localhost:8881;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /api {
proxy_pass http://localhost:19234;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}| Variable | Description | Required |
|---|---|---|
NODE_ENV |
Environment (production/development) | No |
PORT |
Backend server port | No (default: 19234) |
ARKIV_RPC_URL |
Arkiv blockchain RPC endpoint | Yes |
ARKIV_WS_URL |
Arkiv blockchain WebSocket endpoint | Yes |
ARKIV_CHAIN_ID |
Arkiv blockchain chain ID | Yes |
ARKIV_PRIVATE_KEY |
Your Ethereum private key | Yes |
SENDGRID_API_KEY |
SendGrid API key for emails | Yes |
FROM_EMAIL |
Email address for outgoing emails | Yes |
BASE_URL |
Base URL for API endpoints | Yes |
| Variable | Description | Required |
|---|---|---|
VITE_API_BASE |
Backend API base URL | No (auto-detected) |
- Start backend:
cd backend
cp .env.example .env
# Fill in your environment variables
bun install
bun run dev- Start frontend:
cd frontend
cp .env.example .env # Optional
bun install
bun run dev# Backend
cd backend
bun run build
# Frontend
cd frontend
bun run buildPOST /api/items- Create new clipboard itemGET /api/items/:id- Retrieve clipboard itemDELETE /api/items/:id- Delete clipboard itemGET /api/health- Health check
- Never commit
.envfiles - They contain sensitive credentials - Use strong private keys - Generate secure Ethereum private keys
- Rotate API keys regularly - Especially SendGrid keys
- Use HTTPS in production - Configure SSL certificates
- Firewall configuration - Limit access to necessary ports only
- Calendar not displaying properly: Clear browser cache and reload
- API connection issues: Check backend logs and network connectivity
- Email not sending: Verify SendGrid API key and domain configuration
- Blockchain connection issues: Check Arkiv network status and RPC endpoints
# View backend logs
docker compose logs copypal-backend
# View frontend logs
docker compose logs copypal-frontend
# Follow logs in real-time
docker compose logs -f- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - see LICENSE file for details
For issues and questions:
- Create an issue on GitHub
- Check the troubleshooting section above
- Review logs for error details