Technical Docs
Testing & Deployment
Unit tests, E2E testing, and deployment configuration
Unit Tests
Run unit tests:
bun testTest coverage includes:
- Blockchain validation
- Utility functions
- Notification service
- DateTime operations
E2E Tests
End-to-end tests use Playwright (when configured):
bun test:e2eDeployment
Environment Variables
Required environment variables:
# Database
POSTGRES_HOST=host
POSTGRES_PORT=5432
POSTGRES_DB=db
POSTGRES_USER=user
POSTGRES_PASSWORD=pass
POSTGRES_SSL_MODE=disable
# Managed PostgreSQL TLS, when required
# POSTGRES_SSL_MODE=verify-full
# POSTGRES_SSL_ROOT_CERT_PATH=/etc/postgres-certs/provider-ca.pem
# POSTGRES_SSL_CA_CERT=<pem-certificate-content>
# Authentication
BETTER_AUTH_SECRET=<secret>
BETTER_AUTH_URL=https://yourdomain.com
# Push Notifications
VAPID_PUBLIC_KEY=<key>
VAPID_PRIVATE_KEY=<key>
VAPID_SUBJECT=mailto:support@yourdomain.com
# Storage (optional)
S3_BUCKET=<bucket>
S3_REGION=<region>
S3_ACCESS_KEY_ID=<key>
S3_SECRET_ACCESS_KEY=<secret>Health Checks
Health check endpoints for orchestration:
GET /api/health- Overall healthGET /api/health/db- Database connectivityGET /api/health/ready- Readiness probe
License
Z8 is licensed under a modified BSD 3-Clause license. See the LICENSE file and the open source licenses viewer at /settings/licenses for third-party attributions.