Skip to content

📁Cloudflare R2 browser with pre-signed URIs, cached entirely by redis with a simple not-JS dependant UI.

Notifications You must be signed in to change notification settings

malwarepad/malwarepad-files

Repository files navigation

Introduction

For a while I was searching for a tool that would enable me to use a Cloudflare R2 bucket with pre-signed URLs for public file hosting with a decent amount of caching put in place to avoid overcharging... Well, I found nothing that suited my needs and made this thing...

Getting started

You can deploy this thing on Docker or standalone, nobody is there to stop you... However, some environment variables will have to be set up (either on a .env file or inside the docker-compose file)!

Variable Value Default
REDIS Your redis instance connection URI redis://127.0.0.1:6379
S3_ENDPOINT https://<accountid>.r2.cloudflarestorage.com none (required)
S3_ACCESS_KEY Cloudflare R2 Access key none (required)
S3_SECRET_KEY Cloudflare R2 Secret key none (required)
NEXT_PUBLIC_CDN Public access custom domain (for pre-signed URLs) none (required)
NEXT_PUBLIC_PASSWORD The password for any archives (public) none

Stack used

Software includes:

Microservices include:

Why is there no state management

I could've used tools like useContext() or even better Redux but this project is too simple to overcomplicate with that kind of utilities. In addition, some prop drilling that needed to be done enables server-side pre-rendering to happen more flawlessly resulting in partial support for Internet Explorer or even disabling JavaScript... Yes!

License

Take the code and do whatever you want with it. I don't care about this specific project enough to actually put a license on it. It's more of a simple production application to both suit my exact needs and serve as "showoff" to future employers.

About

📁Cloudflare R2 browser with pre-signed URIs, cached entirely by redis with a simple not-JS dependant UI.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published