Skip to content

cryptoflops/smart-session-dapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

πŸš€ Smart Session Dapp

Secure, temporary, revocable on-chain session permissions for Web3 applications.

Features β€’ Architecture β€’ Quick Start β€’ Deployment β€’ Contributing


Overview

Smart Session Dapp enables users to grant temporary, granular permissions to decentralized applications without signing every transaction. Built with Reown AppKit and WalletConnect Smart Sessions, this production-ready dApp demonstrates the future of frictionless Web3 UX.

The Problem

Traditional Web3 interactions require users to sign every transaction, creating:

  • Constant interruptions during gameplay or DeFi interactions
  • Poor user experience compared to Web2 applications
  • Security fatigue leading to blind signing

The Solution

Smart Sessions allow users to:

  • Grant temporary permissions to specific contracts and functions
  • Set automatic expiration times (1 hour, 1 day, 7 days)
  • Revoke access instantly at any time
  • Maintain full custody and control

Features

πŸ” Granular Permission Control

Define exactly what an app can doβ€”limit by contract address, function selector, and value.

⏱️ Auto-Expiry Sessions

Sessions expire automatically. No forgotten approvals, no lingering risks.

πŸ›‘οΈ Instant Revocation

Kill any session instantly from the dashboard. You are always in control.

🌐 Multi-Chain Support

Deploy and manage sessions across Base, Optimism, and Celo.

🎨 Premium UI/UX

Modern glassmorphism design with real-time timers, animations, and toast notifications.


Architecture

smart-session-dapp/
β”œβ”€β”€ src/                    # React + Wagmi + AppKit frontend
β”‚   β”œβ”€β”€ components/         # UI components
β”‚   β”‚   β”œβ”€β”€ ui/            # Design system (Button, Card, Modal, Timer, Toast)
β”‚   β”‚   β”œβ”€β”€ layout/        # Layout, Navbar, Sidebar
β”‚   β”‚   β”œβ”€β”€ create-session/# Session creation wizard
β”‚   β”‚   └── dashboard/     # Session list and management
β”‚   β”œβ”€β”€ hooks/             # Custom React hooks (useSession)
β”‚   └── lib/               # Config (wagmi, appkit, contracts)
β”œβ”€β”€ server/                # Smart Session executor backend
β”œβ”€β”€ contracts/             # Solidity contracts
└── scripts/               # Hardhat deployment scripts

Live Contracts

Network Address Explorer
Base 0x1363FfBE6e5280c2a310BE7b50Eaad4d3Bc57644 View
Optimism 0xC19c0602d25e26f496037c42E6A103074d2CBd85 View
Celo 0xC19c0602d25e26f496037c42E6A103074d2CBd85 View

Quick Start

Prerequisites

Installation

# Clone the repository
git clone https://github.com/cryptoflops/smart-session-dapp.git
cd smart-session-dapp

# Install dependencies
npm install

# Copy environment variables
cp .env.example .env

Configuration

Edit .env with your credentials:

VITE_REOWN_PROJECT_ID=your_project_id
VITE_SMART_SESSION_TARGET_ADDRESS=0x1363FfBE6e5280c2a310BE7b50Eaad4d3Bc57644

Development

# Start frontend
npm run dev

# Start backend (separate terminal)
npm run dev:server

Open http://localhost:5173


Deployment

Frontend (Vercel)

  1. Push to GitHub
  2. Import repository in Vercel
  3. Add environment variables:
    • VITE_REOWN_PROJECT_ID
    • VITE_SMART_SESSION_TARGET_ADDRESS
  4. Deploy

Smart Contract

# Compile
npm run compile

# Deploy to Base
npm run deploy

# Verify
npx hardhat verify --network base <DEPLOYED_ADDRESS>

Tech Stack

Category Technology
Frontend React, Vite, TypeScript
Styling Tailwind CSS, Glassmorphism
Web3 wagmi, viem, Reown AppKit
Contracts Solidity, Hardhat
Backend Express.js, TypeScript

Security

Smart Sessions delegate capabilities to backend signers. Always:

  • Audit session scopes and permissions
  • Use short expiration times
  • Monitor session activity
  • Revoke unused sessions

See SECURITY.md for vulnerability reporting.


Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request

License

MIT License. See LICENSE for details.


Author

cryptoflops.base.eth | psyhodivka.eth

Address: 0x0Cf485F4c6b2a6087B4D5d4A590cAe8d22D7FA9a


Built with ❀️ using Reown AppKit and Base