How 0xjeanpierre/nulldrive works
nulldrive is a Pastebin-style text and file-sharing service. Users create text pastes or upload resumable chunks, then share pages and download content with integrity hashes; file downloads support HTTP Range. The graph separates browser interaction, API/domain handling, persistence and retention, and configuration/documentation. Several frontend-to-API details and admin/docs internals are unsampled, so only documented or indexed relationships are shown.
Main entry points: server.js HTTP application · uploads.js Upload and downloads · pastes.js Paste handling · cleanup.js Expiry cleanup
Components 20
Browser experience
- Home interface
app/public/index.html - Home interactions
app/public/js/app.js - Shared UI utilities
app/public/js/common.js - Chunk uploader
app/public/js/uploader.js - Paste viewer
app/public/js/paste.js - File viewer
app/public/js/file.js
Content API
- HTTP application
app/src/server.js - Paste handling
app/src/routes/pastes.js - Upload and downloads
app/src/routes/uploads.js - Input validation
app/src/services/validate.js - HTTP helpers
app/src/utils/http.js - IDs and MD5
app/src/utils/hash.js
Persistence and retention
- Metadata database
app/src/db.js - Content files
- Expiry cleanup
app/src/services/cleanup.js
Configuration and docs
- Runtime configuration
app/src/config.js - Admin controls
app/src/routes/admin.js - OpenAPI docs
app/src/routes/docs.js - Docs interface
app/public/docs.html
Other components
- Visitor
Connections 32
- Visitor → Home interface: uses
README.md - Home interface → Home interactions: loads
- Home interactions → Shared UI utilities: imports
app/public/js/app.js - Home interactions → Chunk uploader: uses
app/public/js/app.js - Chunk uploader → Upload and downloads: requests uploads
app/public/js/uploader.js - Paste viewer → Shared UI utilities: imports
app/public/js/paste.js - File viewer → Shared UI utilities: imports
app/public/js/file.js - HTTP application → Paste handling: mounts
app/src/server.js - HTTP application → Upload and downloads: mounts
app/src/server.js - HTTP application → Admin controls: mounts
app/src/server.js - HTTP application → OpenAPI docs: mounts
app/src/server.js - HTTP application → Expiry cleanup: starts
app/src/server.js - Paste handling → Metadata database: queries
app/src/routes/pastes.js - Paste handling → Content files: reads and writes
app/src/routes/pastes.js - Paste handling → IDs and MD5: computes hashes
app/src/routes/pastes.js - Paste handling → Input validation: sanitizes names
app/src/routes/pastes.js - Paste handling → HTTP helpers: uses errors
app/src/routes/pastes.js - Upload and downloads → Metadata database: queries
app/src/routes/uploads.js - Upload and downloads → Content files: streams files
app/src/routes/uploads.js - Upload and downloads → IDs and MD5: computes MD5
app/src/routes/uploads.js - Upload and downloads → Input validation: validates names
app/src/routes/uploads.js - Upload and downloads → HTTP helpers: uses errors
app/src/routes/uploads.js - Expiry cleanup → Metadata database: removes metadata
app/src/services/cleanup.js - Expiry cleanup → Content files: removes expired files
app/src/services/cleanup.js - Expiry cleanup → Runtime configuration: reacts to changes
app/src/services/cleanup.js - Admin controls → Runtime configuration: updates settings
app/src/routes/admin.js - Admin controls → Expiry cleanup: triggers cleanup
app/src/routes/admin.js - Admin controls → Metadata database: reads statistics
app/src/routes/admin.js - HTTP application → Runtime configuration: loads settings
app/src/server.js - Visitor → Docs interface: opens docs
README.md - HTTP application → Docs interface: serves static page
app/src/server.js - OpenAPI docs → Runtime configuration: documents settings
app/src/routes/docs.js