maintained by: @dkxero
An OpenCode and Claude AI vibe coded image gallery demo that can be deployed to Akash Network via dKloud's KloudDeploy platform. This application reads and writes images on STORJ via S3 compatible APIs. All functions are protected by Supabase Auth. The application is designed to be further optimized and protected by Cloudflare's CDN and DDOS protection. While for demo purposes, this code base does not utilize an actual database, in a production scenario, it should be and users can either choose to use Supabase or one of the hyperscaler alternatives.
This demo is to show how one can effortlessly leverage a HYBRID CLOUD INFRASTRUCTURE THAT INCLUDES DePIN to get the best performance/features while saving on cost compared to using a single hyperscaler exclusively.
Feel free to use this repo to test things out yourself.
- ✅ Cloudflare DNS validation: More reliable than HTTP validation
- ✅ No public HTTP access required: Works even if ports aren't accessible yet
- ✅ Automatic Let's Encrypt certificate generation
- ✅ Automatic certificate renewal
- ✅ Real visitor IP detection through Cloudflare
- ✅ Nginx reverse proxy with security headers
- ✅ HTTP to HTTPS redirects
- ✅ Rate limiting for API endpoints
- Clone this repo and cd into demo-storj
- cp .env-example .env
- Signup for an account at Cloudflare and transfer your domain's DNS to it
- Signup for an account at Storj and then create a project and bucket
- Signup for an account on Supabase and then create a new org and project
- In your Supabase project, go to Authentication > URL Configuration and add these redirect URLs:
- https://yourdomain.com/auth/callback - For production
- https://localhost/auth/callback - For testing before pushing image
- http://localhost:3001/auth/callback - For Dev
- cp .env-example .env and fill in the .env file.
* For building and testing, leave ENABLE_SSL and LETSENCRYPT to use the defaults. You will get a chance to specify this in the real deployment later
-
./start.sh (Alternatively, if you want to skip the testing, you can just run ./build.sh and jump to step 10)
-
Go to https://localhost to make sure the application is working properly (Self-signed Cert - Browser will complain)
-
docker tag demo-storj_storj-gallery:latest <registry url of choice between GitLab, Github, and DockerHub + image name:version>
- registry url version of the image example: https://registry.gitlab.com/dkxero/demo-storj/app:v0.01
-
Push the container image built to registry: docker push <registry version of the image>
-
Create LaunchPack on KloudDeploy (currently only available to dKloud Insiders). Be sure you put in all the variables in your .env into the environment variables in the LaunchPack and then adjust them for your production use case.
* There are two types of Akash deployments you can define in your LaunchPack.
** For more information on creating a LaunchPack on KloudDeploy, check out our documentation
-
Create Deployment on KloudDeploy (currently only available to dKloud Insiders)
* For more information on creating a deployment on KloudDeploy, check out our documentation
** Alternatively, use github actions to auto deploy the container via KloudDeploy in a real life scenario using kdctl.
-
Grab the IP from KloudDeploy and create an A record in Cloudflare DNS.
You are all set! You should now see this app running at https://yourdomain.com
- For detailed Cloudflare DNS setup instructions, see CLOUDFLARE-SSL-GUIDE.md
- For detailed SSL Setup context, see SSL-SETUP.md
- For detailed Definition of the monolithic container setup, see MONOLITH.md
- For notes on how to do local development of this project, see DEVELOPMENT.md
- For more information on KloudDeploy, see our documentation
To clean up your environment before you do a fresh build:
This script stops and removes the container and then removes the image built.
THIS IS SOFTWARE THAT HAS NOT BEEN PROPERLY TESTED FOR PRODUCTION USE. IT IS ONLY MEANT TO BE A DEMO.
This repo is sponsored by dKloud. dKloud and its community of volunteers in no way make any guarantees. Please use at your own risk!
To Learn more, please visit:
.png)




