DefiFundr is a secure, blockchain-powered platform that streamlines payroll and invoice management for modern businesses. Built with React, TypeScript, and integrated with multiple blockchain networks including Solana, Ethereum, and StarkNet.
- Automated Payroll Processing - Smart contract-based salary disbursements
- Multi-Currency Support - Crypto (USDC, SOL, ETH) and fiat payments
- Invoice Management - Transparent, blockchain-verified invoicing system
- Employee Dashboard - Real-time payment tracking and history
- Multi-Signature Security - Enterprise-grade wallet integrations
- KYC/KYB Verification - Compliant business onboarding
- Cross-Chain Compatibility - Support for multiple blockchain networks
- React 18 with TypeScript
- Tailwind CSS for styling
- Web3.js/ethers.js for blockchain interactions
- WalletConnect for wallet integrations
- Go APIs for business logic
- PostgreSQL & Redis for data management
- gRPC/Kafka for event-driven architecture
- Solidity (Ethereum/StarkNet smart contracts)
- Cairo (StarkNet for scalability)
- Rust (Solana programs)
- USDC/USDT stablecoin support
Before you begin, ensure you have:
- Node.js (v18 or higher) and npm installed
- Git for version control
- Code editor (Visual Studio Code recommended)
- Access to the private DefiFundr repository
- MetaMask or compatible Web3 wallet for testing
-
Clone the private repository:
git clone https://github.com/defifundr/defifundr-web-app.git
-
Navigate to the project directory:
cd defifundr-web-app -
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env.local
Update the
.env.localfile with your configuration:REACT_APP_API_BASE_URL=https://api.defifundr.com REACT_APP_SOLANA_RPC_URL=your_solana_rpc_url REACT_APP_ETHEREUM_RPC_URL=your_ethereum_rpc_url REACT_APP_WALLETCONNECT_PROJECT_ID=your_walletconnect_id
- Always use Tailwind's predefined classes
- Avoid arbitrary values (square bracket notation)
- Maintain design system consistency
// Correct: Use predefined Tailwind classes
<div className="w-full h-64 text-lg p-4 m-2 bg-blue-500 rounded-lg shadow-md">
<button className="px-6 py-3 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 transition-colors">
Connect Wallet
</button>
</div>
// For DefiFundr brand colors
<div className="bg-indigo-600 text-white border-indigo-500">
Brand Elements
</div>// Incorrect: Avoid arbitrary values
<div className="w-[345px] h-[200px] text-[17px] p-[15px] bg-[#4F46E5]">
Content
</div>When a specific size isn't available in Tailwind:
- Use the closest predefined class
- Combine multiple classes if needed
- Consult the team for design system updates
| Instead of | Use |
|---|---|
w-[345px] |
w-80 or w-96 |
text-[17px] |
text-base or text-lg |
p-[15px] |
p-4 |
h-[200px] |
h-48 or h-52 |
bg-[#4F46E5] |
bg-indigo-600 |
Always create branches from the main branch:
For new features:
git checkout main
git pull origin main
git checkout -b feature/descriptive_feature_nameExamples:
git checkout -b feature/wallet_integrationgit checkout -b feature/payroll_dashboardgit checkout -b feature/invoice_creation
For bug fixes:
git checkout main
git pull origin main
git checkout -b fix/descriptive_fix_nameExamples:
git checkout -b fix/wallet_connection_errorgit checkout -b fix/payroll_calculation_bug
For urgent hotfixes:
git checkout main
git checkout -b hotfix/critical_issue_nameUse descriptive commit messages following this format:
For features:
git commit -m "feature: brief description of the feature"Examples:
git commit -m "feature: add MetaMask wallet connection"git commit -m "feature: implement payroll scheduling interface"git commit -m "feature: add multi-signature approval flow"
For fixes:
git commit -m "fix: brief description of the fix"Examples:
git commit -m "fix: resolve wallet disconnection issue"git commit -m "fix: correct payroll amount calculation"
For documentation:
git commit -m "docs: update API documentation"`For styling:
git commit -m "style: improve responsive design for mobile"`- Always target the
mainbranch - Ensure your branch is up to date before creating PR
- Include description of changes and testing performed
- Request review from at least one team member
- Ensure all CI checks pass
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Performance improvement
## Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing completed
## Wallet Integration Testing
- [ ] MetaMask connection tested
- [ ] Phantom wallet tested (for Solana)
- [ ] Transaction signing verified-
Install ESLint and TypeScript ESLint:
npm install eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin --save-dev
-
Install React ESLint plugin:
npm install eslint-plugin-react --save-dev
-
Create or update
eslint.config.js:import react from "eslint-plugin-react"; import tseslint from "typescript-eslint"; export default tseslint.config({ settings: { react: { version: "18.3" }, }, plugins: { react, }, rules: { ...react.configs.recommended.rules, ...react.configs["jsx-runtime"].rules, // DefiFundr specific rules "no-console": "warn", "no-unused-vars": "error", "prefer-const": "error", }, });
npm startOpen http://localhost:3000 to view in the browser.
npm run buildnpm run previewnpm testnpm run test:watchnpm run test:coveragenpm run test:blockchain- Never commit private keys or sensitive data
- Use environment variables for API keys
- Validate all user inputs
- Implement proper error handling for wallet connections
- Regular dependency updates for security patches
# Add to .gitignore
.env.local
.env.development.local
.env.test.local
.env.production.localnpm run deploy:stagingnpm run deploy:production-
Ensure you're on the
mainbranchgit checkout main git pull origin main
-
Create a new branch following naming conventions
git checkout -b feature/your_feature_name
-
Make your changes and commit with proper format
git add . git commit -m "feature: descriptive commit message"
-
Push to the branch
git push origin feature/your_feature_name
-
Create a pull request targeting the
mainbranch
- All PRs require at least one approval
- Blockchain-related changes require review from senior developer
- UI/UX changes should include screenshots
- API integrations must include testing documentation
Wallet Connection Failed:
- Ensure MetaMask is installed and unlocked
- Check network configuration
- Verify RPC endpoints in environment variables
Build Errors:
- Clear node_modules:
rm -rf node_modules && npm install - Check TypeScript errors:
npm run type-check
API Connection Issues:
- Verify API endpoints in
.env.local - Check network connectivity
- Confirm authentication tokens
This project is proprietary and confidential. Unauthorized copying, distribution, or modification is strictly prohibited.
Β© 2024 DefiFundr. All rights reserved.