8000 GitHub - yerofey/api.secred.link: API for secred.link app - a secure, self-destructing secret sharing service
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

yerofey/api.secred.link

Repository files navigation

api.secred.link

License: MIT

The backend API for secred.link app - a secure, self-destructing secret sharing service

🌐 Visit secred.link | Frontend Repository

Overview

This is the backend service powering secred.link, a secure platform for sharing sensitive information. It provides a RESTful API for creating, retrieving, and managing self-destructing secrets.

Features

  • 🔒 Secure secret sharing with encryption
  • ⏱️ Configurable expiration times
  • 🔥 Burn-on-read functionality
  • 🚀 High-performance Fastify-based API
  • 🛡️ Built-in rate limiting and security headers
  • 📊 Usage metrics and analytics

Prerequisites

  • Node.js
  • MongoDB database
  • pnpm package manager

Installation

  1. Clone the repository:
git clone https://github.com/yerofey/api.secred.link.git
cd api.secred.link
  1. Install dependencies:
pnpm install
  1. Create a .env file with the following variables:
PORT=3000
MONGODB_URI=your_mongodb_connection_string
DB_COLLECTION_SECRETS=secrets
DB_COLLECTION_COUNTERS=counters

Development

Start the development server:

pnpm dev

Production

Deploy using PM2:

pnpm start

API Documentation

Create a Secret

POST /secret/create

Creates a new secret with the following properties:

  • content: The secret content
  • is_protected: Boolean indicating if the secret is password protected
  • is_burnable: Boolean indicating if the secret should be deleted after reading
  • expires_at: ISO date string for secret expiration

Retrieve a Secret

GET /secret/get/:accessKey

Retrieves a secret using its access key.

Delete a Secret

DELETE /secret/delete/:accessKey/:manageKey

Deletes a secret using its access key and management key.

Get Metrics

GET /data/metrics

Returns usage statistics and metrics.

Security Features

  • Rate limiting (100 requests per minute)
  • CORS protection
  • Security headers via Helmet
  • Input validation
  • Automatic JSON parsing

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Yerofey S. pm@yerofey.dev (https://github.com/yerofey)

About

API for secred.link app - a secure, self-destructing secret sharing service

Resources

License

Stars

Watchers

Forks

0