{"id":28757164,"url":"https://github.com/flexycode/wallet-session-management","last_synced_at":"2026-02-27T07:33:38.507Z","repository":{"id":290974034,"uuid":"976167544","full_name":"flexycode/wallet-session-management","owner":"flexycode","description":"Web3 Wallet Authentication through MetaMask and Trust Wallet","archived":false,"fork":false,"pushed_at":"2025-05-01T17:20:53.000Z","size":18,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-10T15:18:39.929Z","etag":null,"topics":["blockchain-technology","convex","metamask","react","trustwallet","web3","web3react"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flexycode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-01T16:09:53.000Z","updated_at":"2025-05-05T12:03:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"df3d80da-0dc7-49f3-a8f0-34d430d96435","html_url":"https://github.com/flexycode/wallet-session-management","commit_stats":null,"previous_names":["flexycode/wallet-session-management"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flexycode/wallet-session-management","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexycode%2Fwallet-session-management","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexycode%2Fwallet-session-management/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexycode%2Fwallet-session-management/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexycode%2Fwallet-session-management/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flexycode","download_url":"https://codeload.github.com/flexycode/wallet-session-management/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexycode%2Fwallet-session-management/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29887563,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T05:38:26.446Z","status":"ssl_error","status_checked_at":"2026-02-27T05:38:25.235Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain-technology","convex","metamask","react","trustwallet","web3","web3react"],"created_at":"2025-06-17T03:09:56.781Z","updated_at":"2026-02-27T07:33:38.493Z","avatar_url":"https://github.com/flexycode.png","language":"TypeScript","readme":"# Wallet Session Management\n\nThis project demonstrates wallet session management with MetaMask and Trust Wallet integration using React, Convex, and Web3React.\n\n## 💡 Features\n- User authentication with Convex Auth\n- MetaMask and Trust Wallet integration\n- Configurable wallet session duration\n- Automatic session expiration\n- Real-time session status updates\n- Support for multiple blockchain networks\n\n## 📋 Prerequisites\n- [Node.js](https://nodejs.org/) (v16 or higher)\n- [npm](https://www.npmjs.com/) (usually comes with Node.js)\n- MetaMask or Trust Wallet browser extension\n\n## 🛠️ Installation\n1. Clone the repository:\n   ```bash\n   git clone \u003cyour-repo-url\u003e\n   cd wallet-session-management\n   ```\n2. Install dependencies:\n   ```bash\n   npm install\n   ```\n\n## 💼 Configuration\n1. Copy the provided `.env.local` template and fill in your secrets:\n   ```env\n   CONVEX_DEPLOY_KEY=\n   CONVEX_DEPLOYMENT=\n   VITE_CONVEX_URL=\n   CONVEX_OPENAI_API_KEY=\n   CONVEX_OPENAI_BASE_URL=\n   CONVEX_RESEND_API_KEY=\n   JWKS=\n   JWT_PRIVATE_KEY=\n   RESEND_BASE_URL=\n   SITE_URL=\n   ```\n   \u003e **Note:** Do not commit your filled `.env.local` with secrets to source control.\n\n2. Create a Convex deployment:\n   ```bash\n   npx convex dev\n   ```\n   This will create a new Convex deployment and save the deployment URL to `.env.local`.\n\n## 📈 Running the Application\n1. Start the development server:\n   ```bash\n   npm run dev\n   ```\n2. Open your browser and navigate to the URL shown in your terminal (e.g., `http://localhost:5173`).\n\n## 📚 Usage\n1. **Sign In**\n   - Use the authentication form to sign in (username/password)\n2. **Connect Wallet**\n   - Use the UI to connect MetaMask or Trust Wallet\n3. **Session Management**\n   - Manage wallet sessions, see session expiration, and receive real-time updates.\n\n## 📝 License\nMIT\n\n   - Click \"Connect Wallet\" to connect MetaMask or Trust Wallet\n   - Choose your desired session duration (15 mins to 2 hours)\n   - Approve the wallet connection in your wallet extension\n\n3. **Session Management**\n   - View your connected wallet address\n   - See the wallet type (MetaMask or Trust Wallet)\n   - Monitor the remaining session time\n   - Manually disconnect when needed\n\n## 📁 Project Structure\n\n```\n├── convex/\n│   ├── schema.ts         # Database schema\n│   ├── wallet.ts         # Wallet session management functions\n│   └── auth.ts           # Authentication configuration\n├── src/\n│   ├── components/\n│   │   └── WalletConnect.tsx    # Wallet connection component\n│   ├── lib/\n│   │   └── web3.ts      # Web3 configuration and utilities\n│   └── App.tsx          # Main application component\n```\n\n## 🛠️ Tech Stack\n\n- [React](https://reactjs.org/) - Frontend framework\n- [Convex](https://www.convex.dev/) - Backend and real-time database\n- [Web3React](https://github.com/Uniswap/web3-react) - Ethereum wallet integration\n- [TailwindCSS](https://tailwindcss.com/) - Styling\n- [date-fns](https://date-fns.org/) - Date formatting\n\n## 🌐 Supported Networks\n\nThe application supports the following networks:\n- Ethereum Mainnet (Chain ID: 1)\n- Ropsten (Chain ID: 3)\n- Rinkeby (Chain ID: 4)\n- Goerli (Chain ID: 5)\n- Kovan (Chain ID: 42)\n- BSC Mainnet (Chain ID: 56)\n- BSC Testnet (Chain ID: 97)\n\n## 🛡️ Security Features\n\n- Automatic session expiration\n- Secure authentication with Convex Auth\n- Real-time session validation\n- Automatic wallet disconnection on session expiry\n\n## 📝 Development Notes\n\n- The project uses TypeScript for type safety\n- Real-time updates are handled automatically by Convex\n- Wallet sessions are stored in the Convex database\n- The UI updates automatically when the session expires\n\n## 🛠️ Troubleshooting\n\n1. **Wallet Not Connecting**\n   - Ensure MetaMask or Trust Wallet is installed\n   - Check if you're signed into your wallet\n   - Verify you're on a supported network\n\n2. **Session Issues**\n   - Clear your browser cache\n   - Disconnect and reconnect your wallet\n   - Check your wallet's network connection\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Commit your changes\n4. Push to the branch\n5. Create a Pull Request\n\n## 🔐 License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflexycode%2Fwallet-session-management","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflexycode%2Fwallet-session-management","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflexycode%2Fwallet-session-management/lists"}