A web application for creating and sharing encrypted secret messages with loved ones through link-based access and question verification.
My Secret allows users to create private vaults containing secret messages that can only be unlocked by answering two custom security questions. Each vault is accessible via a unique URL and tracks all unlock attempts with a built-in leaderboard system.
- Link-Based Access: Each vault generates a unique shareable URL
- Dual Question Security: Two custom security questions protect each message
- Attempt Tracking: Five attempts per unique name
- Leaderboard System: Track and display all unlock attempts with scores
- Multiple Unlocks: Different people can independently unlock the same vault
- Score Calculation: 100 points minus 20 points per failed attempt (minimum 20)
- Simple JSON Storage: No database required - uses file-based storage
- Backend: Go (Golang)
- Storage: JSON file-based persistence
- Frontend: Vanilla JavaScript, HTML5, CSS3
- Fonts: Libre Baskerville (serif), Courier New (monospace)
- Hosting: Railway.app (or any Go-compatible platform)
My.Secret/
├── main.go # Go server application
├── go.mod # Go module definition
├── go.sum # Go dependencies checksum
├── data.json # Storage file (auto-created)
├── .gitignore # Git ignore rules
└── static/ # Frontend assets
├── index.html # Homepage
├── create.html # Vault creation page
├── vault.html # Vault unlock page
└── style.css # Global stylesheet
- Go 1.21 or higher
- Modern web browser
- Clone or download the repository
- Navigate to project directory
- Run the application:
go run main.go- Open browser to
http://localhost:3000
The application uses the PORT environment variable. If not set, defaults to port 3000.
- Push code to GitHub repository
- Connect repository to Railway
- Railway auto-detects Go application
- Application deploys automatically
- Access via generated Railway URL
PORT: Server port (automatically set by hosting platform)
- Navigate to the homepage
- Click "Create Secret"
- Enter two security questions and answers
- Write your secret message
- Click "Create Secret"
- Copy the generated unique URL
- Share URL with intended recipient
- Open the shared vault URL
- Enter your name
- Answer the two security questions
- View the secret message upon success
- Check the leaderboard to see all attempts
- Displays all unlock attempts
- Shows success/failure status
- Displays scores (100 to 20 points)
- Accessible before or after attempting unlock
- Groups by name (shows best attempt per person)
- Case-insensitive answer matching
- Answer trimming (removes extra spaces)
- Five attempts per unique name
- Failed attempts are logged
- Copy-paste prevention on answer fields
POST /api/create- Create new vaultGET /api/vault/{id}- Retrieve vault questionsGET /api/check-attempts- Check remaining attemptsPOST /api/unlock- Attempt to unlock vaultGET /api/leaderboard- Retrieve attempt historyGET /health- Health check endpoint
The application uses a minimalist aesthetic inspired by vintage typography and stationery design:
- Serif fonts for romantic elements
- Monospace fonts for functional elements
- Black borders and cream backgrounds
- Clean, uncluttered interface
- Professional appearance without excessive decoration
All data is stored in data.json in the project root:
- Vault information (questions, answers, letters)
- Attempt history (names, scores, timestamps)
- Automatic save on each operation
To backup your data, simply copy the data.json file. To restore, replace the file and restart the application.
- Chrome/Edge (latest)
- Firefox (latest)
- Safari (latest)
- Opera (latest)
This project is provided as-is for personal use.
This is a personal project. Feel free to fork and modify for your own use.
For issues or questions, please refer to the deployment platform's documentation or Go language resources.