Skip to content

giga89/memento-legacy

Repository files navigation

🕊️ Memento Legacy

Memento Legacy is a robust "Dead Man's Switch" web application designed to ensure your digital legacy lives on. If you fail to "check in" (send a heartbeat) within a specified timeframe, the system automatically releases your pre-configured messages to your chosen recipients.

Key features include Solana Blockchain integration for immutable, censorship-resistant message storage and Military-grade Encryption.


✨ Key Features

  • ⏱️ Dead Man's Switch: A timer resets every time you confirm you are "alive". If it hits zero, your messages are sent.
  • 🔗 Solana Blockchain Storage: Optionally store critical messages on the Solana Blockchain (Testnet/Mainnet). These messages are permanent and immutable.
  • 🔐 End-to-End Encryption: Blockchain messages are encrypted using AES-256 before being uploaded. Recipients receive a special key to decrypt them.
  • 📧 Automated Emails: Messages are delivered via email with verification details.
  • 📊 Observability Stack: Built-in monitoring with Grafana, Loki, and Promtail.

🚀 Getting Started

Prerequisites

  • Docker and Docker Compose installed on your machine.
  • A Solana Wallet (auto-generated by the app if missing).
  • An SMTP Email Account (e.g., Gmail App Password) for sending notifications.

1. Configuration

Copy the example environment file and configure your credentials.

cp .env.example .env

Edit .env and fill in your details:

  • MEMENTO_EMAIL_USER / PASS: Your SMTP credentials.
  • JWT_SECRET_KEY: A secure random string.
  • SOLANA_RPC_URL: (Optional) Defaults to Testnet.

2. Run with Docker 🐳

The entire stack (Backend, Database, Frontend, Logging) is containerized.

docker compose up -d --build

This will start:

  • Backend API: http://localhost:5000
  • Frontend App: http://localhost:8080/index.html
  • Decryption Tool: http://localhost:8080/decrypt.html
  • Grafana Dashboard: http://localhost:3000

📖 User Guide

1. Registration & Setup

  1. Go to http://localhost:8080/index.html.
  2. Register a new account.
  3. Check your email for the Verification Code and enter it to activate your account.

2. The Dashboard

Once logged in, you will see your Countdown Timer.

  • "I'M ALIVE": Click this button to reset your timer (Default: 48 hours).
  • Simulation Mode: Toggle this to shrink the timer to 60 seconds for testing purposes.

3. Creating a Legacy Message

  1. Click "New Message".
  2. Recipient: The email address of the person who should receive this.
  3. Message: The content you want to send.
  4. Blockchain Option:
    • Check "Save to Blockchain" to permanently store the hash/content on Solana.
    • You can choose "Blockchain Content Only" to send just the transaction link via email, keeping the text secret until decrypted.

⛓️ Blockchain & Verification

When a message is stored on the blockchain:

  1. The content is encrypted.
  2. The encrypted data is stored in the "Memo" field of a Solana transaction.
  3. The Transaction Signature (tx_sig) is saved.

How to Verify/Decrypt

If a recipient receives a blockchain message, they get a Transaction ID and a Password.

  1. Go to the Decryption Tool: http://localhost:8080/decrypt.html
  2. Enter the Transaction Signature.
  3. Enter the Password.
  4. Click Decrypt. The app fetches the data directly from the Solana Blockchain and decrypts it locally in the browser.

🔍 Logs & Monitoring

Memento Legacy includes a full observability stack using Grafana, Loki, and Promtail.

Accessing Logs

  1. Open Grafana: http://localhost:3000
  2. Login: admin / admin (or password defined in docker-compose).
  3. Go to Explore (Compass icon).
  4. Select Loki as the data source.
  5. Query logs for the backend:
    {container_name="memento_backend"}
    

Important Events to Monitor

The application logs structured JSON events for key actions:

  • switch_triggered: The timer hit zero; messages are being sent.
  • heartbeat_received: User checked in.
  • blockchain_publish_success: Data successfully written to Solana.
  • user_registered / login_success.

🛠️ Troubleshooting

  • Server not accessible? Ensure all containers are running:
    docker ps
  • Emails not sending? Check your SMTP settings in .env. If using Gmail, ensure you are using an App Password, not your main password.
  • Blockchain errors? Ensure you have SOL in your wallet. The app auto-creates a wallet.json.
    1. Check address: curl http://localhost:5000/api/blockchain/wallet
    2. Airdrop devnet/testnet SOL to that address.

Made with ❤️ by the Memento Team.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors