A full-stack web application for property price prediction and intelligent property recommendations. This system combines machine learning capabilities with a modern web interface to help users predict property prices and find suitable properties based on their preferences.
- Property Price Prediction: Predict property prices based on various features using machine learning models
- Property Recommendations: Get personalized property recommendations based on user preferences
- Modern UI: Responsive and intuitive user interface built with Next.js and React
- REST API: Complete backend API for prediction and recommendation services
- Real-time Processing: Fast prediction and recommendation generation
- Next.js 14: React framework for production
- TypeScript: Type-safe development
- Tailwind CSS: Utility-first CSS framework
- React Components: Custom UI component library
- Shadcn UI: High-quality React components
- Python 3.x: Core programming language
- FastAPI: Modern, fast web framework for building APIs
- Machine Learning: Models for price prediction and recommendations
- Pandas/Numpy: Data processing and manipulation
.
├── app/ # Next.js app directory
│ ├── layout.tsx # Root layout component
│ ├── page.tsx # Home page
│ └── globals.css # Global styles
├── components/ # React components
│ ├── ui/ # Reusable UI components
│ ├── navbar.tsx # Navigation bar
│ ├── hero.tsx # Hero section
│ ├── about.tsx # About section
│ ├── footer.tsx # Footer component
│ ├── price-prediction.tsx # Price prediction component
│ └── property-recommendation.tsx # Recommendations component
├── backend/ # Python backend
│ ├── api/
│ │ ├── main.py # FastAPI application entry point
│ │ ├── recommendation.py # Recommendation logic
│ │ └── __init__.py
│ ├── datasets/
│ │ └── appartments.csv # Property dataset
│ ├── models/ # Machine learning models
│ ├── services/ # Business logic services
│ └── requirements.txt # Python dependencies
├── hooks/ # Custom React hooks
├── lib/ # Utility functions
│ ├── api.ts # API client functions
│ └── utils.ts # Helper utilities
├── public/ # Static assets
└── styles/ # Global stylesheets
- Node.js 18+ and npm/pnpm
- Python 3.8+
- Git
- Navigate to the project root:
cd Price-Prediction-and-Recommendation-System- Install dependencies:
pnpm install
# or
npm install- Create a
.env.localfile for environment variables (if needed):
NEXT_PUBLIC_API_URL=http://localhost:8000- Navigate to the backend directory:
cd backend- Create a Python virtual environment:
python -m venv venv
source venv/Scripts/activate # On Windows
# or
source venv/bin/activate # On macOS/Linux- Install Python dependencies:
pip install -r requirements.txtTerminal 1 - Frontend (Next.js):
pnpm dev
# or
npm run devThe frontend will be available at http://localhost:3000
Terminal 2 - Backend (FastAPI):
cd backend
python -m api.main
# or
uvicorn api.main:app --reloadThe backend API will be available at http://localhost:8000
Frontend:
pnpm build
pnpm startBackend:
cd backend
uvicorn api.main:app --host 0.0.0.0 --port 8000- POST
/api/predict- Predict property price based on features- Request: Property features (location, size, bedrooms, etc.)
- Response: Predicted price
- POST
/api/recommend- Get property recommendations- Request: User preferences and criteria
- Response: List of recommended properties
Create .env.local in the root directory for frontend configuration:
NEXT_PUBLIC_API_URL=http://localhost:8000
- Price Prediction Component: Form for property price prediction
- Property Recommendation Component: Interface for getting recommendations
- Navbar: Navigation and branding
- Hero Section: Landing page hero component
- Footer: Application footer
- main.py: FastAPI application setup and route definitions
- recommendation.py: Property recommendation algorithm
- services/: Business logic implementation
- models/: Machine learning model management
The system uses a property dataset stored in backend/datasets/appartments.csv containing various property features used for training and predictions.
- Frontend: ESLint + Prettier (TypeScript/React)
- Backend: PEP 8 compliance
- Frontend: Add components in
components/and wire them inapp/page.tsx - Backend: Add routes in
api/main.pyand implement logic in service modules
- Backend not connecting: Ensure the FastAPI server is running and
NEXT_PUBLIC_API_URLis correctly configured - Port conflicts: Change ports in development commands if defaults are in use
- Missing dependencies: Reinstall with
pnpm installorpip install -r requirements.txt
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is part of the OpenMRS initiative.
For issues or questions, please check the project documentation or contact the development team.