|
Traditional Library Issues:
Critical Stats:
|
Blockchain Solutions:
Performance Gains:
|
| Metric | Traditional | Aptos Book Vault | Improvement |
|---|---|---|---|
| Transaction Time | 5-10 minutes | 2-5 seconds | ⚡ 200x Faster |
| Record Security | Paper/Digital | Blockchain | 🔐 Immutable |
| Global Access | Limited | Worldwide | 🌍 Universal |
| Fraud Prevention | Manual checks | Smart Contracts | 🛡️ Automated Security |
- 📖 Book Management - Add, search, and categorize books
- 🔄 Borrowing System - Decentralized book lending with smart contracts
- 👤 User Profiles - Track borrowing history on blockchain
- 🔍 Advanced Search - Filter by title, author, category, and ISBN
- 💰 Real Transactions - Aptos devnet integration with Petra wallet
- 🔐 Secure Ownership - Cryptographic proof of book ownership
- 📋 Smart Contracts - Automated borrowing/returning logic
- 🌐 Explorer Links - Full transaction transparency
- 📱 Responsive Design - Mobile-first approach with Tailwind CSS
- 🌙 Dark/Light Mode - Seamless theme switching
- ⚡ Real-time Updates - Live transaction feedback and notifications
- 🎯 Intuitive Interface - User-friendly design with shadcn/ui
# Node.js 18+
node --version
# Petra Wallet Extension
# https://petra.app/# Clone the repository
git clone https://github.com/amitr25/aptos-book-vault.git
# Navigate to project
cd aptos-book-vault
# Install dependencies
npm install
# Start development server
npm run dev
# Open in browser
# http://localhost:8080# Install Aptos CLI
curl -fsSL "https://aptos.dev/scripts/install_cli.py" | python3
# Initialize Aptos account
aptos init
# Deploy smart contract
aptos move publish --package-dir ./contracts
# Update contract address in src/lib/contract.ts# Visit Aptos Faucet
https://aptoslabs.com/testnet-faucet
# Enter your wallet address
# Request devnet APT tokens- 🖥️ Start the application
- 📚 Browse pre-loaded sample books
- ➕ Add new books to the library
- 🔍 Search and filter books by various criteria
- 📊 View library statistics
- 🔗 Connect Petra wallet to devnet
- 💰 Ensure sufficient APT balance for transactions
- 📖 Borrow books with real blockchain transactions
- 📤 Return books and see transaction confirmations
- 🌐 View all transactions on Aptos explorer
graph TD
A[React Frontend] --> B[Aptos SDK]
B --> C[Petra Wallet]
C --> D[Aptos Blockchain]
A --> E[Local Storage]
A --> F[Supabase Database]
D --> G[Move Smart Contracts]
G --> H[Library Management Logic]
I[shadcn/ui Components] --> A
J[Tailwind CSS] --> A
npm run dev # Start development server (Vite)
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint
npm run type-check # TypeScript type checkingsrc/
├── components/ # React components
│ ├── ui/ # shadcn/ui components (40+)
│ ├── AddBookModal.tsx
│ ├── BookCard.tsx
│ ├── LibraryHeader.tsx
│ ├── SearchBar.tsx
│ └── WalletButton.tsx
├── lib/ # Core libraries
│ ├── contract.ts # Aptos blockchain integration
│ ├── localStorage.ts # Local storage service
│ └── utils.ts # Utility functions
├── pages/ # Application pages
│ ├── Library.tsx # Main library interface
│ └── NotFound.tsx # 404 page
├── hooks/ # Custom React hooks
│ └── use-toast.ts
└── integrations/ # External integrations
└── supabase/ # Database integration
contracts/
├── sources/
│ └── Library.move # Smart contract
└── Move.toml # Move configuration
- Switch to Blockchain Mode in the application
- Connect Petra Wallet (ensure it's on devnet)
- Test Borrowing Flow:
- Click "Borrow Book"
- Approve transaction in Petra
- See real transaction on Aptos explorer
- Test Returning Flow:
- Return borrowed book
- Confirm transaction
- Verify state changes
- Petra Wallet: Check transaction history
- Aptos Explorer: View detailed transaction data
- Console Logs: Monitor transaction flow
We welcome contributions!
- 🍴 Fork the repository
- 🌿 Create a feature branch (
git checkout -b feature/amazing-feature) - 💻 Make your changes
- 🧪 Test both local and blockchain modes
- 📝 Update documentation
- 🔄 Submit a pull request
- TypeScript for type safety
- ESLint for code quality
- Prettier for code formatting
- Conventional Commits for commit messages
-
"Petra wallet not found"
- Install Petra wallet extension
- Refresh the page
-
"Insufficient funds"
- Get devnet APT from faucet
- Wait for transaction confirmation
-
"Wrong network"
- Switch Petra to devnet
- Refresh application
-
Transaction failures
- Check wallet connection
- Verify sufficient gas fees
- Try again after a few seconds
- 📖 Aptos Docs: aptos.dev
- 🔗 Petra Wallet: petra.app
- 🌍 Aptos Explorer: explorer.aptoslabs.com
- 💧 Devnet Faucet: aptoslabs.com/testnet-faucet
- ✅ Real Blockchain Integration - Working Petra wallet transactions
- ✅ Production Ready - Deployed smart contracts capability
- ✅ Modern Tech Stack - Latest React, TypeScript, and Aptos SDK
- ✅ User Experience - Intuitive interface with real-time feedback
- ✅ Dual Mode Operation - Local development and blockchain production
- Aptos Foundation - Revolutionary blockchain infrastructure
- Petra Team - Seamless wallet integration
- shadcn - Beautiful UI component library
- Tailwind CSS - Utility-first CSS framework
- Vite - Lightning-fast build tool