Sign inSign up

xerostyle/text0wnz

By xerostyle

Updated 5 months ago

Text-mode art editor for ANSI, ASCII, XBIN, & NFO files

Image
Developer tools
0

5.3K

xerostyle/text0wnz repository overview

teXt0wnz is a web-based text-mode art editor for ANSI, ASCII, XBIN, NFO and more. Create, edit, and share text-based artwork in your browser—with full support for auto-save/restore with local storage, & real-time collaborative editing.

preview

Features

  • Web-based text art drawing, also works offline as a PWA
    • No install required!
    • But easily install the Progressive Web Application to your device
  • Comprehensive keyboard shortcuts and mouse controls
    • Draw using the keyboard, mouse, or touch screen
  • Classic and modern fonts
    • Over 100 fonts from IBM PCs, Amiga, C64, and many more vintage / custom.
  • Full suite of drawing tools:
    • Keyboard, freehand brushes, fills, shapes, selection, and color picker
  • Advanced color management
    • 16-color ANSI, iCE colors, real-time preview, color conflict resolution
  • Import/export:
    • ANSI, BIN, XBIN, UTF-8 TXT, NFO, PNG
  • Canvas operations:
    • Undo/redo, resizing, grid overlay, font selection, and full SAUCE metadata support
  • Auto Save/Restore
    • Editor Setting saved to local storage for a consistent drawing sessions
    • Artwork saved to IndexedDB as you draw, auto-reloaded when the app is opened
    • Optimized binary data storage algorithm for efficient canvas persistence
  • Collaborative server mode
    • For real-time multi-user editing
  • Build tools:
    • Vite, Bun, Npm
  • Automated tests:
    • Playwright, Vitest, Testing Library
  • Robust linting and formatting:
    • Eslint and Prettier

Project Documentation


Running The Image

Development Mode:

Development mode provides detailed logging for an optimized development experience:

docker run \
  --cap-add=NET_BIND_SERVICE \
  -e NODE_ENV=development \
  -p 80:80 \
  text0wnz:latest

The application will be available at http://localhost with WebSocket collaboration features enabled.

Production Mode:

For production deployments, use this configuration with your domain and a secure session key:

docker run \
  --cap-add=NET_BIND_SERVICE \
  -e DOMAIN=your.cool.domain.tld \
  -e SESSION_KEY=secure-production-key \
  -e NODE_ENV=production \
  -p 80:80 -p 443:443 \
  text0wnz:latest

This setup enables:

  • Automatic HTTPS via Caddy's built-in certificate management
  • Production-optimized performance settings
  • Stricter security headers and content policies
Required Capabilities

The container requires NET_BIND_SERVICE capability to bind to privileged ports (80/443). For enhanced security, we avoid running as root while still providing standard web server ports.

Container Lifecycle

The container implements a robust startup sequence:

  1. Validates environment variables and generates defaults if needed
  2. Starts the Bun backend server for WebSocket collaboration
  3. Performs readiness checks to ensure the backend is fully operational
  4. Configures and launches Caddy with the appropriate environment settings
  5. Sets up health monitoring endpoints and graceful shutdown handlers

Environment Variables

VariableDescriptionDefault
DOMAINDomain name for the applicationlocalhost
PORTInternal port for the WebSocket server1337
NODE_ENVNode environment settingproduction
SESSION_KEYSession secret key for expresssupersecretkey

Advanced Usage

Persistent Storage

For persistent data storage across container restarts:

docker run \
  --cap-add=NET_BIND_SERVICE \
  -e DOMAIN=your.domain.tld \
  -e NODE_ENV=production \
  -v text0wnz-data:/var/lib/caddy \
  -p 80:80 -p 443:443 \
  xerostyle/text0wnz:latest
Custom Caddy Configuration

For advanced Caddy configurations, you can mount a custom Caddyfile:

docker run \
  --cap-add=NET_BIND_SERVICE \
  -v ./my-caddyfile:/etc/caddy/Caddyfile:ro \
  -p 80:80 -p 443:443 \
  xerostyle/text0wnz:latest

Health Monitoring

The container includes a health check endpoint at /healthz that returns status information. This endpoint is used by the container's internal health check and can be used by orchestration systems.

Tag summary

Content type

Image

Digest

sha256:1e9c46033

Size

129.6 MB

Last updated

5 months ago

docker pull xerostyle/text0wnz