T-Vault is a minimalist Next.js web app that enables quick, no-login sharing of text and URLs via unique keys. Perfect for passing code snippets, notes, or short links between devicesβespecially useful in exam scenarios or when you need fast cross-device access. All data is stored in Redis Cloud and automatically expires after 24 hours.
π Live Demo: https://tvault.mahs.me
π¦ Repository: github.com/yellareddymaheshreddy/tvault
π API Docs: API.md
- Text Vault: Save and retrieve plain text snippets with a custom key
- URL Shortener: Generate short links with optional custom aliases and QR codes
- No Authentication: Zero signup, no passwords, no tracking
- Auto-Expiration: All data deleted after ~24 hours
- Keyboard Shortcuts: Power-user friendly (Ctrl+K, Ctrl+S, Ctrl+R, etc.)
- Accessible & Responsive: Works on any device, optimized for mobile and desktop
TVault is available wherever you work. Choose the interface that fits your workflow:
| Platform | π Web App | π» CLI Tool | π± Mobile App |
|---|---|---|---|
| Best For | Quick sharing (No install) | Developers & Terminal usage | On-the-go access |
| Interface | Next.js Website | Command Line | React Native (Expo) |
| Install | None | npm i -g tvault-cli |
Download / Clone |
| Link | Launch Web | View CLI Repo | View App Repo |
The official command-line interface for TVault.
Installation:
npm i -g tvault-cliUsage:
tvault shorten <url> # Shorten a URL
tvault store "hello" # Store text securely
tvault get <key> # Retrieve dataThe official React Native client (Expo) for Android and iOS.
- Features: Anonymous storage, Auto-expiry, QR Code support.
- Tech Stack: React Native, Expo, NativeWind.
- Node.js (v18 or newer recommended)
- Redis Cloud account (free tier works great) or local Redis instance
-
Clone the repository:
git clone https://github.com/yellareddymaheshreddy/tvault.git cd tvault -
Install dependencies:
npm install # or pnpm install # or yarn install
-
Configure Redis: Create a
.env.localfile at the project root:REDIS_URL=redis://default:yourpassword@your-redis-host:port
Replace with your Redis Cloud connection string or local Redis URL.
-
Run the development server:
npm run dev
Open http://localhost:3000 in your browser.
-
Build for production:
npm run build npm run start
tvault/
βββ app/
β βββ page.tsx # Main landing page (text vault + URL shortener)
β βββ layout.tsx # Site-wide layout with nav and footer
β βββ privacy/page.tsx # Privacy policy
β βββ terms/page.tsx # Terms of service
β βββ settings/page.tsx # About & settings page
β βββ api/
β β βββ text/route.ts # POST & GET endpoints for text vault
β β βββ shorten/route.ts # POST endpoint to shorten URLs
β β βββ t/[id]/route.ts # Retrieve text via /api/t/:id
β βββ u/[id]/route.ts # Redirect to original URL via /u/:id
βββ components/
β βββ ui/ # Reusable UI components (Button, Card, etc.)
β βββ copy-button.tsx # One-click copy to clipboard
β βββ keyboard-shortcuts.tsx # Modal with keyboard shortcuts
βββ lib/
β βββ redis.ts # Redis client setup
β βββ utils.ts # Utility functions (cn, etc.)
βββ public/
βββ robots.txt
βββ sitemap.xml
Store text:
curl -X POST http://localhost:3000/api/text \
-H "Content-Type: application/json" \
-d '{"key":"mykey","text":"Hello World"}'Retrieve text:
curl http://localhost:3000/api/text?key=mykey
# or via the short alias:
curl http://localhost:3000/api/t/mykeyShorten a URL:
curl -X POST http://localhost:3000/api/shorten \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/very/long/path","key":"short"}'Returns {"code":"short"} if custom key provided, or auto-generated code.
Access the short URL:
http://localhost:3000/u/short
Redirects to the original URL.
Press Ctrl+? (or Ctrl+/) to view all shortcuts:
| Shortcut | Action |
|---|---|
| Ctrl+K | Focus storage key input |
| Ctrl+S | Save text |
| Ctrl+R | Retrieve text |
| Ctrl+L | Shorten URL |
| Ctrl+1 | Switch to Text Vault tab |
| Ctrl+2 | Switch to URL Shortener tab |
| Esc | Close dialogs |
- Privacy Policy: /privacy β Details how data is stored and auto-deleted.
- Terms of Service: /terms β Guidelines for acceptable use.
β οΈ Important: Data is stored in plain text on Redis Cloud. Do not store passwords, personal information, or anything sensitive.
Contributions are welcome! Feel free to:
- Open an issue for bugs or feature requests
- Submit a pull request with improvements or fixes
- Share feedback and ideas
This project is open-source and available under the MIT License.
- GitHub Issues: github.com/yellareddymaheshreddy/tvault/issues
- Author: Mahesh Reddy
Built with Next.js, Redis, and shadcn/ui. Designed for speed and simplicity.