GithubHelp home page GithubHelp logo

notepin's Introduction

LandMarkPin Application

program design and approach

This application is designed into two de-coupled projects.

  • Landmark.API

    • This project is a .Net core Web API using SQL server localDb as its persistence storage. It provides RESTFul API to front-end application. It is using .Net Core entity framework to perform CRUD operations. It is divided into different folders structure for maintain-ability purposes
      • Data : It is Entity Framework Database context class. This class is injected as depednecy into API's repository
      • Entities : This folder contains data model's classes. This Application has two data entity classes : Note & Position
      • Repository : It is repository layer of the API that performs CRUD operation on local database. It has dependency on DbConext class and is injected as dependency into WebApi controller.The repository's methods is designed as Interface INoteRepository and NoteRepository implements that interface.
      • Migrations : This folder contains the auto-generated Db operation performed by entity framework
      • Dependencies : This folder contains external dll that is used in the application. LinqKit is .Net search predicate builder utility.
      • Controller : This folder contains API controller class : NoteController. It provides RESTFull API end points to front end application. End points are as follow :
        • POST /api/note It post a new note to the backend and return 201 http status code
        • GET /api/note?lat='{<user position's latitude'}&lng='{user's position longitude}' .It returns all the notes which are posted in that particular position.
        • GET /api/note/{user}?lat='{<user position's latitude'}&lng='{user's position longitude}' .It returns all the notes which are posted in that particular position for a particular user.
        • GET /api/note/search?query='{search query}'.It searches all the notes in its user and content based on the query.
      • Program.cs & Startup.cs : These are .Net core standard classes. Startup.cs resolves the dependencies, get the connection string and enables CORS for APIs. Program.cs creates an empty database if it does not exist and initiate the secure pipeline.
  • Landmark.Front

    • This project is front end of the application. It is implemented as single page application using AngularJS. It consumes the backend APIs using angular js http and perform data binding to view.The project structure is as follow.
      • app\ core : This folder contains custom javascript of application
        • app.js : This JS file initializes the angular app module and register different angular route
        • LandMarkController.js : This JS file calls API endpoint via Angular $http cobject and binds it to angular view
        • searchController.js This JS file calls search API and binds the result to search view
        • map.js This JS file provider map-related functionalities like drawing on map, closing map info window etc.
      • app\views: This folder contains html templates which loads via angular route into index.html
      • app\lib : Contains Javascript libraries like angular & bootstrap. They are copied as part of NPM build process.

how to run the project

  1. First run the backend API project from LandMark.API folder
    • from visual studio, run LandMark.API project
  2. Then build front-end packages and run the front-end by following below steps
  • From root folder, go to LandMark.Front folder
  • run npm install from command line to install node packages
  • run npm start to start http server
  • browse localhost:8000\index.html for the application main page
  • For the first time , application asks to enable browser geo-location and enter the name. It saves the name to cookies for new notes.

WorK Breakdown Structure

Time spent on each part of application

  • Backend : 7 hours including database creation
  • Frontend : 12 hour : AngularJS + HTML+ CSS markup
  • Documentation : 2 hours : Write README file and comment source code

Limitation

  • I ran out of time and could not implement test coverage
  • It uses SQL server local db
  • It is relying on browser cookie for user session / name

Application functionalities demonstrated

  1. When loaded show all the notes

File

  1. Filter note based on location or user

File

  1. Search : By default Notes are not displayed when search page is viwed. user can show a specific note on Map from table of result.

File

notepin's People

Contributors

tohidsmart avatar

Stargazers

Iman Nemati avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.