Skip to content

Multi-region event monitoring system with 12ms response time across 8 regions

Notifications You must be signed in to change notification settings

emptycharacter/anchorlog

Repository files navigation

⚓ AnchorLog

Immutable observability for modern applications

Event logging where critical events automatically get blockchain timestamps via Sui, giving you cryptographic proof that nobody can dispute.


What Is This?

AnchorLog solves the trust problem with logs. During audits or disputes, logs in your database can't be trusted—you control them, you could change them. AnchorLog automatically batches critical events to Sui blockchain every 10 minutes, creating permanent cryptographic proof.

Built for: [Hackathon Name] | Domain: anchorlog.org | Status: Day 1 MVP


Features

  • Event Logging - Fast PostgreSQL storage for all events
  • Blockchain Anchoring - Critical events batched to Sui every 10 min
  • Cryptographic Proofs - Merkle tree verification anyone can check
  • Public Verification - Share proof links (no login required)
  • Real-time Dashboard - Live event streaming + analytics
  • Dogfooding - Tracks anchorlog.org itself

Tech Stack

Backend:

  • Node.js + Express
  • PostgreSQL
  • Sui SDK (@mysten/sui.js)

Frontend:

  • React (Vite)
  • TailwindCSS
  • Recharts

Blockchain:

  • Sui Mainnet
  • Move smart contract

Quick Start

Prerequisites

  • Node.js 20+
  • PostgreSQL 15+
  • Sui CLI (for contract deployment)

Installation

# Clone repo
git clone https://github.com/yourusername/anchorlog.git
cd anchorlog

# Install dependencies
npm install
cd client && npm install && cd ..

# Setup environment
cp .env.example .env
# Edit .env with your values

# Create database
createdb anchorlog

# Run migrations
npm run db:migrate

# Seed sample data
npm run db:seed

# Start backend
npm run dev

# Start frontend (separate terminal)
cd client && npm run dev

Deploy Sui Contract

cd sui
sui client publish --gas-budget 100000000
# Copy package ID to .env as SUI_PACKAGE_ID

Access


Project Structure

anchorlog/
├── server/           # Backend (Express + PostgreSQL)
├── client/           # Frontend (React + Vite)
├── sui/              # Smart contract (Move)
├── docs/             # Documentation (pitch, Q&A, demo script)
├── specs/            # Technical specs (architecture, agent tasks)
└── ui-mockups/       # Screen designs

How It Works

1. App logs event → PostgreSQL (instant)
   ↓
2. Critical events queued for anchoring
   ↓
3. Every 10 min: Build Merkle tree
   ↓
4. Post root hash to Sui blockchain
   ↓
5. Store proof in database
   ↓
6. Event now has cryptographic verification

Cost: ~$0.00001 per event (batching makes it cheap)


Use Cases

  • API Uptime Disputes - Prove your service was up when client claims it was down
  • GDPR Compliance - Verifiable proof of data deletion events
  • Security Incidents - Immutable timeline of attack events
  • Deployment Tracking - Prove when code shipped
  • Financial Logs - Tamper-proof transaction records

Documentation


API Examples

Log an Event

curl -X POST http://localhost:3000/api/events \
  -H 'Content-Type: application/json' \
  -d '{
    "app_name": "my-app",
    "event_type": "Deployment",
    "description": "v1.0.0 released",
    "critical": true
  }'

Get Proof

curl http://localhost:3000/api/proof/123

Verify (Public)

https://anchorlog.org/verify/123

Development

Run Tests

npm test

Start Anchor Service

npm run anchor:start

Database Migrations

npm run db:migrate
npm run db:rollback
npm run db:seed

Deployment

PM2 (Production)

# Install PM2
npm install -g pm2

# Start services
pm2 start ecosystem.config.js

# View logs
pm2 logs

# Monitor
pm2 monit

Environment Variables

See .env.example for required configuration.


Why Sui?

  • Speed: Sub-second finality (proofs confirmed almost instantly)
  • Cost: ~$0.0001 per transaction (batching 1000 events = ~$1)
  • Simplicity: Programmable objects make proof storage clean

Compare to Ethereum ($50+ per transaction) or centralized timestamp authorities (single point of trust).


Contributing

This is a hackathon project. If you want to help turn it into a real product:

  1. Open an issue to discuss your idea
  2. Fork the repo
  3. Create a feature branch
  4. Submit a PR

Roadmap

Day 1 (Hackathon):

  • Basic event logging
  • Sui blockchain integration
  • Dashboard UI
  • Public verification

Post-Hackathon:

  • Multi-tenancy (multiple users/apps)
  • Advanced analytics
  • Compliance exports (PDF reports)
  • SDK for Node.js, Python, Go
  • Integrations (Zapier, webhooks, Slack)

License

MIT License - see LICENSE for details.


Team

Built during [Hackathon Name] by:

Special thanks to Sui Foundation for the travel grant!


Links


Questions?


⚓ Immutable logs. Defensible timelines. Built on Sui.

Test Webhook Thu Oct 30 05:26:02 PM PDT 2025

Webhook Test - Thu Oct 30 07:36:30 PM PDT 2025

Final Webhook Test - Thu Oct 30 09:26:52 PM PDT 2025

Webhook Success Test - Fri Oct 31 04:38:20 PM PDT 2025

Automated Deployment Test - Fri Oct 31 04:39:39 PM PDT 2025

FINAL CI/CD Test - Fri Oct 31 04:43:31 PM PDT 2025

Complete CI/CD Working! - Fri Oct 31 04:45:27 PM PDT 2025

CI/CD Working Now! - Fri Oct 31 04:51:31 PM PDT 2025

Complete Automated CI/CD! - Fri Oct 31 05:05:21 PM PDT 2025

AUTOMATED CI/CD SUCCESS! - Fri Oct 31 05:07:57 PM PDT 2025

Webhook test - Fri Nov 7 12:06:57 AM PST 2025

About

Multi-region event monitoring system with 12ms response time across 8 regions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published