📚Introduction
This repository contains the comprehensive documentation for DreamLend, the first decentralized P2P lending protocol built on Somnia L1.
🚀 Quick Start
Prerequisites
Bun (recommended) or Node.js 18+
GitBook CLI for traditional GitBook features
Installation
# Install dependencies
bun install
# Or with npm
npm installDevelopment
# Start development server
bun run dev
# Or for GitBook specifically
cd packages/docs && gitbook serveBuilding
# Build all packages
bun run build
# Build GitBook documentation
bun run gitbook:build📖 Documentation Structure
The documentation is organized into several key sections:
🏠 Overview: Introduction and architecture
🎯 Getting Started: Quick setup guides
👥 User Guides: Detailed guides for lenders, borrowers, and liquidators
📋 Smart Contracts: API documentation and contract details
🔮 Oracle & Price Feeds: Oracle integration details
💎 $DREAM Token: Tokenomics and rewards
🛠️ Developer Resources: Integration guides and SDKs
📊 API Reference: Complete API documentation
❓ FAQ & Support: Common questions and troubleshooting
🏗️ Project Structure
dreamlend-docs/
├── packages/
│ └── docs/ # GitBook documentation
│ ├── README.md # Main landing page
│ ├── SUMMARY.md # Table of contents
│ ├── book.json # GitBook configuration
│ ├── getting-started/ # Setup guides
│ ├── user-guides/ # User documentation
│ ├── api/ # API documentation
│ └── ...
├── package.json # Root package configuration
├── turbo.json # Turbo build configuration
├── biome.json # Code formatting rules
└── README.md # This file🛠️ Development Workflow
Adding New Documentation
Create new markdown files in the appropriate directory under
packages/docs/Update SUMMARY.md to include your new pages in the navigation
Test locally with
bun run devFormat code with
bun run format
Available Scripts
# Development
bun run dev # Start development server
bun run format # Format all files with Biome
bun run format:check # Check formatting without changes
# Building
bun run build # Build all packages
bun run gitbook:build # Build GitBook documentation
bun run gitbook:pdf # Generate PDF version
bun run gitbook:epub # Generate EPUB version
# Maintenance
bun run clean # Clean build artifacts
bun run clean-deps # Clean all node_modules
bun run typecheck # Run TypeScript checks🎨 Styling and Customization
The documentation uses custom CSS located in packages/docs/styles/website.css with:
DreamLend branding colors
Responsive design
Dark/light mode support
Custom components and layouts
📝 Writing Guidelines
Markdown Standards
Use clear, descriptive headings
Include code examples with syntax highlighting
Add emojis for visual appeal and navigation
Use tables for structured data
Include links to related sections
Code Examples
// Always include complete, working examples
const dreamLendContract = new ethers.Contract(
"0xddDa4e2B1B8E6f06086F103dA6358E7aCbd020ec",
DREAMLEND_ABI,
provider
);API Documentation
Complete function signatures
Parameter descriptions
Return value details
Usage examples
Error handling
🔗 Links and Resources
DreamLend App: dreamlend.finance
GitHub: github.com/dreamlend
Discord: discord.gg/dreamlend
Twitter: @DreamlendFi
🤝 Contributing
We welcome contributions to improve the documentation:
Fork the repository
Create a feature branch
Make your changes
Test locally
Submit a pull request
Contribution Guidelines
Follow the existing formatting and style
Test all code examples
Update navigation in SUMMARY.md
Add screenshots for UI-related documentation
Keep content up-to-date with protocol changes
📄 License
This documentation is licensed under the MIT License. See the LICENSE file for details.
🆘 Support
If you need help with the documentation:
Create an issue on GitHub
Join our Discord for real-time support
Email us at [email protected]
Built with ❤️ for the DreamLend community - Making DeFi accessible through comprehensive documentation.
Last updated
