Welcome to the Realyze project! This project is an AI-powered real estate discovery platform with a React frontend and a Django REST framework backend.
This README provides instructions on how to set up and run the project locally.
Before you begin, ensure you have the following installed:
- Node.js and npm or pnpm: For the frontend development.
- Python 3.8+ and pip: For the Django backend.
- PostgreSQL: The database used by the backend.
- Git: For cloning the repository.
-
Navigate to the project root directory in your terminal.
-
Install frontend dependencies using pnpm:
pnpm install
-
Configure frontend environment variables (if any). You might need a
.envfile in the frontend root directory as well, depending on your frontend configuration.
-
Navigate into the
backenddirectory:cd backend -
Create and activate a Python virtual environment:
python -m venv venv source venv/bin/activate # On macOS/Linux # venv\Scripts\activate # On Windows
-
Install backend dependencies:
pip install -r requirements.txt
-
Create a
.envfile in the backend root directory (wheremanage.pyis located).SECRET_KEY='your_super_secret_key_here' DATABASE_NAME='your_realyze_db_name' DATABASE_USER='your_db_user' DATABASE_PASSWORD='your_db_password' DATABASE_HOST='localhost' DATABASE_PORT='5432' EMAIL_HOST_USER='[email protected]' EMAIL_HOST_PASSWORD='your_gmail_app_password' # Use an App Password if you have 2FA on your Gmail account FRONTEND_URL='http://localhost:5173' # Or your frontend's actual URL
Replace the placeholder values with your actual database credentials, Gmail account details, and frontend URL.
SECURITY NOTE: Add
.envto your.gitignorefile to prevent committing sensitive information. -
Configure PostgreSQL Database:
- Ensure your PostgreSQL server is running.
- Create a database with the name you specified in the
.envfile (e.g.,your_realyze_db_name). - Ensure the database user you specified has privileges to connect to and manage this database.
-
Run Database Migrations: With your virtual environment activated in the
backenddirectory, apply the database schema changes:python manage.py makemigrations python manage.py migrate
-
Create a Superuser (Optional but Recommended): You can create an administrator user to access the Django admin panel:
python manage.py createsuperuser
Follow the prompts to set up the superuser.
-
Start the Django backend server: Navigate to the
backenddirectory, activate your virtual environment, and run:python manage.py runserver
The backend server will typically run at
http://127.0.0.1:8000/. -
Start the React frontend development server: Navigate back to the project root directory and run:
pnpm dev
The frontend server will typically run at
http://localhost:5173/. -
Access the application: Open your web browser and go to the frontend URL (defaulting to
http://localhost:5173/).
realyze/
├── backend/ # Django Backend
│ ├── realyze_backend/ # Django Project Settings
│ │ ├── __init__.py
│ │ ├── settings.py
│ │ ├── urls.py
│ │ └── wsgi.py
│ ├── authentication/ # Django Authentication App
│ │ ├── migrations/
│ │ ├── templates/
│ │ │ └── authentication/
│ │ │ └── password_reset_email.txt
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── models.py
│ │ ├── serializers.py
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views.py
│ ├── manage.py
│ └── requirements.txt
├── client/
│ ├── public/ # Frontend Public Assets
│ ├── src/ # React Frontend Source
│ │ ├── assets/
│ │ ├── components/
│ │ │ └── ui/ # Shadcn UI components
│ │ ├── hooks/
│ │ ├── lib/
│ │ ├── pages/
│ │ ├── services/
│ │ ├── store/
│ │ ├── App.css
│ │ ├── App.tsx
│ │ ├── index.css
│ │ ├── main.tsx
│ │ └── vite-env.d.ts
│ ├── .gitignore
│ ├── index.html
│ ├── package.json
│ ├── pnpm-lock.yaml
│ ├── postcss.config.js
│ ├── README.md
│ ├── tailwind.config.ts
│ ├── tsconfig.app.json
│ ├── tsconfig.json
│ ├── tsconfig.node.json
│ └── vite.config.ts
├── .gitignore
└── README.md