Expert assistant for developing a Next.js 15 multifamily real estate valuation platform with Python AI processing, document analysis, and financial modeling capabilities.
An expert development assistant for the Multifamily AI Valuation platform - an AI-powered valuation tool for multifamily real estate that processes rent rolls, T12 statements, and offering memorandums to generate comprehensive financial analyses.
This skill provides expert guidance for working with a Next.js 15 application that combines:
When working with this codebase, use these commands:
```bash
npm run dev # Start development server (localhost:3000)
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
npm run type-check # Run TypeScript type checking
```
```bash
npm run docker:dev # Start development with Docker Compose
npm run docker:prod # Start production with Docker Compose
npm run docker:build # Build Docker images
npm run docker:down # Stop all Docker services
npm run docker:logs # View Docker logs
./install.sh # Complete Docker setup with all services
```
```bash
cd ai_processing
source venv/bin/activate
pip install -r requirements.txt
python3 src/main.py --rent-roll <path> --t12 <path> --om <path> --output-dir <path> --job-id <id>
```
Understand the codebase organization:
```
src/
├── app/ # Next.js App Router
│ ├── api/ # API endpoints (auth, properties, processing, exports)
│ ├── dashboard/ # Property dashboard pages
│ ├── properties/ # Property management UI
│ └── calculator/ # Financial calculators
├── components/ # React components (UI + business logic)
│ ├── ui/ # Shadcn/ui base components
│ ├── Phase3Dashboard.tsx # Advanced analytics dashboard
│ ├── DocumentPreview.tsx # Document viewer with AI annotations
│ └── ExportPanel.tsx # Multi-format export interface
├── hooks/ # Custom React hooks (useWebSocket, useProperties, useMCP)
├── lib/ # Utility libraries
├── types/ # TypeScript definitions
└── globals.css # Tailwind CSS with custom variables
ai_processing/ # Python AI processing system
├── src/
│ ├── main.py # Main processing pipeline
│ ├── document_processor.py # PDF/Excel parsing
│ ├── ai_analyzer.py # AI-powered analysis
│ ├── financial_modeler.py # Financial projections
│ └── report_generator.py # Multi-format reports
├── config.json # Processing configuration
└── requirements.txt # Python dependencies
```
The Python AI system follows this workflow:
1. **Document Processing** (`document_processor.py`)
- PDF parsing using pdfplumber and PyPDF2
- Excel parsing with pandas and openpyxl
- Extract rent rolls, T12 statements, offering memos
2. **AI Analysis** (`ai_analyzer.py`)
- OpenAI integration for document insights
- Unit mix and rent analysis
- Occupancy and financial performance
- Risk assessment and investment grading
3. **Financial Modeling** (`financial_modeler.py`)
- Multi-year investment projections
- Cash flow analysis with growth assumptions
- Returns analysis (cap rates, NOI, appreciation)
- Sensitivity analysis
4. **Report Generation** (`report_generator.py`)
- Excel workbooks with financial models
- PDF executive summaries
- PowerPoint pitch decks
- JSON data exports
1. **Check existing patterns** in similar API routes or components
2. **Use TypeScript types** from `src/types/` - don't create duplicates
3. **Follow App Router conventions** for page and layout files
4. **Use Shadcn/ui components** from `src/components/ui/` for consistency
5. **Implement WebSocket updates** for long-running operations
6. **Add proper authentication checks** using NextAuth session verification
7. **Validate file paths and ownership** for security
1. **Verify authentication** with `getServerSession` where required
2. **Implement error handling** with appropriate HTTP status codes
3. **Add rate limiting** for expensive operations
4. **Return consistent JSON structures** matching existing patterns
5. **Update TypeScript types** if response structures change
1. **Check `config.json`** for financial assumptions and settings
2. **Set `OPENAI_API_KEY`** environment variable for AI features
3. **Test with sample documents** in `ai_processing/sample_data/`
4. **Handle errors gracefully** and return structured error responses
5. **Update processing status** via WebSocket for UI feedback
```env
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-secure-32-character-secret
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
```
```env
DATABASE_URL=postgresql://user:pass@localhost:5432/db
REDIS_URL=redis://localhost:6379
SMTP_HOST=smtp.gmail.com
OPENAI_API_KEY=your-openai-key
ANTHROPIC_API_KEY=your-anthropic-key
```
Always implement:
Before committing:
1. Upload → Validation → File system storage
2. Processing → AI extraction → Data analysis
3. Real-time Updates → WebSocket → UI components
4. Results → Multiple export formats → Download links
5. Notifications → Email templates → Investor communications
1. **Read relevant files** before proposing changes
2. **Understand existing patterns** in similar features
3. **Check TypeScript types** to ensure type safety
4. **Verify authentication requirements** for new endpoints
5. **Test with Docker** if changes affect infrastructure
6. **Update documentation** if adding significant features
7. **Consider WebSocket integration** for long-running operations
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/multifamily-property-ai-valuation-assistant/raw