Leafe is a real estate platform where users can buy and sell houses, land, apartments, or any type of property you can live on.
The project aims to provide a modern and reliable way to connect buyers and sellers in the real estate market, with features like property listings, image uploads, authentication. The app does not provide any form of transaction, aiming to let it to the users to negotiate in their way.
IF YOU WANT TO SEE DETAILS IN EACH AREA
- About
- Architecture
- Features
- Getting Started
- Project Structure
- Environment Variables
- Database Migrations
- Scripts
- Contributing
- License
leafe is a modular application built with:
- Backend: TypeScript, Node.js (with Prisma for ORM)
- Frontend: Likely a web UI (in TypeScript, CSS/SCSS)
- Messaging: RabbitMQ for async communication between components
- Deployment: Docker + Docker Compose
This project is under active development. Some parts (migrations, environment configs) require setup.
┌────────────┐ ┌────────────┐ ┌──────────────┐
│ Frontend │ ←→ │ Backend │ ←→ │ RabbitMQ │
└────────────┘ └────────────┘ └──────────────┘
↑ ↑ ↑
Docker containers & networking via compose
- RESTful API backend with JWT based authentication
- Database schema managed with Prisma
- Asynchronous tasks via RabbitMQ
- Frontend UI with shadcn and react
- Containerization with Docker for consistent local/dev environment
Make sure you have installed:
- Node.js (v20+)
- npm or yarn 22
- Docker & Docker Compose (if you plan to use containers)
- Access to a PostgreSQL database (or whichever DB you configure)
-
Clone the repository:
git clone https://github.com/toniswx/leafe.git cd leafe -
Install dependencies:
# in backend cd backend npm install # in frontend cd ../frontend npm install
-
Setup database migrations:
# back in backend folder npx prisma migrate dev --name init
Create a .env file (or similar) in the backend with settings like:
# .env
# URI
DATABASE_URL="postgresql://user:password@host:port/db-name?schema=public"
# credentials
POSTGRES_USER=...
POSTGRES_PASSWORD=...
POSTGRES_DB=...
PORT=5000
JWT_SECRET=YOUR_JWT_SECRET
JWT_SECRET_REFRESH=YOUR_REFRESH_SECRET
JWT_ADM_SECRET=YOUR_ADMIN_SECRET
JWT_VERIFY_CODE=YOUR_VERIFY_CODE_SECRETAlso configure any RabbitMQ connection settings if required (host, port, user, pass).
# From the root:
# run backend
cd backend
npm run dev
# run frontend
cd ../frontend
npm run devFrontend will likely be served on something like http://localhost:3000 (or similar), backend on http://localhost:5000, etc.
There's a docker-compose.yml in the root:
docker-compose up --buildHere’s the high‑level layout:
├── backend/
├── frontend/
├── rabbitmq/
├── Dockerfile
├── docker-compose.yml
├── .env / .env.example
├── README.Docker.md
├── package.json
└── etc.
Here are the main ones needed in .env (backend):
| Variable | Purpose |
|---|---|
DATABASE_URL |
DB connection string |
POSTGRES_USER |
DB user |
POSTGRES_PASSWORD |
DB password |
POSTGRES_DB |
DB name |
PORT |
Port number backend listens on |
JWT_SECRET |
Secret for signing JWT access tokens |
JWT_SECRET_REFRESH |
For refresh tokens |
JWT_ADM_SECRET |
For admin role or privileged auth |
JWT_VERIFY_CODE |
For verification flows (email, SMS, etc.) |
Some useful scripts (in package.json) include:
npm run dev— start in development modenpm run build— build for productionnpm start— run the built production server- etc.
If you’d like to contribute: This is a solo dev project, keep it in mind.
For questions, suggestions, or issues, contact the maintainer:
- Open a issue in this repo or mail me at [email protected]
- GitHub: toniswx