OTI: A Secure, Single-Use Secret Sharing Solution

Developer Oguzhan Krcb has introduced OTI, a new open-source project designed for securely sharing messages or small text files via a link that can only be accessed once. This initiative, built with AdonisJS 6, aims to provide a useful tool for developers while serving as a learning platform for Krcb in AdonisJS and browser encryption techniques. The core principle of OTI is to keep sensitive data out of server reach, encrypting it directly in the user's browser. The server merely stores the encrypted payload, with the decryption key embedded within the shareable link itself. This architecture ensures that even if the server's data were compromised, the secrets would remain unreadable without the private key, which is never transmitted to the server.

The project has seen recent updates that significantly enhance its usability and security. A new confirmation step has been introduced before a secret is revealed. This prevents accidental decryption and exposure through chat link previews, which often pre-fetch URLs. The secret is only truly revealed and consumed upon a genuine user interaction. Following this single viewing, the secret is automatically removed from the system. This ensures the 'one-time' nature of the sharing mechanism is strictly enforced.

Key Features and Technical Stack

OTI is not just a basic secret sharing tool; it incorporates several advanced features. Users can protect their secrets with an additional password, adding a layer of defense against unauthorized access. For sharing, the application provides QR code generation, facilitating easy sharing on mobile devices or in person. The platform supports encrypted .txt file uploads, with a current limit of 100 KB, making it suitable for small configuration files or snippets. A creator receipt page offers a dedicated space for the sender to track their shared secrets. Furthermore, an expiry countdown feature allows senders to set a time limit for the secret's availability, adding another dimension of control.

The technical foundation of OTI is built upon a modern stack. AdonisJS 6, the backend framework, provides a robust and scalable environment for handling API requests and data management. TypeScript is used for enhanced code quality and maintainability, offering static typing benefits. For data persistence, OTI utilizes MySQL as its primary database and Redis for caching and session management, ensuring efficient data retrieval and storage. The frontend is powered by Vite, a next-generation frontend tooling solution known for its speed, and the Edge templating engine is used for server-side rendering of dynamic content. The entire project is open-source under the permissive MIT license, encouraging adoption and contribution from the developer community.

AdonisJS 6 logo alongside OTI project branding

Development Process and AI Assistance

Krcb detailed the development process, noting the use of an AI coding assistant. This AI tool played a role in generating code snippets, assisting with code review, standardizing formatting, and even drafting documentation. However, Krcb emphasizes that the architectural design and all final decisions remained under his purview. This hybrid approach, combining human oversight with AI augmentation, allowed for rapid development while maintaining control over the project's integrity and direction. The AI's contribution was primarily in accelerating common coding tasks, freeing Krcb to focus on the unique challenges and design aspects of OTI.

The decision to build a one-time secret sharing app stems from a common need for temporary, secure communication channels. Traditional methods often involve email or messaging apps where message history can persist, or where end-to-end encryption is not guaranteed or easily implemented. OTI addresses this by providing a solution that is both simple to use and technically robust in its security model. The browser-based encryption means that the server never sees the plaintext, a critical distinction for highly sensitive information. The link-based key distribution, while requiring careful handling by the user, is a proven method for secure, ephemeral data sharing.

Implications and Future Potential

The open-source nature of OTI, coupled with its modern tech stack, makes it an attractive project for developers looking to understand AdonisJS 6 or secure web application patterns. Its MIT license ensures broad usability for personal, educational, or commercial purposes. The project's modular design, leveraging services like Redis and MySQL, also provides a good example of a scalable web application architecture. As Krcb continues to refine OTI, further features could include support for larger file sizes, integration with decentralized storage solutions, or more sophisticated key management options. The current implementation offers a solid foundation for such expansions.

The introduction of features like password protection and expiry countdown elevates OTI beyond a simple proof-of-concept. These additions cater to more demanding use cases where granular control over access and availability is paramount. The confirmation button, a subtle but important UX improvement, demonstrates a thoughtful approach to preventing data leakage in everyday digital communication workflows. For developers seeking to implement similar secure sharing functionalities, OTI serves as a valuable reference implementation.

The project's commitment to browser-side encryption and minimal server-side storage is a critical security posture that aligns with modern privacy-conscious development. This model significantly reduces the attack surface and the potential impact of server breaches. It's a pattern that more applications dealing with sensitive user data could adopt. The success of OTI will likely depend on community adoption and contributions, further solidifying its place as a useful open-source utility.