FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
Gj64
Gj64untitled-1852
Public
Like
untitled-1852
Home
Code
3
backend
2
frontend
2
README.md
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
5/18/2025
README.md

LuminDoc (LDOC) Viewer

A web interface for encoding, inspecting, and extracting LuminDoc (LDOC) containers on Val Town.

Features

  • Upload LDOC Files: Drag and drop or browse to upload LDOC containers
  • View LDOC Contents: Browse and inspect files within LDOC containers
  • Extract Files: Extract all files from an LDOC container as a ZIP archive
  • View File Information: Display detailed metadata about LDOC containers
  • Create LDOC Containers: Package multiple files into a new LDOC container

What is LDOC?

LuminDoc (LDOC) is a container format designed for packaging multiple files together with metadata. It's similar to ZIP or TAR but with specific features for document-oriented applications.

Key characteristics of the LDOC format:

  • Magic header "LDOC01" for identification
  • CBOR-encoded manifest with file metadata
  • Compressed file contents using zlib
  • Support for various file types with automatic MIME type detection
  • Revision history in the trailer section

Implementation Details

This application provides a complete implementation of the LDOC format:

  • Backend: TypeScript implementation of LDOC reader and writer classes
  • Frontend: Modern web interface for interacting with LDOC containers
  • Viewer: Support for viewing text files, images, and binary files
  • API: RESTful endpoints for encoding, extracting, and inspecting LDOC files

Usage

  1. View LDOC Contents:

    • Upload an LDOC file using the upload area
    • Click "View Contents" to browse the files inside
    • Select any file in the tree to view its contents
  2. Extract LDOC Files:

    • Upload an LDOC file
    • Click "Extract All" to download a ZIP archive with all files
  3. View LDOC Information:

    • Upload an LDOC file
    • Click "Show Info" to see detailed metadata about the container
  4. Create LDOC Container:

    • Add files using the "Create LDOC Container" section
    • Click "Create LDOC" to package the files into a new LDOC container

Technical Implementation

The application consists of:

  • LDOC Writer class for creating LDOC containers
  • LDOC Reader class for extracting and inspecting LDOC containers
  • API endpoints for handling LDOC operations
  • Frontend interface built with HTML, CSS, and JavaScript
  • File viewer with support for syntax highlighting and image preview

Credits

Based on the Python reference implementation of the LDOC format.

Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.