SBucket is a minimal, self-hosted object storage backend similar to Amazon S3, built using Go, Fiber, and MinIO. It supports user-authenticated file upload, download, listing, and signed URL access.
- 🔐 User Authentication (JWT-based)
- 📁 Create Buckets (per user)
- 📤 File Uploads via API or Presigned URLs
- 📥 Secure File Downloads
- 📜 File Listing (per bucket)
- 🔗 Signed Upload/Download URLs
- 🐳 MinIO Integration (S3-compatible local storage)
- 🛡️ Secure, Fast, and Clean Architecture
- Go (Golang)
- Fiber Web Framework
- MinIO (S3-compatible object store)
- GORM (PostgreSQL or SQLite)
- JWT Authentication
- Docker (optional)
sbucket/
├── main.go
├── go.mod
├── internal/
│ ├── api/
│ │ └── handler/
│ ├── db/
│ ├── model/
│ └── storage/
└── uploads/ (local or MinIO backend)
Download and install Go for your platform.
git clone https://github.com/code-cults/sbucket.git
cd sbucket
docker run -p 9000:9000 -p 9001:9001 \
-e "MINIO_ROOT_USER=admin" \
-e "MINIO_ROOT_PASSWORD=admin123" \
-v /data:/data \
minio/minio server /data --console-address ":9001"
Access MinIO Console at: http://localhost:9001
Create a bucket: sbucket
go run cmd/main.go
Server will run at http://localhost:3000
.
/api/auth/signup
- Create account/api/auth/login
- Get JWT token- Add
Authorization: Bearer <token>
to all protected requests
Method | Endpoint | Description |
---|---|---|
POST | /bucket |
Create bucket |
POST | /bucket/:id/upload |
Upload file |
GET | /bucket/:id/files |
List files in bucket |
GET | /bucket/:id/file/:filename |
Download file |
GET | /bucket/:id/file/:filename/signed |
Get signed download URL |
GET | /bucket/:id/upload-url/:filename |
Get signed upload URL |
- 🔁 File versioning
- 📊 Storage quota per user
- 🌐 Frontend React UI (planned)
- 🧪 Unit & integration tests
PRs welcome! File issues or ideas to improve. Just Mail Creator for your concerns and cool ideas.
Made with ⚡ and ❤️ by [code.cults]