import React, { useState, useEffect, useRef } from 'react';
import { Menu, X, Home, DollarSign, PieChart, Users, MessageSquare, FileText, ChevronRight, ChevronDown, Calculator, Map, Search, Filter, Bell, ArrowRight, Check, Zap, Briefcase, Award, Clock, Percent, RefreshCw, Sliders, Compass, Layers, Star, Mail } from 'lucide-react';
export default function App() {
const [isMenuOpen, setIsMenuOpen] = useState(false);
const [activeTab, setActiveTab] = useState('home');
const [loanAmount, setLoanAmount] = useState(250000);
const [interestRate, setInterestRate] = useState(4.5);
const [loanTerm, setLoanTerm] = useState(30);
const [isChatOpen, setIsChatOpen] = useState(false);
const [chatMessages, setChatMessages] = useState([
{ role: 'assistant', content: 'Hello! How can I help you with your investment property financing needs today?' }
]);
const [messageInput, setMessageInput] = useState('');
const [isCalculatorOpen, setIsCalculatorOpen] = useState(false);
const [isPropertySearchOpen, setIsPropertySearchOpen] = useState(false);
const [isDealAnalyzerOpen, setIsDealAnalyzerOpen] = useState(false);
const [activeSection, setActiveSection] = useState('home');
// Deal Analyzer State
const [purchasePrice, setPurchasePrice] = useState(200000);
const [rehabCost, setRehabCost] = useState(50000);
const [afterRepairValue, setAfterRepairValue] = useState(300000);
const [holdingCosts, setHoldingCosts] = useState(5000);
const [closingCosts, setClosingCosts] = useState(3000);
const [realtorFees, setRealtorFees] = useState(6);
const [calculationMethod, setCalculationMethod] = useState('arv');
const [holdingTime, setHoldingTime] = useState(6);
// Loan Guide State
const [loanGuideStep, setLoanGuideStep] = useState(1);
const [loanType, setLoanType] = useState('fix-and-flip');
// Subscription State
const [email, setEmail] = useState('');
const [interests, setInterests] = useState({
deals: true,
rates: true,
guidelines: false,
ninja: false,
va: false
});
const [isSubscribed, setIsSubscribed] = useState(false);
// Map Reference
const mapRef = useRef(null);
// Calculate monthly payment
const calculateMonthlyPayment = () => {
const principal = loanAmount;
const monthlyRate = interestRate / 100 / 12;
const numberOfPayments = loanTerm * 12;
if (monthlyRate === 0) return principal / numberOfPayments;
const monthlyPayment = principal *
(monthlyRate * Math.pow(1 + monthlyRate, numberOfPayments)) /
(Math.pow(1 + monthlyRate, numberOfPayments) - 1);
return monthlyPayment.toFixed(2);
};
// Calculate ROI for fix and flip
const calculateROI = () => {
// Total project costs
const totalCost = purchasePrice + rehabCost + holdingCosts + closingCosts;
// Sale price after realtor fees
const salePrice = afterRepairValue;
const realtorCost = (realtorFees / 100) * salePrice;
const netSalePrice = salePrice - realtorCost - closingCosts;
// Profit
const profit = netSalePrice - totalCost;
// ROI
const roi = (profit / totalCost) * 100;
// Cash on cash return (assuming 25% down payment)
const downPayment = purchasePrice * 0.25;
const cashOnCash = (profit / (downPayment + rehabCost + holdingCosts)) * 100;
// 70% Rule check
const seventyRuleMax = afterRepairValue * 0.7 - rehabCost;
const seventyRuleCheck = purchasePrice <= seventyRuleMax;
return {
totalCost: totalCost.toFixed(2),
netSalePrice: netSalePrice.toFixed(2),
profit: profit.toFixed(2),
roi: roi.toFixed(2),
cashOnCash: cashOnCash.toFixed(2),
seventyRuleMax: seventyRuleMax.toFixed(2),
seventyRuleCheck
};
};
const handleSendMessage = async () => {
if (!messageInput.trim()) return;
// Add user message
const newMessages = [
...chatMessages,
{ role: 'user', content: messageInput }
];
setChatMessages(newMessages);
setMessageInput('');
// Simulate API call to get response
setTimeout(() => {
setChatMessages([
...newMessages,
{
role: 'assistant',
content: "Thanks for your message! Our investment property specialists will review your inquiry and get back to you shortly. In the meantime, feel free to explore our loan options or use our mortgage calculator."
}
]);
}, 1000);
};
const handleSubscribe = () => {
if (email && email.includes('@')) {
setIsSubscribed(true);
// In a real app, you would send this data to your backend
console.log("Subscription data:", { email, interests });
}
};
// Initialize map when component mounts
useEffect(() => {
if (isPropertySearchOpen && mapRef.current) {
// In a real implementation, you would initialize a map library like Google Maps or Mapbox here
console.log("Map initialized");
}
}, [isPropertySearchOpen]);
return (
{/* Navigation */}
Da-Vinci-Strategies
} text="Home" active={activeTab === 'home'} onClick={() => {setActiveTab('home'); setActiveSection('home');}} />
} text="Loans" active={activeTab === 'loans'} onClick={() => {setActiveTab('loans'); setActiveSection('loans');}} />
} text="Property Search" active={activeTab === 'property'} onClick={() => {setActiveTab('property'); setActiveSection('property');}} />
} text="Deal Analyzer" active={activeTab === 'analyzer'} onClick={() => {setActiveTab('analyzer'); setActiveSection('analyzer');}} />
} text="Subscribe" active={activeTab === 'subscribe'} onClick={() => {setActiveTab('subscribe'); setActiveSection('subscribe');}} />
setIsCalculatorOpen(true)}
className="hidden md:flex items-center px-4 py-2 mr-4 rounded-md bg-purple-700 hover:bg-purple-600 text-white transition-all duration-300 shadow-lg hover:shadow-purple-500/30"
>
Calculator
setIsChatOpen(true)}
className="hidden md:flex items-center px-4 py-2 rounded-md bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-500 hover:to-indigo-500 text-white transition-all duration-300 shadow-lg hover:shadow-purple-500/30"
>
Chat Now
setIsMenuOpen(!isMenuOpen)}
className="inline-flex items-center justify-center p-2 rounded-md text-purple-400 hover:text-white hover:bg-purple-800 focus:outline-none"
>
{isMenuOpen ? : }
{/* Mobile menu */}
{isMenuOpen && (
} text="Home" active={activeSection === 'home'} onClick={() => { setActiveSection('home'); setIsMenuOpen(false); }} />
} text="Loans" active={activeSection === 'loans'} onClick={() => { setActiveSection('loans'); setIsMenuOpen(false); }} />
} text="Property Search" active={activeSection === 'property'} onClick={() => { setActiveSection('property'); setIsMenuOpen(false); }} />
} text="Deal Analyzer" active={activeSection === 'analyzer'} onClick={() => { setActiveSection('analyzer'); setIsMenuOpen(false); }} />
} text="Subscribe" active={activeSection === 'subscribe'} onClick={() => { setActiveSection('subscribe'); setIsMenuOpen(false); }} />
} text="Mortgage Calculator" active={false} onClick={() => { setIsCalculatorOpen(true); setIsMenuOpen(false); }} />
} text="Chat Now" active={false} onClick={() => { setIsChatOpen(true); setIsMenuOpen(false); }} />
)}
{/* Main content */}
{activeSection === 'home' && (
<>
{/* Hero Section */}
Specialized Financing for Investment Properties
Unlock the potential of fix-and-flip and investment property opportunities with tailored financing solutions from Da-Vinci-Strategies.
setActiveSection('analyzer')}
className="px-8 py-3 rounded-md bg-gradient-to-r from-purple-600 to-indigo-600 text-white font-medium text-lg hover:from-purple-500 hover:to-indigo-500 transition-all duration-300 shadow-lg hover:shadow-purple-500/30 transform hover:-translate-y-1"
>
Analyze a Deal
setActiveSection('property')}
className="px-8 py-3 rounded-md bg-gray-800 text-white font-medium text-lg hover:bg-gray-700 border border-purple-500 transition-all duration-300 shadow-lg hover:shadow-purple-500/20 transform hover:-translate-y-1"
>
Find Properties
{/* Loan Options Section */}
Specialized Loan Programs
Tailored financing solutions for investors at every level
{/* Process Section */}
Simple Application Process
We've streamlined our process to get you from application to closing faster
{/* Testimonials */}
What Our Clients Say
Real investors share their experiences with Da-Vinci-Strategies
{/* CTA Section */}
Ready to Finance Your Next Investment Property?
Our investment property specialists are standing by to help you get started.
Apply Now
setIsChatOpen(true)}
className="px-8 py-3 rounded-md bg-purple-800 text-white font-medium text-lg hover:bg-purple-700 border border-purple-300 transition-all duration-300 shadow-lg hover:shadow-purple-300/20 transform hover:-translate-y-1"
>
Chat With a Specialist
>
)}
{activeSection === 'property' && (
Investment Property Search
Find your next investment opportunity with our advanced property search tool
{/* Search Filters */}
Search Filters
Property Type
All Property Types
Single Family
Multi-Family
Commercial
Land
Investment Strategy
Any Strategy
Fix & Flip
Buy & Hold
BRRRR
Wholesale
Potential ROI
Any ROI
10%+
15%+
20%+
25%+
Search Properties
Reset Filters
{/* Map and Results */}
{/* This would be replaced with an actual map component */}
Interactive Property Map
In a real implementation, this would be an interactive map showing available properties
Featured Investment Properties
Load More Properties
)}
{activeSection === 'analyzer' && (
AI Deal Analyzer
Calculate potential returns on your next fix and flip or investment property
{/* Input Form */}
{/* Results */}
Deal Analysis Results
Investment Summary
Purchase Price:
${purchasePrice.toLocaleString()}
Rehab Costs:
${rehabCost.toLocaleString()}
Holding Costs:
${holdingCosts.toLocaleString()}
Closing Costs:
${closingCosts.toLocaleString()}
After Repair Value:
${afterRepairValue.toLocaleString()}
Realtor Fees:
{realtorFees}%
Total Investment:
${calculateROI().totalCost}
Profit Analysis
Sale Price (ARV):
${afterRepairValue.toLocaleString()}
Selling Costs:
${(afterRepairValue * realtorFees / 100).toLocaleString()}
Net Sale Price:
${calculateROI().netSalePrice}
Total Investment:
${calculateROI().totalCost}
Net Profit:
= 0 ? 'text-green-400' : 'text-red-400'}`}>
${calculateROI().profit}
{calculateROI().roi}%
Return on Investment
{calculateROI().cashOnCash}%
Cash on Cash Return
{(Number(calculateROI().profit) / holdingTime).toFixed(2)}
Monthly Profit
Deal Analysis
70% Rule Check
The 70% rule states that you should pay no more than 70% of the ARV minus repair costs.
{calculateROI().seventyRuleCheck ? : }
Maximum purchase price: ${calculateROI().seventyRuleMax}
{calculateROI().seventyRuleCheck
? 'This deal passes the 70% rule!'
: 'This deal does not pass the 70% rule. Consider negotiating a lower purchase price.'}
AI Deal Assessment
= 15 ? 'bg-green-500' : Number(calculateROI().roi) >= 10 ? 'bg-yellow-500' : 'bg-red-500'
}`}>
{Number(calculateROI().roi) >= 15
?
: Number(calculateROI().roi) >= 10
?
:
}
{Number(calculateROI().roi) >= 15
? 'This deal shows strong potential!'
: Number(calculateROI().roi) >= 10
? 'This deal has moderate potential.'
: 'This deal may not be profitable enough.'
}
{Number(calculateROI().roi) >= 15
? 'With an ROI of ' + calculateROI().roi + '%, this investment meets typical investor criteria for a fix and flip.'
: Number(calculateROI().roi) >= 10
? 'The ' + calculateROI().roi + '% ROI is acceptable but consider negotiating better terms or reducing costs.'
: 'At ' + calculateROI().roi + '% ROI, this deal carries significant risk. Consider finding a better opportunity.'
}
Financing Options
Fix & Flip Loan
Based on your project parameters:
Loan amount: ${(purchasePrice * 0.8).toLocaleString()}
Down payment: ${(purchasePrice * 0.2).toLocaleString()}
Rehab budget: ${rehabCost.toLocaleString()}
Interest rate: 8.5%
Estimated payments:
Monthly payment: ${((purchasePrice * 0.8 * 0.085) / 12).toFixed(2)}
Loan term: 12 months
Origination fee: 2 points
Apply for This Loan
)}
{activeSection === 'loans' && (
Personalized Loan Options Guide
Find the perfect financing solution for your investment strategy
{/* Loan Type Selector */}
Loan Programs
setLoanType('fix-and-flip')}
className={`w-full text-left px-4 py-3 rounded-md transition-all duration-300 flex items-center ${
loanType === 'fix-and-flip'
? 'bg-purple-700 text-white'
: 'bg-gray-700 text-gray-300 hover:bg-gray-600'
}`}
>
Fix & Flip Loans
setLoanType('rental')}
className={`w-full text-left px-4 py-3 rounded-md transition-all duration-300 flex items-center ${
loanType === 'rental'
? 'bg-purple-700 text-white'
: 'bg-gray-700 text-gray-300 hover:bg-gray-600'
}`}
>
Rental Property Loans
setLoanType('commercial')}
className={`w-full text-left px-4 py-3 rounded-md transition-all duration-300 flex items-center ${
loanType === 'commercial'
? 'bg-purple-700 text-white'
: 'bg-gray-700 text-gray-300 hover:bg-gray-600'
}`}
>
Commercial Loans
setLoanType('bridge')}
className={`w-full text-left px-4 py-3 rounded-md transition-all duration-300 flex items-center ${
loanType === 'bridge'
? 'bg-purple-700 text-white'
: 'bg-gray-700 text-gray-300 hover:bg-gray-600'
}`}
>
Bridge Loans
setLoanType('ninja')}
className={`w-full text-left px-4 py-3 rounded-md transition-all duration-300 flex items-center ${
loanType === 'ninja'
? 'bg-purple-700 text-white'
: 'bg-gray-700 text-gray-300 hover:bg-gray-600'
}`}
>
NINJA Loans
setLoanType('va')}
className={`w-full text-left px-4 py-3 rounded-md transition-all duration-300 flex items-center ${
loanType === 'va'
? 'bg-purple-700 text-white'
: 'bg-gray-700 text-gray-300 hover:bg-gray-600'
}`}
>
VA Loans
Not sure which loan is right for you?
setIsChatOpen(true)}
className="w-full py-2 rounded-md bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-500 hover:to-indigo-500 text-white font-medium transition-all duration-300 flex items-center justify-center"
>
Chat with a Specialist
{/* Loan Details and Process */}
{loanType === 'fix-and-flip' && }
{loanType === 'rental' && }
{loanType === 'commercial' && }
{loanType === 'bridge' && }
{loanType === 'ninja' && }
{loanType === 'va' && }
{loanType === 'fix-and-flip' && 'Fix & Flip Loans'}
{loanType === 'rental' && 'Rental Property Loans'}
{loanType === 'commercial' && 'Commercial Property Loans'}
{loanType === 'bridge' && 'Bridge Loans'}
{loanType === 'ninja' && 'NINJA Loans'}
{loanType === 'va' && 'VA Loans'}
{loanType === 'fix-and-flip' && 'Short-term'}
{loanType === 'rental' && 'Long-term'}
{loanType === 'commercial' && 'Specialized'}
{loanType === 'bridge' && 'Transitional'}
{loanType === 'ninja' && 'Alternative'}
{loanType === 'va' && 'Government-backed'}
{loanType === 'fix-and-flip' && 'Our Fix & Flip loans are designed for investors who purchase properties, renovate them, and sell them for profit. These short-term loans provide the capital needed for both acquisition and renovation.'}
{loanType === 'rental' && 'Our Rental Property loans are perfect for buy-and-hold investors looking to build a portfolio of income-producing properties. These long-term loans offer competitive rates and flexible terms.'}
{loanType === 'commercial' && 'Our Commercial Property loans are tailored for larger investment properties including multi-family, mixed-use, and commercial buildings. These specialized loans accommodate the unique needs of commercial real estate investors.'}
{loanType === 'bridge' && 'Our Bridge loans provide temporary financing to "bridge the gap" between transactions. Ideal for investors who need quick capital while waiting for long-term financing or the sale of another property.'}
{loanType === 'ninja' && 'NINJA (No Income, No Job or Assets) loans are alternative financing options for investors who may not qualify for traditional loans. These loans focus on the property's potential rather than the borrower's documentation.'}
{loanType === 'va' && 'VA loans offer special benefits for veterans and active military personnel. Our VA loan program includes discounts and favorable terms for those who have served our country and are looking to invest in real estate.'}
Loan Features
{loanType === 'fix-and-flip' && (
<>
Loan amounts from $50,000 to $2 million
Terms from 6 to 24 months
Interest-only payments
Up to 90% LTV and 100% of rehab costs
No prepayment penalties
>
)}
{loanType === 'rental' && (
<>
Loan amounts from $75,000 to $5 million
Terms up to 30 years
Fixed and adjustable rate options
Up to 80% LTV
Cash-out refinancing available
>
)}
{loanType === 'commercial' && (
<>
Loan amounts from $250,000 to $25 million
Terms up to 25 years
Amortization up to 30 years
Up to 75% LTV
SBA options available
>
)}
{loanType === 'bridge' && (
<>
Loan amounts from $100,000 to $10 million
Terms from 6 to 36 months
Interest-only payments
Up to 85% LTV
Fast closing - as little as 7 days
>
)}
{loanType === 'ninja' && (
<>
No income verification required
No job verification required
Asset-based lending
Up to 65% LTV
Property-focused qualification
>
)}
{loanType === 'va' && (
<>
No down payment required
Competitive interest rates
No private mortgage insurance
Flexible credit requirements
Special discounts for veterans
>
)}
Qualification Requirements
{loanType === 'fix-and-flip' && (
<>
Credit score: 650+
Experience: Previous flips preferred but not required
Down payment: 10-20% of purchase price
Reserves: 6 months of payments
Property: Residential 1-4 units
>
)}
{loanType === 'rental' && (
<>
Credit score: 680+
Debt-to-income ratio: 50% or less
Down payment: 20-25% of purchase price
Reserves: 6 months of payments
Property: Residential 1-4 units
>
)}
{loanType === 'commercial' && (
<>
Credit score: 700+
Debt service coverage ratio: 1.25+
Down payment: 25-30% of purchase price
Business experience: 2+ years
Property: Commercial, multi-family (5+ units)
>
)}
{loanType === 'bridge' && (
<>
Credit score: 660+
Exit strategy: Clear plan for refinance or sale
Down payment: 15-25% of purchase price
Reserves: 6-12 months of payments
Property: Residential or commercial
>
)}
{loanType === 'ninja' && (
<>
Credit score: Flexible
Income/Employment: Not verified
Down payment: 35-40% of purchase price
Property value: Strong emphasis on property quality
Property: Residential investment properties
>
)}
{loanType === 'va' && (
<>
Eligibility: Veterans, active duty, or eligible surviving spouses
Credit score: 620+ (flexible)
Debt-to-income ratio: 41% or less (can be higher)
Down payment: 0% (no down payment required)
Property: Primary residence (can be multi-unit up to 4 units)
>
)}
Application Process
1
Initial Consultation
Speak with one of our loan specialists to discuss your investment goals and determine the best financing option for your needs.
setIsChatOpen(true)}
className="px-4 py-2 rounded-md bg-gray-700 hover:bg-gray-600 text-white font-medium text-sm transition-all duration-300 flex items-center w-auto"
>
Schedule Consultation
2
Pre-Qualification
Submit basic information to receive a pre-qualification letter outlining your potential loan terms and borrowing capacity.
Start Pre-Qualification
3
Full Application
Complete our comprehensive application and submit required documentation for underwriting review.
Required Documentation:
Property information and purchase contract
Personal financial statements
Business entity documents (if applicable)
Rehab budget and scope of work (for fix & flip)
Exit strategy documentation
4
Underwriting & Approval
Our underwriting team reviews your application and property details to provide a formal loan approval.
Underwriting Process:
Credit and background review
Property appraisal and inspection
Title search and insurance verification
Final loan terms determination
5
Closing & Funding
Sign final loan documents and receive funding. For rehab loans, draw schedules will be established for renovation funds.
Typical timeline from application to funding: 7-14 days for most loans
Ready to get started?
Apply now to secure financing for your next investment property.
Apply Now
setIsChatOpen(true)}
className="px-6 py-3 rounded-md bg-purple-800 text-white font-medium hover:bg-purple-700 border border-purple-300 transition-all duration-300 shadow-lg hover:shadow-purple-300/20 transform hover:-translate-y-1"
>
Chat With a Specialist
)}
{activeSection === 'subscribe' && (
Stay Updated
Subscribe to receive the latest updates on investment opportunities, rate changes, and industry news
{!isSubscribed ? (
Subscriber Benefits
Early access to off-market investment properties
Exclusive rate discounts for subscribers
Monthly market analysis and investment tips
Invitations to exclusive investor networking events
Priority processing on loan applications
Recent Updates
New NINJA Loan Program Launched
Our new No Income, No Job or Assets verification program is now available for qualified investors.
Posted 3 days ago
Interest Rate Update
Fix & Flip loan rates have been reduced by 0.5% for all new applications.
Posted 1 week ago
VA Loan Discount Program
Veterans now eligible for reduced origination fees on investment property loans.
Posted 2 weeks ago
) : (
Thank You for Subscribing!
You've been added to our mailing list. Watch your inbox for exclusive investment opportunities, rate updates, and industry news.
Your Subscription Details:
Email: {email}
Interests: {Object.entries(interests)
.filter(([_, value]) => value)
.map(([key]) => key.charAt(0).toUpperCase() + key.slice(1))
.join(', ')}
You can update your preferences or unsubscribe at any time.
)}
)}
{/* Footer */}
Da-Vinci-Strategies
Specialized financing solutions for investment properties and fix-and-flip projects.
Contact
123 Investment Ave
Suite 456
New York, NY 10001
Phone: (555) 123-4567
Email: info@davinci-strategies.com
© 2023 Da-Vinci-Strategies. All rights reserved. NMLS #12345678
{/* Chat Modal */}
{isChatOpen && (
Chat with a Loan Specialist
setIsChatOpen(false)}
className="text-gray-400 hover:text-white"
>
{chatMessages.map((message, index) => (
))}
setMessageInput(e.target.value)}
onKeyPress={(e) => e.key === 'Enter' && handleSendMessage()}
className="flex-1 rounded-l-lg px-4 py-2 bg-gray-700 text-white border-0 focus:ring-2 focus:ring-purple-500 focus:outline-none"
placeholder="Type your message..."
/>
Send
)}
{/* Calculator Modal */}
{isCalculatorOpen && (
Mortgage Calculator
setIsCalculatorOpen(false)}
className="text-gray-400 hover:text-white"
>
Loan Amount: ${loanAmount.toLocaleString()}
setLoanAmount(Number(e.target.value))}
className="w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer mt-2"
/>
Interest Rate: {interestRate}%
setInterestRate(Number(e.target.value))}
className="w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer mt-2"
/>
Loan Term: {loanTerm} years
{[5, 15, 30].map((term) => (
setLoanTerm(term)}
className={`flex-1 py-2 rounded-md ${
loanTerm === term
? 'bg-purple-600 text-white'
: 'bg-gray-700 text-gray-300 hover:bg-gray-600'
}`}
>
{term} Years
))}
Estimated Monthly Payment
${calculateMonthlyPayment()}
Total Loan Amount
${loanAmount.toLocaleString()}
Total Interest Paid
${((calculateMonthlyPayment() * loanTerm * 12) - loanAmount).toLocaleString(undefined, {maximumFractionDigits: 0})}
setIsCalculatorOpen(false)}
className="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-purple-600 text-base font-medium text-white hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500 sm:ml-3 sm:w-auto sm:text-sm"
>
Apply Now
setIsCalculatorOpen(false)}
className="mt-3 w-full inline-flex justify-center rounded-md border border-gray-600 shadow-sm px-4 py-2 bg-gray-800 text-base font-medium text-gray-300 hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
>
Close
)}
);
}
// Component for navigation items
function NavItem({ icon, text, active, onClick }) {
return (
{icon}
{text}
);
}
// Component for mobile navigation items
function MobileNavItem({ icon, text, active, onClick }) {
return (
{icon}
{text}
);
}
// Component for loan cards
function LoanCard({ title, description, features, featured = false }) {
return (
{featured && (
MOST POPULAR
)}
{title}
{description}
{features.map((feature, index) => (
{feature}
))}
Learn More
);
}
// Component for process steps
function ProcessStep({ number, title, description }) {
return (
);
}
// Component for testimonial cards
function TestimonialCard({ quote, author, role }) {
return (
import React, { useState, useEffect } from 'react';
import { Menu, X, Home, DollarSign, PieChart, Users, MessageSquare, FileText, ChevronRight, ChevronDown, Calculator } from 'lucide-react';
export default function App() {
const [isMenuOpen, setIsMenuOpen] = useState(false);
const [activeTab, setActiveTab] = useState('home');
const [loanAmount, setLoanAmount] = useState(250000);
const [interestRate, setInterestRate] = useState(4.5);
const [loanTerm, setLoanTerm] = useState(30);
const [isChatOpen, setIsChatOpen] = useState(false);
const [chatMessages, setChatMessages] = useState([
{ role: 'assistant', content: 'Hello! How can I help you with your investment property financing needs today?' }
]);
const [messageInput, setMessageInput] = useState('');
const [isCalculatorOpen, setIsCalculatorOpen] = useState(false);
// Calculate monthly payment
const calculateMonthlyPayment = () => {
const principal = loanAmount;
const monthlyRate = interestRate / 100 / 12;
const numberOfPayments = loanTerm * 12;
if (monthlyRate === 0) return principal / numberOfPayments;
const monthlyPayment = principal *
(monthlyRate * Math.pow(1 + monthlyRate, numberOfPayments)) /
(Math.pow(1 + monthlyRate, numberOfPayments) - 1);
return monthlyPayment.toFixed(2);
};
const handleSendMessage = async () => {
if (!messageInput.trim()) return;
// Add user message
const newMessages = [
...chatMessages,
{ role: 'user', content: messageInput }
];
setChatMessages(newMessages);
setMessageInput('');
// Simulate API call to get response
setTimeout(() => {
setChatMessages([
...newMessages,
{
role: 'assistant',
content: "Thanks for your message! Our investment property specialists will review your inquiry and get back to you shortly. In the meantime, feel free to explore our loan options or use our mortgage calculator."
}
]);
}, 1000);
};
return (
{/* Navigation */}
Da-Vinci-Strategies
} text="Home" active={activeTab === 'home'} onClick={() => setActiveTab('home')} />
} text="Loans" active={activeTab === 'loans'} onClick={() => setActiveTab('loans')} />
} text="Investments" active={activeTab === 'investments'} onClick={() => setActiveTab('investments')} />
} text="About" active={activeTab === 'about'} onClick={() => setActiveTab('about')} />
} text="Resources" active={activeTab === 'resources'} onClick={() => setActiveTab('resources')} />
setIsCalculatorOpen(true)}
className="hidden md:flex items-center px-4 py-2 mr-4 rounded-md bg-purple-700 hover:bg-purple-600 text-white transition-all duration-300 shadow-lg hover:shadow-purple-500/30"
>
Calculator
setIsChatOpen(true)}
className="hidden md:flex items-center px-4 py-2 rounded-md bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-500 hover:to-indigo-500 text-white transition-all duration-300 shadow-lg hover:shadow-purple-500/30"
>
Chat Now
setIsMenuOpen(!isMenuOpen)}
className="inline-flex items-center justify-center p-2 rounded-md text-purple-400 hover:text-white hover:bg-purple-800 focus:outline-none"
>
{isMenuOpen ? : }
{/* Mobile menu */}
{isMenuOpen && (
} text="Home" active={activeTab === 'home'} onClick={() => { setActiveTab('home'); setIsMenuOpen(false); }} />
} text="Loans" active={activeTab === 'loans'} onClick={() => { setActiveTab('loans'); setIsMenuOpen(false); }} />
} text="Investments" active={activeTab === 'investments'} onClick={() => { setActiveTab('investments'); setIsMenuOpen(false); }} />
} text="About" active={activeTab === 'about'} onClick={() => { setActiveTab('about'); setIsMenuOpen(false); }} />
} text="Resources" active={activeTab === 'resources'} onClick={() => { setActiveTab('resources'); setIsMenuOpen(false); }} />
} text="Calculator" active={false} onClick={() => { setIsCalculatorOpen(true); setIsMenuOpen(false); }} />
} text="Chat Now" active={false} onClick={() => { setIsChatOpen(true); setIsMenuOpen(false); }} />
)}
{/* Main content */}
{/* Hero Section */}
Specialized Financing for Investment Properties
Unlock the potential of fix-and-flip and investment property opportunities with tailored financing solutions from Da-Vinci-Strategies.
Get Started
Learn More
{/* Loan Options Section */}
Specialized Loan Programs
Tailored financing solutions for investors at every level
{/* Process Section */}
Simple Application Process
We've streamlined our process to get you from application to closing faster
{/* Testimonials */}
What Our Clients Say
Real investors share their experiences with Da-Vinci-Strategies
{/* CTA Section */}
Ready to Finance Your Next Investment Property?
Our investment property specialists are standing by to help you get started.
Apply Now
setIsChatOpen(true)}
className="px-8 py-3 rounded-md bg-purple-800 text-white font-medium text-lg hover:bg-purple-700 border border-purple-300 transition-all duration-300 shadow-lg hover:shadow-purple-300/20 transform hover:-translate-y-1"
>
Chat With a Specialist
{/* Footer */}
Da-Vinci-Strategies
Specialized financing solutions for investment properties and fix-and-flip projects.
Contact
123 Investment Ave
Suite 456
New York, NY 10001
Phone: (555) 123-4567
Email: info@davinci-strategies.com
© 2023 Da-Vinci-Strategies. All rights reserved. NMLS #12345678
{/* Chat Modal */}
{isChatOpen && (
Chat with a Loan Specialist
setIsChatOpen(false)}
className="text-gray-400 hover:text-white"
>
{chatMessages.map((message, index) => (
))}
setMessageInput(e.target.value)}
onKeyPress={(e) => e.key === 'Enter' && handleSendMessage()}
className="flex-1 rounded-l-lg px-4 py-2 bg-gray-700 text-white border-0 focus:ring-2 focus:ring-purple-500 focus:outline-none"
placeholder="Type your message..."
/>
Send
)}
{/* Calculator Modal */}
{isCalculatorOpen && (
Mortgage Calculator
setIsCalculatorOpen(false)}
className="text-gray-400 hover:text-white"
>
Loan Amount: ${loanAmount.toLocaleString()}
setLoanAmount(Number(e.target.value))}
className="w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer mt-2"
/>
Interest Rate: {interestRate}%
setInterestRate(Number(e.target.value))}
className="w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer mt-2"
/>
Loan Term: {loanTerm} years
{[5, 15, 30].map((term) => (
setLoanTerm(term)}
className={`flex-1 py-2 rounded-md ${
loanTerm === term
? 'bg-purple-600 text-white'
: 'bg-gray-700 text-gray-300 hover:bg-gray-600'
}`}
>
{term} Years
))}
Estimated Monthly Payment
${calculateMonthlyPayment()}
Total Loan Amount
${loanAmount.toLocaleString()}
Total Interest Paid
${((calculateMonthlyPayment() * loanTerm * 12) - loanAmount).toLocaleString(undefined, {maximumFractionDigits: 0})}
setIsCalculatorOpen(false)}
className="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-purple-600 text-base font-medium text-white hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500 sm:ml-3 sm:w-auto sm:text-sm"
>
Apply Now
setIsCalculatorOpen(false)}
className="mt-3 w-full inline-flex justify-center rounded-md border border-gray-600 shadow-sm px-4 py-2 bg-gray-800 text-base font-medium text-gray-300 hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
>
Close
)}
);
}
// Component for navigation items
function NavItem({ icon, text, active, onClick }) {
return (
{icon}
{text}
);
}
// Component for mobile navigation items
function MobileNavItem({ icon, text, active, onClick }) {
return (
{icon}
{text}
);
}
// Component for loan cards
function LoanCard({ title, description, features, featured = false }) {
return (
{featured && (
MOST POPULAR
)}
{title}
{description}
{features.map((feature, index) => (
{feature}
))}
Learn More
);
}
// Component for process steps
function ProcessStep({ number, title, description }) {
return (
);
}
// Component for testimonial cards
function TestimonialCard({ quote, author, role }) {
return (
);
}