$ show stonith404/pingvin-share
Pingvin Share is a self-hosted file sharing platform designed as an alternative to services like WeTransfer. It provides a full-stack application with a NestJS backend and a Next.js frontend, featuring user authentication (local, OAuth2, TOTP, LDAP), file uploads with chunked transfers, password-protected and expiring shares, reverse shares for receiving files, an administrative panel for managing users and system configuration, and support for multiple storage backends (local filesystem or S3). The application includes virus scanning via ClamAV, email notifications, and extensive internationalization. The backend employs a modular architecture with distinct modules for authentication, user management, share handling, file storage, configuration, and scheduled jobs. Key reusable patterns include an abstracted file storage service (supporting local and S3 providers), a strategy-based OAuth provider interface, and a dynamic configuration service that loads settings from the database with optional YAML file overrides and runtime update notifications. The frontend presents a polished user interface with custom hooks for configuration and user state, reusable input components for timespans and file sizes, and a sophisticated chunked file upload UI with progress tracking and error recovery. Although the original repository has been archived (as of June 2025) with a recommendation to use a maintained fork, the codebase demonstrates solid engineering practices, clear separation of concerns, and several reusable components that could be adapted for similar projects. The Dockerized deployment and comprehensive feature set make it a viable self-hosted solution for file sharing needs.
The LLM identified 3 files worth highlighting for reuse:
Implements S3 storage adapter with multipart upload support, part of a pluggable file storage system that allows switching between local and S3 backends via dependency injection. Demonstrates the Strategy pattern for isolating storage-specific logic while maintaining a common interface.
Defines a common interface for OAuth providers (Google, GitHub, etc.) enabling pluggable authentication strategies. Each provider implements this interface, allowing the auth service to remain decoupled from specific OAuth implementations. Shows clean application of the Strategy pattern for extensible authentication.
Handles chunked file uploads with pause/resume functionality, progress tracking, and error recovery. Encapsulates complex upload logic into a reusable UI component that can be dropped into any form. Demonstrates sophisticated client-side file handling beyond basic HTML5 upload.