Show HN: I built an Open-source Dropbox/Google Drive BOYB(Bring your own bucket)
hackernews
|
|
📦 오픈소스
#boyb
#오픈소스
#자체 호스팅
#클라우드 스토리지
#파일 공유
#셀프호스팅
#클라우드스토리지
#파일공유
원문 출처: hackernews · Genesis Park에서 요약 및 분석
요약
Locker는 Dropbox나 Google Drive를 대체할 수 있는 오픈소스 자체 호스팅 파일 스토리지 플랫폼으로, 파일 탐색기, 공유 링크 생성, 업로드 링크 기능을 제공합니다. 이 프로젝트는 Next.js 16, PostgreSQL, Drizzle ORM, tRPC 등을 활용해 TypeScript로 개발되었으며, 단일 환경 변수 설정만으로 Local, AWS S3, Cloudflare R2, Vercel Blob 등 다양한 스토리지 제공자를 자유롭게 교체할 수 있는 구조를 갖췄습니다. 또한 `just-bash`를 기반으로 파일 시스템을 읽을 수 있는 가상 Bash 쉘을 지원하며, MIT 라이선스로 공개되어 누구나 로컬 환경에서 쉽게 구축하고 사용할 수 있습니다.
본문
Open-source file storage platform. A self-hostable alternative to Dropbox and Google Drive. - File Explorer — Upload, organize, rename, move, and delete files and folders - Share Links — Generate shareable links with optional password protection, expiration, and download limits - Upload Links — Let others upload files to your storage without an account - Storage Provider Agnostic — Swap between Local, AWS S3, Cloudflare R2, or Vercel Blob via a single env var - Storage Quotas — Per-user storage limits with usage tracking - Virtual Bash Filesystem (beta) — Traverse workspace files with ls ,cd ,find ,cat ,grep , etc. viajust-bash - Framework: Next.js 16 (App Router, Turbopack) - Monorepo: Turborepo + pnpm workspaces - Database: PostgreSQL 16 + Drizzle ORM - API: tRPC 11 (end-to-end type safety) - Auth: BetterAuth (email/password, Google OAuth) - UI: Tailwind CSS 4, Radix UI, Geist fonts, Lucide icons - Language: TypeScript (strict mode) locker/ ├── apps/web/ Next.js web app │ ├── app/ Pages and API routes │ ├── components/ UI components │ ├── server/ tRPC routers and auth config │ └── lib/ Utilities ├── packages/ │ ├── common/ Shared types, validation, constants │ ├── database/ Drizzle schema and database client │ └── storage/ Storage provider adapters ├── docker-compose.yml PostgreSQL └── turbo.json Build pipeline pnpm install docker compose up -d cp .env.example .env The defaults work out of the box for local development. Edit .env to change the storage provider or add OAuth credentials. pnpm db:generate pnpm db:migrate pnpm dev Open http://localhost:3000, create an account, and start uploading files. Set BLOB_STORAGE_PROVIDER in .env : | Provider | Value | Required Env Vars | |---|---|---| | Local filesystem | local | LOCAL_BLOB_DIR | | AWS S3 | s3 | AWS_ACCESS_KEY_ID , AWS_SECRET_ACCESS_KEY , AWS_REGION , S3_BUCKET | | Cloudflare R2 | r2 | R2_ACCOUNT_ID , R2_ACCESS_KEY_ID , R2_SECRET_ACCESS_KEY , R2_BUCKET | | Vercel Blob | vercel | BLOB_READ_WRITE_TOKEN | | Command | Description | |---|---| pnpm dev | Start all packages in dev mode | pnpm build | Production build | pnpm typecheck | Type-check all packages | pnpm lint | Lint all packages | pnpm db:generate | Generate a new Drizzle migration | pnpm db:migrate | Apply pending migrations | pnpm db:seed | Seed the database | pnpm format | Format code with Prettier | Locker includes a read-only virtual filesystem over workspace files/folders, powered by just-bash . The shell API is available on tRPC router vfsShell : vfsShell.createSession({ cwd? }) → create a workspace-scoped shell sessionvfsShell.exec({ sessionId, command, timeoutMs? }) → run a bash commandvfsShell.session({ sessionId }) → get sessioncwd + expiryvfsShell.closeSession({ sessionId }) → close a session Implementation details: - Directory tree is bootstrapped from folders +files and cached in memory. - File contents are fetched lazily from the configured storage provider and cached. - All write operations ( rm ,mv , redirections, etc.) fail withEROFS (read-only filesystem). - Access is workspace-scoped and enforced by existing workspace membership checks. MIT
Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.
공유