Full-stack showcase application to search for near by properties and book them using HERE location API. Based on Node.js, React, typescript and MongoDB.
Check out live demo here
Demo is deployed on Heroku server. You can book properties and also check already booked apointments for the selected property by clicking on the burger icon.
Application has two folders front-end and backend stack.
-
src
foldersrc
folder contains the back-end implementation.
-
app
folderapp
folder contains the front-end code.
Webpack compiles typescript and bundles all the modules and dependencies for both Server and client.
Server bundle goes to dist/server.js
and client bundle goes to public/client.js
.
Applicaition is Dockerized and can be easily setup and run on any machine.
The easiest way to run the application is via docker-compose
.
- Download/Clone the project on local machine
- Rename
.env_template
to.env
- Add HERE Maps REST API key in
.env
file. Check the documentation - run
docker-compose up
- Access the application on
http://localhost:8080
- For test purpose you can access Database with mongo express
http://localhost:8082/db/lodge-in
Note: I left my HERE Maps api key in the file for demo purpose. I will deactivate the keys in the future.
Tech-stack: Node.js
, Typescript
, Express.js
, MongoDB
, TypeDI
, REST
/properties?at=LAT,LONG //Returns the property around Lat/Lon
/bookings //Creates a booking for a property.
/properties/PROPERTY_ID/bookings //Returns the bookings for a property
/bookings
payload schema:
interface BookLocationData {
day: string;
time?: Date;
title: string;
id: string;
address: Address;
distance: number;
position: Position;
}
interface Position {
lat: number;
lng: number;
}
interface Address {
label: string;
countryCode: string;
countryName: string;
state: string;
county: string;
city: string;
district: string;
street: string;
postalCode: string;
houseNumber: string;
}
Tech-stack: React
, Typescript
, html5
, CSS
, Material-UI
, HERE Maps
Framework used frontend include React with Typescript.
Tech-stack: Docker
, Webpack
, Heroku
, mLab
Application can be easily run using docker-compose up
. Webpack bundles the two separate modules i.e. client and server. server bundle resides in dist/server.js
where client bundle resides in public/cilent.js
.
Application is also deployed on Heroku server which uses mLab mongoDB service.