Skip to content

Latest commit

Β 

History

History
113 lines (83 loc) Β· 4.07 KB

File metadata and controls

113 lines (83 loc) Β· 4.07 KB

Metalayer Human-Agent Interaction Prototype

This repository contains a fully functional prototype of a Metaweb-inspired coordination layer enabling human-avatar (agent) interaction with community-aware policies, messaging, and presence tracking.


🧠 Project Overview

  • Frontend: βœ… COMPLETE - React sidebar overlay, packaged as a browser extension. Provides chat, community selection, visibility layer, and authentication.
  • Backend: βœ… COMPLETE - Node.js/Express, modular controllers/routes/services, with endpoints for auth, chat, communities, interactions, policy, and blockchain logging (Solana, stubbed).
  • Database: πŸ”„ SCAFFOLDED - PostgreSQL (via Prisma ORM), with tables for users, sessions, communities, interactions, messages, vault, avatars, etc.
  • TEE & Agents: πŸ”„ STUBBED - Stubs for Trusted Execution Environment (TEE) and agent orchestration (Eliza, Swarm). MCP protocol planned.

🧱 Stack

  • Frontend: React, packaged as a Chrome extension (sidebar overlay)
  • Backend: Node.js (Express), modular structure
  • Database: PostgreSQL (Prisma ORM) - schema ready
  • Blockchain: Solana (logging, stubbed)
  • TEE/Agents: Stubs for Eliza, Swarm, MCP

πŸ“‚ Folder Structure

/client            β†’ React sidebar extension (Canopi overlay shell)
  src/             β†’ Sidebar, overlay logic, auth stubs
  public/          β†’ manifest.json, contentScript.js
  build/           β†’ Built extension (after npm run build)
/controllers/      β†’ API controllers (auth, poh, chat, etc.)
/routes/           β†’ Express route handlers
/services/         β†’ Business logic, blockchain, TEE, agents
/prisma            β†’ Prisma schema, migrations
app.js             β†’ Main server entry point
package.json       β†’ Root dependencies

πŸš€ Getting Started

1. Install Dependencies

# Install root dependencies (backend)
npm install

# Install frontend dependencies
cd client && npm install

2. Start the Backend Server

# From root directory
npm start
# Server will run on http://localhost:3001

3. Build and Load the Frontend Extension

# Build the React app
cd client && npm run build
  1. Go to Chrome > Extensions > Load Unpacked
  2. Select client/build as the extension root
  3. The sidebar overlay and floating icon will appear on any website

4. Test the Full System

  1. Authentication: Click the floating πŸ›‘οΈ icon, then click "Auth" in the sidebar
  2. Communities: Select a community from the "Community Selector" tab
  3. Chat: Send messages in the "Live Chat" tab
  4. Visibility: Manage privacy settings in the "Visibility Layer" tab

πŸ—ΊοΈ Roadmap

  1. βœ… Frontend: Sidebar overlay as browser extension (COMPLETE)
  2. βœ… Auth: Google OAuth, Fractal ID (stubs implemented)
  3. βœ… Backend: Modular endpoints for all features (COMPLETE)
  4. πŸ”„ Database: Prisma schema ready (to connect)
  5. πŸ”„ Blockchain: Solana logging (stubbed)
  6. πŸ”„ TEE/Agents: Stubs for Eliza, Swarm, MCP (to implement)

πŸ“¦ API Endpoints (All Working)

Method Endpoint Description
GET / Health check
POST /auth/login User login (mock)
GET /auth/me Session info
GET /communities List communities
POST /communities/select Select community
POST /chat/message Send message
GET /chat/history Fetch chat messages
POST /interaction/log Log interaction
Fork, PR, or build alongside this prototype. For Meta-Layer Initiative info:

This is an early prototype β€” use and remix to explore next-gen coordination.