This project is a real estate business project for advertising properties and showing them in a 360 degrees environment. HTML, CSS and JS used for front-end and NodeJS and ExpressJS used for back-end. The list of used technologies and packages mentioned in down of the page.
In order to make this project works in your local machine, you need some requirements :
- Node JS : download and install nodeJS
- Mongo DB : download and install MongoDB
- Studio 3T (a shell-centric cross-platform MongoDB management tool) : this item is optional, in case if you want to use provided database file and have no expertise to import database file from CMD or terminal, you will need this GUI. download and install studio3T
- A text editor like vsCode
git clone https://github.com/alibkm95/DreamHome-html-css-js.git
open you terminal and insert the following commands :
cd ./backend
npm install
cd ../frontend
npm install
cd ../cms
npm install
- import DREAMHOME.agz - importing database guide
- use BSON-mongodump archive to import
- copy your mongoURI. it must be a string like this :
mongodb://<username>:<password>@<host>:<port>/<database>?<options>
in this case it must be something like this :mongodb://myUserName:myPassword@127.0.0.1:27017/DREAMHOME?retryWrites=true&serverSelectionTimeoutMS=5000&
. if you did not set any user name and password to your connection, you dont need to<username>:<password>@
section
in your text editor go to backend directory and create a file called .env and set the following variables in the file
MONGO_URI
=your connection stringCOOKIE_SECRET
=encryption key for cookies. you can get a random secret from hereJWT_SECRET
=encryption key for tokens. you can get a random secret from hereEMAIL_SERVICE
=gmail
(you can use gmail accounts for sending email in nodemailer here is a guid for setup gmail account)EMAIL_HOST
=smtp.gmail.com
EMAIL_HOST_PORT
=the port of email host (usualy its 587)EMAIL_AUTH_USER
=the gmail accounts user name (example@gmail.com)EMAIL_AUTH_PASSWORD
=the gmail app password that you got from your google account earlierORIGIN
=http://localhost:3000/frontend/verify.html
(this origin used to send a verification email to registered user)RESET_ORIGIN
=http://localhost:3000/frontend/resetpass.html
(this origin used to send a reset password link to requested user)NODE_ENV
=development
(in production mode it could be "production")PORT
=5000
the port of backend server works with.
open new terminal and insert following commands :
cd ./backend
for development
npm run dev
for production
npm run start
go to frontend directory and find index.html and open it with live server
your live server extension setting must be use 3000
as port and localhost
as host. otherwise you will get CORS errors.
- if you don't using provided database, just create a new account with a valid email address. after validating your email, in user panel you can access to admins dashboard. (the first account will be considered as ROOTADMIN)
- if you did use provided database, use the user information below:
- ROOTADMIN: email: rootadmin@gmail.com | password: RootAdmin1
- ADMIN: email: admin@gmail.com | password: AdminUser1
- USER: email: testuser1@gmail.com | password: TestUser1