A secure platform for sharing sensitive information with database encryption, automatic expiration, and view limits. Built with Nuxt.js 3 for the frontend and Go for the backend.
- Database Encryption: All secrets are encrypted before storage
- Auto-Expiration: Set expiration times (5 minutes to 7 days)
- View Limits: Control how many times your secret can be viewed
- Password Protection: Additional security layer with password protection
- Modern UI: Responsive design with dark mode and animations
- Secure Backend: Built with Go and PostgreSQL for robust data handling
- Modern, responsive UI built with Nuxt.js 3
- TailwindCSS for styling
- Dark mode support
- Animated components
- Form validation
- Clipboard integration
- Error handling and notifications
- RESTful API built with Gin framework
- PostgreSQL database with migrations
- Secure password hashing
- Automatic cleanup of expired secrets
- Health check endpoints
- Structured logging with Zap
- Dependency injection with Uber FX
- Node.js (v22.9.0 or later)
- Go (v1.23.4 or later)
- Docker and Docker Compose
- PostgreSQL (v17.0 or later)
- Clone the repository:
git clone https://github.com/cksidharthan/ghost-send.git
cd ghost-send
- Set up environment variables:
# Frontend (.env)
GHOST_SEND_API_URL=http://localhost:7780
# Backend (.env)
POSTGRES_HOST=localhost
POSTGRES_PORT=5433
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=secret
POSTGRES_SSL_MODE=disable
PORT=7780
- Start the development environment:
# Using Docker Compose
docker-compose -f deploy/docker-compose.yaml up -d
# Or start services individually:
# Frontend
cd frontend
npm install
npm run dev
# Backend
cd backend
go mod download
go run main.go
The application will be available at:
- Frontend: http://localhost:9090
- Backend: http://localhost:7780
- PostgreSQL: localhost:5433
nuxt.config.ts
: Nuxt.js configuration with the following modules:@nuxt/ui
@nuxtjs/tailwindcss
@nuxtjs/color-mode
@nuxt/icon
@nuxt/image
- Environment variables:
GHOST_SEND_API_URL
: Backend API URL
- Database migrations in
backend/db/migrations
- Environment variables:
POSTGRES_*
: Database configurationPORT
: API portLOG_LEVEL
: Logging levelMIGRATION_PATH
: Path to database migrations
The project includes Docker configurations for easy deployment:
docker-compose -f deploy/docker-compose.yaml up -d
This will start:
- PostgreSQL database (port 5433)
- Backend API service (port 7780)
- Frontend application (port 9090)
# Frontend
cd frontend
npm run build
# Backend
cd backend
go build -o secret main.go
-
Database Security
- Encrypted secret storage in PostgreSQL database
- Automatic cleanup of expired secrets
- Password hashing with bcrypt
- Secure salt generation
-
API Security
- CORS protection
- Input validation
- Error handling
- Secure password verification
-
Frontend Security
- XSS protection
- Secure password handling
- Client-side validation
- Secure clipboard operations
GET /healthz
: Health check endpointPOST /secrets
: Create a new secret- Parameters:
secret_text
: The text to encryptpassword
: Access passwordexpires_at
: Expiration timeviews
: Number of allowed views
- Parameters:
GET /secrets/:id
: Retrieve a secret- Parameters:
id
: Secret UUIDpassword
: Access password
- Parameters:
GET /secrets/:id/status
: Check secret status- Parameters:
id
: Secret UUID
- Parameters:
/
: Home page with secret creation form/access/:id
: Secret access page/about
: About page with feature information
cmd/
: Application entry pointpkg/
: Main application packagesdb/
: Database migrations and queriesdeploy/
: Deployment configurations
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.