← Back to Projects

nest.rip

View Project

nest.rip is my file-uploading site. It started off as a simple screenshot hosting service in 2022, but has since evolved into a full-fledged file hosting service, with over 500K uploaded files. It is fully written by me, the backend, frontend and everything in between! Our main selling point is the huge amount of domains (currently ~45) we have, allowing users to customize their url to any occasion.

The homepage, showing a graph of uploads, a message of the day and some stats.
The homepage, showing a graph of uploads, a message of the day and some stats.
The files sub-page, showing recent uploads and some statistics.
The files sub-page, showing recent uploads and some statistics.
The admin panel, showing a graph of user registrations and extra actions.
The admin panel, showing a graph of user registrations and extra actions.
My profile page, showing some customization options users have.
My profile page, showing some customization options users have.
Grafana dashboard, showing user activity exported from backend.
Grafana dashboard, showing user activity exported from backend.
Our main MinIO Grafana dashboard, showing ingress and storage used.
Our main MinIO Grafana dashboard, showing ingress and storage used.
The backend repository on GitHub, showing contributions and languages used.
The backend repository on GitHub, showing contributions and languages used.

So how does this all work? Let me break it down piece by piece.

Backend

The backend is written in Go, using the Gofiber http framework. It is responsible for handling file uploading, user authentication, and has the final say in all operations. Authentication works using JWT tokens, and even has support for WebAuthn. The backend also has a lot of extra features, such as a notification system, file expiration, creating extra versions of files (ffmpeg) and a lot more. To allow users to create their own applications consuming the API, I also implemented OAuth 2 and OpenAPI documentation. Data is stored in a PostgresSQL database, and files are stored on a MinIO instance. Redis is used for caching and background jobs, and Grafana is used for monitoring the backend and MinIO. Emails are sent using Postmark who have graciously provided their services for free to us.

Since storage is expensive, and files get stale after a while, they are automatically moved to a “cold storage” MinIO instance after 30 days. This cold storage is running on HDD’s causing it to be much cheaper, but also slower. This allows us to keep files indefinitely without breaking the bank, while still keeping recent files on fast storage. To manage the huge amount of domains we have, the backend automatically provisions new domains using Cloudflare’s API, and removes them when they are no longer needed. Nest’s backend is hosted on a self-hosted Coolify using Docker Compose.

Frontend

The frontend is written in Next.JS using the Mantine ui framework. It is responsible for showing the user all the data and allowing them to interact with it. It communicates with the backend using a rest api, and leaves all the logic to the backend. For additional styles TailwindCSS is used, allowing quick and easy styling. The frontend also has some extra features, like customizable profiles, leaderboards and a lot more. It is also self-hosted on Coolify using Docker Compose.

Mail

On top of all of that, we also have our own mail server. This is an extra feature for paying users, allowing them to create mail aliases with our selection of domains. This is powered by Mailcow, which is a free and open-source mail server. The backend automatically creates and removes mail aliases using Mailcows API.