All projects

Hackathon project · Team of three · front end and UX

Dosya Vadisi: File sharing encrypted in the browser

A file sharing app where files are encrypted in the browser before upload; I built the front end and user experience.

İbrahim TaşkıranDecember 20253 min read

Stack

JavaScriptSupabaseWeb Crypto API

The event

Team Bilişim Vadisi Pusu's table
Team Bilişim Vadisi Pusu's table

VADI Hackathon Series was a web technology competition; the jury looked at technical skill, innovation, feasibility and user-centred design. We entered as a team of three called Bilişim Vadisi Pusu and built Dosya Vadisi: a file storage and sharing app where files are encrypted in the browser before they reach the server.

The problem

In an ordinary upload the file reaches the server in the clear, and anyone with access to the server can read it. Strong encryption, on the other hand, usually wears the user out: key management, extra passwords, cryptic error messages. We wanted both: an app where the server never sees the contents and the user never has to think about it.

Sign-in screen
Sign-in screen

How the encryption works

My teammate built the encryption layer; since I built the interface on top of it, we designed the flow together from start to finish. Everything runs on the browser's own Web Crypto API:

  • On sign-up, each user gets an RSA-OAEP (2048-bit, SHA-256) key pair generated in the browser.
  • The private key never reaches the server in the clear: it is wrapped with AES-GCM-256 using a key derived from the user's password with PBKDF2, and stored that way.
  • Before upload, every file is encrypted with its own random AES-GCM-256 key and a fresh IV.
  • The file's AES key is encrypted with the owner's public key and stored next to the file. The server only ever sees the encrypted file and the encrypted key.

Sharing without uploading again

Sharing has a neat shortcut. When a file is shared with another user, the file itself is not touched; only its AES key is re-encrypted with the recipient's public key. Even a large file is shared instantly and the recipient opens it with their own private key. Shares can also have an expiry date, after which they close on their own.

Upload: the file is encrypted in the browser before it is sent
Upload: the file is encrypted in the browser before it is sent

My part: interface and experience

I built how this layer looks to the user. The goal was that the user never has to think about encryption:

  • Sign-in and sign-up: key generation and wrapping run quietly behind the sign-up step; the user only enters an email and a password.
  • Upload: files are dragged and dropped, shown in an upload queue and sent with "Encrypt and upload".
  • My files: files are grouped by type, with a switch between list and grid views.
  • Shared: files I shared and files shared with me are listed separately.
  • Home: cards for total files, sent and received shares and recent activity, the latest uploads and a file type chart built with Chart.js.
  • Every page uses a responsive layout and sidebar that also work on mobile.

I merged the team's changes through pull requests on GitHub.

Home: files and sharing at a glance
Home: files and sharing at a glance

Technical side

The work table
The work table
VADI Hackathon Series board
VADI Hackathon Series board

We used Supabase for authentication, the database and file storage; encrypted files live in Supabase Storage, and file and share records in the database. Because all encryption and decryption happens on the client, we did not need a separate application server.

Result

In a two-day event we delivered a working end-to-end product where users upload and share files without thinking about encryption. The source code is on GitHub.