An open API service indexing awesome lists of open source software.

https://github.com/kevin5621/origin-stamp-icp

Proof of Human Process" protocol built on the Internet Computer (ICP). OriginStamp allows creators to generate immutable on-chain certificates of origin for their work, fighting digital forgery and proving authenticity in the age of AI
https://github.com/kevin5621/origin-stamp-icp

art authenticity blockchain crypto daaps digital-identity hackathon icp nft proof-of-process provenance react rust rwa scss typescript web3

Last synced: 2 months ago
JSON representation

Proof of Human Process" protocol built on the Internet Computer (ICP). OriginStamp allows creators to generate immutable on-chain certificates of origin for their work, fighting digital forgery and proving authenticity in the age of AI

Awesome Lists containing this project

README

          

# OriginStamp: Verifying Creation, Elevating Value

> Building the foundational trust layer for the new creative economy. As generative AI blurs the line between human and machine, OriginStamp provides a "Proof-of-Process" protocol, allowing creators to generate unforgeable on-chain histories for their work.

## ๐ŸŽฏ Project Overview

OriginStamp is a revolutionary decentralized protocol that addresses the fundamental crisis of trust in the digital creative economy. In an age where AI-generated content blurs the line between human and machine creation, OriginStamp provides a "Proof-of-Process" protocol that allows creators to generate unforgeable, on-chain histories for their work.

## ๐Ÿšจ The Problem: The Digital Authenticity Crisis

In the age of advanced generative AI, the digital world faces a fundamental crisis of trust:

- **Indistinguishable Content**: It's becoming increasingly difficult to distinguish authentic, human-created work from AI-generated content
- **Devalued Human Creativity**: The flood of AI content devalues the skill, time, and creativity of human artists, writers, and developers
- **Provenance Issues**: Significant challenges for copyright, digital commerce, and intellectual property protection
- **Lack of Standards**: No reliable standard for verifying the true origin and effort behind digital assets

## ๐Ÿ’ก Our Solution: A Paradigm Shift

OriginStamp is **not** an AI detection tool. Instead, we offer a more fundamental and proactive solution: a decentralized protocol for **Proof of Human Process**.

We provide creators with tools to generate an unforgeable, on-chain certificate of origin for any digital or physical work. This certificate doesn't just point to the final file; it contains the entire, immutable history of its creation process.

## ๐Ÿ”ง How It Works: The Three Pillars of Trust

### 1. Verified Identity & Session Initiation

A creator begins by authenticating using **Internet Identity**, linking their secure, hardware-based identity to a new project. They initiate a "Creation Session" within the OriginStamp dApp, which creates a dedicated, secure on-chain log for their work.

### 2. Immutable Process Logging

Through a simple plugin in their native creative software (e.g., Photoshop, VS Code, Ableton), key creative actions are automatically and periodically recorded to the project's on-chain log. These records can include metadata like "New layer created," "Brush tool used," periodic file hashes, or code commit hashes, each with an immutable timestamp.

### 3. The Certificate NFT

Upon completion, the creator finalizes the session. This action mints a final **Certificate NFT**. This NFT is a container holding the final asset's hash and, most importantly, a cryptographic link to the entire, unchangeable on-chain log of its creation process.

## ๐Ÿ” The Verification Experience

Anyone can verify an OriginStamp asset. By scanning a QR code or visiting a public verification page, a user is presented with a clear, interactive dashboard. This dashboard displays the full creation timeline, allowing a potential buyer or collector to see the entire history and compare the on-chain process data with the final work, providing unparalleled confidence in its authenticity.

## ๐ŸŒ Why Internet Computer (ICP)?

This project is uniquely suited for the Internet Computer ecosystem for several critical reasons:

- **Reverse Gas Model**: This is essential. It allows the platform to cover the small, frequent transaction costs of logging, providing a frictionless experience for creators. They can focus on creating, not on paying for every recorded action.
- **On-Chain Data Storage**: ICP's architecture allows for the efficient and affordable storage of the extensive log data directly on-chain, ensuring the provenance record is truly permanent and decentralized.
- **Internet Identity**: Provides a built-in, secure, and user-friendly authentication system without the need for traditional seed phrases, which is crucial for linking a work to a real identity.
- **Performance**: ICP's speed and fast finality are necessary to handle the real-time logging of creative actions without interrupting the creator's flow.

## ๐ŸŽฏ Hackathon Goal (MVP)

Our goal for the WCHL 2025 hackathon is to build a functional Minimum Viable Product that includes:

