Welcome to the Decentralized Rental Marketplace! This repository contains both a backend (Node/Express/PostgreSQL) and a frontend (React/ChakraUI/Firebase) for a sample DApp that allows users to list and rent items in a trust-minimized way.
-
backend/
- Built with Node.js and Express.js
- Connects to a PostgreSQL database using a PostgreSQL driver (e.g.
pg
) - Exposes RESTful endpoints for the rental marketplace functionality
-
frontend/
- Built with React and styled using Chakra UI
- Uses Firebase Authentication for user login and Firebase Storage for images
- Interacts with the backend endpoints for data and integrates with any on-chain or off-chain logic as needed
- Node.js (version
18.20.4
recommended)- MacOS and Linux users can install via nvm for easier version management.
- PostgreSQL (if running locally)
- Make sure you have a running PostgreSQL instance and the correct connection details.
-
Clone the repository:
git clone https://github.com/blockchainuci/rental-marketplace cd rental-marketplace
-
Install Dependencies
- Backend dependencies:
cd backend npm install
- Frontend dependencies:
cd ../frontend npm install
Once you’ve installed both, you can return to the project root if desired.
- Backend dependencies:
You will need two terminals (or background processes), one for the backend and one for the frontend.
cd backend
npm start
By default, it should run on http://localhost:3001/
.
(Check backend
code or environment variables to confirm the port.)
- Open new Terminal on your Code Editor
cd frontend
npm start
This should open a new browser window at http://localhost:3000/
.
-
Click on
backend
repository to create new file called.env
- Copy and paste backend env to
.env
file (Dev Secrets)
- Copy and paste backend env to
-
Click on
frontend
repository to create new file called.env
- Copy and paste frontend env to
.env
file (Dev Secrets)
- Copy and paste frontend env to
- Create a new branch (
git checkout -b feature/my-feature
) - Commit and push your changes
- Create a Pull Request