Skip to content

thozoz/GoBox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoBox

Secure, self-hostable file storage — Go API + React UI.

GoBox is a small file-storage service: users register, upload files under a per-user quota, and download them through short-lived, owner-scoped presigned URLs. Files live in S3-compatible object storage (MinIO) and metadata in PostgreSQL. The whole thing is a lightweight Go backend with a React dashboard.

Monorepo layout

gobox/
├── backend/    # Go (Fiber) API — auth, quotas, MinIO/S3, PostgreSQL
└── frontend/   # React + Vite dashboard

Highlights

  • JWT auth with bcrypt-hashed passwords
  • Per-user quota (1 GB total) + an 85 MB per-file limit (safe under Cloudflare-tunnel request caps)
  • Zero-trust file access — no public URLs; downloads via 15-minute presigned links scoped to the owner
  • Consistent storage — quota is computed live from file records (no drifting counter); an object is removed from MinIO if its DB write fails
  • Rate-limited auth/auth is throttled per IP against brute force
  • Ephemeral storage — objects auto-expire after 24h (MinIO lifecycle), and a background job prunes the matching DB rows

Tech stack

Layer Tech
Backend Go 1.25 · Fiber v2 · pgx v5 · minio-go v7 · golang-jwt
Storage MinIO (S3-compatible) · PostgreSQL
Frontend React 19 · Vite · Tailwind CSS

Requirements & deployment

The backend, the frontend, and its dependencies are deployed independently — this repo bundles none of them:

  • PostgreSQL and an S3-compatible object store (MinIO, AWS S3, …) are external services; point the .env URLs at your own managed/hosted instances.
  • The frontend is a static build that can be hosted anywhere (Vercel, Netlify, a static bucket).
  • Run the backend behind a TLS-terminating reverse proxy (Caddy, nginx, Cloudflare Tunnel) in production.

Quick start

For local development, point the backend .env at any PostgreSQL and S3-compatible endpoint you have access to.

Backend

cd backend
cp .env.example .env      # fill in MinIO + PostgreSQL + JWT_SECRET
go run .

Frontend

cd frontend
npm install
npm run dev

See backend/README.md for full API and configuration docs.

License

MIT © thozoz

About

Secure, self-hostable file storage — Go (Fiber) API + React dashboard. JWT auth, per-user quota, MinIO/S3, PostgreSQL, presigned URLs.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors