Because why pay AWS when you can duct-tape Google Drive into an object store like a real dev™️
This is a budget S3 clone. No EC2. No S3. No AWS bill. Just your free Google Drive account, Express, and vibes.
- ☕ Login with Google because we’re too lazy to build our own auth
- 📁 Buckets that are actually Drive folders but we lie to ourselves
- 🕵️♂️ Encrypted filenames so you feel hacker-y
- 📤 Uploads that work... mostly
- 🎬 Stream files like it's Netflix (but for PNGs)
- 🔗 Public URLs with expiration — like Snapchat, but for files
- 🧹 DELETE endpoints for when you rage quit your project
- Node.js + Express.js
- Google Drive API (a blessing and a curse)
- MongoDB for "serious persistence™"
- Multer — the least painful way to upload files in Express
- OAuth2 because we love complicated flows for simple problems
| Method | Endpoint | Does What |
|---|---|---|
| GET | /oauth/login |
Yeets you to Google login |
| GET | /oauth/callback |
Google yeets you back here |
Returns { accessToken: "✨magic✨" }
| Method | Route | Meaning |
|---|---|---|
| PUT | /:bucketName |
Creates a fake S3 bucket |
| PATCH | /:bucketName/visibility |
Toggles public/private drama |
| GET | /:bucketName |
Lists files like a nosy friend |
| DELETE | /:bucketName |
Destroys your dreams and files |
| Method | Route | Functionality |
|---|---|---|
| PUT | /:bucketName/:fileName |
Upload file with secret name |
| GET | /:bucketName/:fileName |
Streams file like a cool kid |
| DELETE | /:bucketName/:fileName |
Deletes it like an ex's photo |
| Method | Route | What it Does |
|---|---|---|
| POST | /presign/:bucketName/:fileName |
Makes your file famous (temporarily) |
| DELETE | /presign/:bucketName/:fileName |
Takes the fame away |
| GET | /public/:bucketName/:fileName |
Anyone can see it (S3-style 🔓) |
📝 Add ?token=xyz for private links
📥 Add ?download=true if you're too good to stream
git clone https://github.com/your-name/woji-s3.git
cd woji-s3npm installPORT=8000
MONGODB_URI=mongodb://localhost:27017/woji-s3
GOOGLE_CLIENT_ID=google-scammed-you
GOOGLE_CLIENT_SECRET=top-secret
GOOGLE_REDIRECT_URI=http://localhost:8000/oauth/callbacknpm run devOr if you like living dangerously:
node index.js- Open browser →
http://localhost:8000/oauth/login - Login with Google → get
accessToken - Make API calls like a pro:
Authorization: Bearer your-token
.
├── routes/
│ ├── file.js // all your bucket dreams
│ └── oauth.js // where the Google magic happens
├── models/
│ ├── Bucket.js
│ ├── File.js
│ └── User.js
├── services/
│ └── drive.js // how the files get into Drive 🪄
├── utils/
│ ├── googleAuth.js // auto-refresh fairy
│ └── filename.js // encryption voodoo
├── middlewares/
│ └── auth.js // bearer of tokens
├── uploads/ // temporary chaos
├── index.js
└── .env
- 🧊 File versioning like Git, but worse
- 🗑 Trash can for when you accidentally delete
final_final_v2_REAL.png - 🎨 Admin panel for your inner UI designer
- 🛡 Token expiration timers that actually expire
- 📊 Analytics for bragging to your team
Because someone told me to.
MIT License
Copyright (c) 2025
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
If AWS S3 and Google Drive had a child raised by Node.js devs with caffeine addiction, this would be it.
PRs welcome. Bugs expected. Fun guaranteed. 🎉