VaultX is a REST API for sharing text, code snippets, and links between devices without creating an account.
Why I built it
Sometimes I just need to move a code snippet from my laptop to my phone. I didn't want to create an account or leave temporary information sitting around indefinitely, so I built VaultX. Expiry times, view limits, and optional passwords are part of the design rather than features added as an afterthought.
| Year | 2025 |
| Type | Backend / API |
| Client | Personal project |
| My role | Backend engineering, API design, documentation |
| Platform | Backend API |
Shared items can have expiration times, view limits, and optional password protection. The API is designed around temporary access rather than permanent storage.
0
accounts required
100 KB
maximum clip payload
Redis + memory
hybrid storage strategy
Challenge
The main challenge was managing temporary data across in-memory storage and Redis while accounting for Redis outages, server restarts, and the different guarantees each storage layer provides.
Action
Hybrid in-memory and Redis storage
I implemented reads that check in-memory storage before falling back to Redis. The fallback allows the API to continue operating when Redis is unavailable, with the explicit trade-off that memory-only data may be lost on restart.
Validation and access controls
I added Helmet security headers, bcrypt password hashing, Zod input validation, a 100 KB content limit, CORS configuration, and cleanup for expired items.
Predictable API behaviour
I standardized JSON error responses, added health-check endpoints and access tracking, and used Node.js crypto utilities to generate tokens.
Result
VaultX gave me hands-on experience with API design, temporary data lifecycles, validation, and storage failure trade-offs. It also helped me think more carefully about the difference between adding security features and guaranteeing security.