Estate Expert - consultantjay/LTIMEARN GitHub Wiki
Estate Expert
Estate Expert is an informative web application that serves people with the details of multiple residential properties for the purpose of rent or buy in US. Users can easily view and choose their desired home in various cities according to their requirements such as budget and many more.
Product Description
Estate Expert is a real-estate listing and searching web application developed using MEAN stack. It allows users to search residential properties across multiple cities depending upon their needs and also enables them to view the full details of the properties they are interested in. The information provided is clear and accurate.
Features to be delivered
Search all properties. Search specific properties using multiple filters such as County and City. View the list of properties. Sort list of properties based on Price and Year Built. View the full details of each property listed. Map view of each property to help users compare multiple properties on the basis of location. Map view of multiple properties. Know more about Estate Expert. Contact for any query.
Future Scope
Comparing multiple properties. Providing contact details of the owner/agent of a particular property. Booking of residential properties. Expansion of data set to further include more services and across several countries.
About
Estate Expert is built on MEAN Stack technology which includes:
MongoDB
Node.js
Express.js
Angular
React
MongoDB
MongoDB is a document database with the scalability and flexibility that you want with the querying and indexing that you need. MongoDB is a free and open-source cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemas. MongoDB is developed by MongoDB Inc., and is published under a combination of the GNU Affero General Public License and the Apache License.
Why No SQL?
When compared to relational databases, NoSQL databases are more scalable and provide superior performance, and their data model addresses several issues that the relational model is not designed to address:
Large volumes of rapidly changing structured, semi-structured, and unstructured data. Agile sprints, quick schema iteration, and frequent code pushes. Object-oriented programming that is easy to use and flexible. Geographically distributed scale-out architecture instead of expensive, monolithic architecture. Coding standards used for MongoDB: Consistency in naming conventions and existing styles in file. Unit testing for each module. Proper comments included wherever necessary. ReStructured Text and Typesetting: Placing spaces between nested parentheticals and elements in JavaScript examples. For example, prefering { [ a, a, a ] } over {[a,a,a]}. Maintaining backwards compatibility.
Node.js
Node.js is an open-source, cross-platform JavaScript run-time environment that executes JavaScript code server-side. Historically, JavaScript was used primarily for client-side scripting, in which scripts written in JavaScript are embedded in a webpage's HTML and run client-side by a JavaScript engine in the user's web browser.
Coding standards used for Node.js:
Keep lines shorter than 80 characters.
Tab spaces must be 2 spaces.
Curly braces: Use:
function(){
..}
instead of:
function()
{..}
Comma first:
Use:
var alpha = [ 'A'
`, 'B'`
`, 'C'`
`]`
Using single quotes for strings.
Callback should be the last argument in list.
Always create a new Error object with your message. Don't just return a string message to the callback. Stack traces are handy.
Naming conventions:
Use UpperCamelCase for class names. Use lowerCamelCase for identifiers. Create logger using npmlog utility.
null, undefined: Don't set things to undefined. Reserve that value to mean "not yet set to anything. Boolean objects are forbidden.
Express.js
Express.js, or simply Express, is a web application framework for Node.js, released as free and open-source software under the MIT License. It is designed for building web applications and APIs.It has been called the de facto standard server framework for Node.js.
Coding standards used for Express.js:
2 spaces – for indentation Single quotes for strings No semicolons No unused variables Always use === instead of == – but obj == null is allowed to check null || undefined.
Angular
Angular (commonly referred to as "Angular 2+" or "Angular v2 and above") is a TypeScript-based open-source front-end web application platform led by the Angular Team at Google and by a community of individuals and corporations. Angular is a complete rewrite from the same team that built AngularJS.
Coding standards used for Angular:
Proper naming conventions should be used for file structure. Single responsibility feature should be used, which makes the application cleaner, easy to read and maintain. Proper naming naming conventions across the project is vital for maintaining consistency. Bootstrapping: Avoid putting app logic in main.ts. Instead, consider placing it in a component or service. Directive selectors: lower camel case for naming the selectors of directives. Unit test file names: Naming test specification files the same as the component they test. Coding conventions Classes: Upper camel case when naming classes. Constants: Declaring variables with const if their values should not change during the application lifetime. Properties and methods: Lower camel case to name properties and methods.
React
In computing, React (also known as React.js or ReactJS) is a JavaScript library for building user interfaces. It is maintained by Facebook and a community of individual developers and companies.React can be used as a base in the development of single-page or mobile applications. Complex React applications usually require the use of additional libraries for state management, routing, and interaction with an API.
Coding standards used for React:
Destructuring props: It makes assigning object properties to variables feel like much less of a chore. One tag, one line Wrap up: Only write JSX on the right side of an = or a return. Functionality MongoDB queries are used to access list of required details from the Database.
Documents: 6000
Fields : 23
Node.js Query example. Documents are returned on the basis of County and/or City provided. Hotel Name and description is returned by the following query.
//*1. Search by County and City`
var mongojs=require('mongojs');
var db=mongojs('Project',['property']);
db.property.find({County:"NH-Grafton",City:"Canaan"},
`{_id:0}`
`function(err,res){`
`console.log(res);`
``});`
The Service APIs are called whenever an event is hit on the User Interface. Express APIs are written in node.js with callback functions to avoid any blocking, and allows other code to be run in the meantime.
var express = require('express');
var app=express();
var bodyParser = require('body-parser');
app.use(bodyParser.json());
var mongojs=require('mongojs');
var db = mongojs('Project',['property']);
app.use(express.static(__dirname)); //to tell server that this is root folder
//2. Service call for list user
app.get('/',function(req,res){
`db.property.find(function(err,docs){res.json(docs);`
})
});
app.listen(3000);
console.log("Running on port 3000");