REA
├── backend
│ ├── scrapers
│ │ ├── __init__.py
│ │ ├── zillow_scraper.py
│ │ ├── redfin_scraper.py
│ │ └── ... (other site scrapers)
│ ├── app.py
│ ├── cma.py
│ ├── neighborhood.py
│ ├── requirements.txt
│ ├── Dockerfile
│ ├── entrypoint.sh
│ └── README.md
├── nextjs
│ ├── package.json
│ ├── pages
│ │ ├── api
│ │ │ └── chat.ts
│ │ └── index.tsx
│ ├── public
│ ├── tsconfig.json
│ ├── next.config.js
│ ├── Dockerfile
│ └── README.md
├── docker-compose.yml
├── .gitignore
├── .env.example
└── README.md
Ensure you have Docker and Docker Compose installed.
# Build and start all services (backend, frontend, MongoDB)
docker-compose up --build- Backend (FastAPI) runs on
http://localhost:8005 - Frontend (Next.js) runs on
http://localhost:3005 - MongoDB runs on port
27017
To stop the services:
docker-compose down# Navigate to the backend directory
cd backend
# Create a virtual environment and install dependencies
python3.11 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Run FastAPI server
uvicorn app:app --host 0.0.0.0 --port 8005# Navigate to the frontend directory
cd nextjs
# Install dependencies
npm install
# Start the Next.js development server
npm run dev -- -p 3005If the backend setup does not work, follow these steps:
brew install pyenvpyenv install 3.11.6cd /Users/pranav/projects/REA
pyenv local 3.11.6cd backend
rm -rf venv
python3.11 -m venv venv
source venv/bin/activatepip install --upgrade pip
pip install -r requirements.txtIf torch installation fails, install it separately:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpuuvicorn app:app --host 0.0.0.0 --port 8005Add the following to .gitignore:
venv/
.venv/
If venv/ was previously committed:
git rm -r --cached venv
git commit -m "Remove venv from tracking and update .gitignore"If you encounter GitHub push errors due to large files (>100MB), follow these steps:
brew install bfgbfg --delete-files "libtorch_cpu.dylib" .
# OR remove an entire folder
bfg --delete-folders venv .git reflog expire --expire=now --all
git gc --prune=now --aggressive
git push --forceAfter removing large files:
git add .
git commit -m "Clean repo and remove large files"
git push origin main