- The core canisters for project initiation and immutable logging.
- A proof-of-concept plugin for a web-based text editor.
- The public-facing verification dashboard to display the on-chain process history.

## ๐Ÿš€ Technology Stack

This project is built with:

- ๐Ÿฆ€ **Rust-based Canister** backend
- โš›๏ธ **React + TypeScript** frontend with modular architecture
- ๐ŸŽจ **Neumorphic Design System** for modern UI/UX
- ๐Ÿ” **Internet Identity** authentication
- ๐Ÿงช **Full Test Suite**: Vitest + PocketIC for backend and frontend
- ๐Ÿ” **CI/CD** with GitHub Actions for automated tests and code quality
- ๐Ÿ“š **Comprehensive Documentation** for all components

---

## ๐Ÿ“œ Table of Contents

- [๐Ÿš€ Getting Started](#-getting-started)
- [๐Ÿ“ Project Structure](#-project-structure)
- [โœ… Testing Patterns](#-testing-patterns)
- [๐Ÿ”„ CI/CD Workflow](#-cicd-workflow)
- [๐Ÿ”— Resources & Documentation](#-learning-resources)

---

## ๐Ÿš€ Getting Started

### ๐Ÿง‘โ€๐Ÿ’ป 1. Development Environment Setup

A **devcontainer** is preconfigured for you to start coding instantly!

- Click on "Use this Template" โ†’ "Create a new repository".
- Click "Code โ†’ Open with Codespaces"
- Change machine type to 4-core 16GB RAM โ€ข 32GB
- Once the codespace is created, you can open it in VS Code Local
- Everything is pre-installed and ready for you to run the following commands

### 2. Install Dependencies

```bash
npm install
```

### 3. Start Local Development

#### Option A: Quick Development (Recommended)

```bash
# Start everything for development (DFX + Backend + Frontend)
npm run dev
```

#### Option B: Full Deployment (Production-like)

```bash
# Deploy everything (backend + frontend)
npm run deploy
```

#### Option C: Step-by-Step Deployment

```bash
# Start DFX local network
dfx start --clean

# In another terminal, deploy backend canisters
npm run deploy:backend

# Deploy frontend
npm run deploy:frontend
```

### 4. Development Workflow

```bash
# For daily development (starts DFX, deploys backend, starts frontend)
npm run dev

# For frontend development only (if backend is already running)
npm start
```

### 5. Run Tests

```bash
# Run all tests
npm test

# Run specific test suites
npm run test:frontend # Frontend tests only
npm run test:backend # Backend tests only
```

## ๐Ÿ“š Documentation

Comprehensive documentation is available in the `docs/` folder:

- [๐Ÿ“– Project Overview](./docs/project-overview.md) - High-level project description
- [๐ŸŽจ UI Components](./docs/frontend/ui-components.md) - Design system and components
- [๐Ÿ› ๏ธ Development Setup](./docs/development/development-setup.md) - Development environment guide

---

## ๐Ÿ“ Project Structure

```
OriginStamp/
โ”œโ”€โ”€ .devcontainer/devcontainer.json # Container config for development
โ”œโ”€โ”€ .github/workflows/ # GitHub CI/CD pipelines
โ”œโ”€โ”€ docs/ # ๐Ÿ“š Comprehensive documentation
โ”‚ โ”œโ”€โ”€ project-overview.md # Project description and goals
โ”‚ โ”œโ”€โ”€ frontend/ # Frontend component documentation
โ”‚ โ”œโ”€โ”€ backend/ # Backend architecture docs
โ”‚ โ”œโ”€โ”€ testing/ # Testing strategies and guides
โ”‚ โ”œโ”€โ”€ development/ # Development setup and processes
โ”‚ โ””โ”€โ”€ api/ # API documentation
โ”œโ”€โ”€ src/
โ”‚ โ”œโ”€โ”€ backend/ # ๐Ÿฆ€ Rust backend canister
โ”‚ โ”‚ โ”œโ”€โ”€ src/
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ lib.rs # Main Rust file
โ”‚ โ”‚ โ””โ”€โ”€ Cargo.toml # Rust dependencies
โ”‚ โ”œโ”€โ”€ frontend/ # โš›๏ธ React + TypeScript frontend
โ”‚ โ”‚ โ”œโ”€โ”€ src/
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ App.tsx # Main App component
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ pages/ # ๐Ÿ“„ Page components (modular)
โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ landing/ # Landing page
โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ auth/ # Authentication pages
โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ dashboard/ # Dashboard pages
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ components/ # ๐Ÿงฉ Reusable UI components
โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ login/ # Authentication components
โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ profile/ # User profile components
โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ common/ # Common UI elements
โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ ui/ # UI components
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ contexts/ # React contexts
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ hooks/ # Custom React hooks
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ services/ # API service layers
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ types/ # TypeScript type definitions
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ utils/ # Utility functions
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ css/ # ๐ŸŽจ ITCSS styling architecture
โ”‚ โ”‚ โ”œโ”€โ”€ assets/ # Static assets (images, icons)
โ”‚ โ”‚ โ”œโ”€โ”€ tests/ # Frontend unit tests
โ”‚ โ”‚ โ”œโ”€โ”€ index.html # Frontend entry point
โ”‚ โ”‚ โ”œโ”€โ”€ main.tsx # React main file
โ”‚ โ”‚ โ”œโ”€โ”€ package.json # Frontend dependencies
โ”‚ โ”‚ โ”œโ”€โ”€ tsconfig.json # TypeScript configuration
โ”‚ โ”‚ โ”œโ”€โ”€ vite.config.ts # Vite build configuration
โ”‚ โ”‚ โ””โ”€โ”€ vite-env.d.ts # Vite type definitions
โ”‚ โ””โ”€โ”€ declarations/ # Auto-generated canister interfaces
โ”œโ”€โ”€ tests/
โ”‚ โ”œโ”€โ”€ src/ # Backend test files
โ”‚ โ”œโ”€โ”€ backend-test-setup.ts # PocketIC instance
โ”‚ โ””โ”€โ”€ vitest.config.ts # Vitest configuration
โ”œโ”€โ”€ scripts/
โ”‚ โ”œโ”€โ”€ start.sh # ๐Ÿš€ Full deployment script
โ”‚ โ”œโ”€โ”€ dev-container-setup.sh # Development environment setup
โ”‚ โ””โ”€โ”€ generate-candid.sh # Candid generation script
โ”œโ”€โ”€ dfx.json # ICP configuration
โ”œโ”€โ”€ Cargo.toml # Root Rust workspace config
โ”œโ”€โ”€ package.json # Project dependencies and scripts
โ””โ”€โ”€ CHANGELOG.md # Project changelog
```

---

## ๐Ÿ”„ CI/CD Workflow

Located under `.github/workflows/`, this includes:

- ๐Ÿงช Automated end-2-end test runs
- ๐Ÿ” Code quality checks
- ๐Ÿš€ Automated deployment

## ๐Ÿงช Testing Strategy

### Frontend Testing

- **Component Testing**: Individual component tests with React Testing Library
- **Integration Testing**: User flow and interaction tests
- **E2E Testing**: Complete user journey testing

### Backend Testing

- **Unit Testing**: Individual function and method tests
- **Integration Testing**: Canister interaction tests
- **PocketIC Testing**: Local blockchain simulation

## ๐ŸŽจ Design System

### Neumorphic Design

- **Soft UI**: Subtle shadows and highlights
- **Consistent Spacing**: 8px grid system
- **Color Palette**: Light/dark theme support
- **Typography**: Clear hierarchy and readability

### Component Library

- **Reusable Components**: Button, Card, Modal, Toast
- **Form Elements**: Input, Select, Checkbox
- **Navigation**: Header, Sidebar, Breadcrumbs
- **Feedback**: Loading, Error, Success states

## ๐Ÿš€ Deployment

### Local Development

```bash
# Full deployment
npm run deploy

# Step-by-step
npm run deploy:backend
npm run deploy:frontend
```

### Production Deployment

- **Internet Computer**: Mainnet deployment
- **Environment Variables**: Secure configuration
- **Monitoring**: Performance and error tracking

## ๐Ÿ“š Learning Resources

- [ICP Dev Docs](https://internetcomputer.org/docs)
- [Rust CDK](https://internetcomputer.org/docs/current/developer-docs/backend/rust/)
- [React Documentation](https://react.dev/)
- [TypeScript Handbook](https://www.typescriptlang.org/docs/)
- [Vite Build Tool](https://vitejs.dev/)
- [Vitest Testing Framework](https://vitest.dev/)

## ๐Ÿ™ Acknowledgments

- **Internet Computer Foundation** for the amazing blockchain platform
- **React Team** for the incredible frontend framework
- **Rust Community** for the robust backend language
- **Open Source Contributors** who make this possible

---

**Build the future of digital authenticity with OriginStamp! ๐Ÿš€โœจ**