GithubHelp home page GithubHelp logo

niirshops's Introduction

NiirShops

A fullstack web Application that locates nearby shops.

Present Features

-A user can sign up using a username and a password
-A user can sign in using his username and password
-A user can browse through nearby shops sorted by distance
-A user can browse through his preferred shops
-A user can like/add a shop to his preferred list
-A user can dislike a shop to hide it for 2 hours (well actually it's 10 secs for demonstration purposes)
-A user can remove a shop from his preferred list

Technologies

This application is made using the MEAN stack "Mongodb Express Angular Nodejs"
Besides the main technologies we used ipapi.co api to dynamicaly get the user's location

Important Note

This app is using the Geolocalisation(longitude and latitude) to calculate distances
Do not reload the application pages cuz user data will be lost (waiting for enhancement)

Missing Features

well.. we need only to wait for further developpement thoughts

Details

Operational

This application permits a user to authenticate using a username and a password to see the available shops sorted by distance. The distance is calculated using mathematical equations on the real latitude and longitude of the shops to make it easier to integrate with geolocation apis such as google places and so on.
The user then can like a shop to add it to his preferred shops list, as well as he can dislike it to hide it for a certain amount of time (10 seconds in our case for demonstration purposes).
In case the user added some shops to his preferred shops list, he can remove them from ther as well.

Choices I made

I could have gone with a radius parameter to show only nearby shops depending on the dinamically fetched user location, BUT i had already started with an architecture that is suitable for google-places-web api (has already a radius param) and i couldn't change much when i figured the horrible limit of requests quota of the service.
And this doesn't go for only the radius but also the shops as they are hard coded in the database and not fetched dynamically depending on the user's location or using an api, thus they are only arbitraty places with real longitude and latitude coordinates.(but it will later)

This application has weak security management (no tokens no hash and salt for passwords no protection vs sql injections) because i only wanted to bring the MVP as soon as possible and then progressively polish the application features by time.

How to run the app

installing packages

1)Open a cmd/terminal in NodeApp and another one in AngularApp.
2)In both type "npm install" and then press enter.
..After the installation is finished
3)in NodeApp cmd/terminal type "node server.js" and then press enter.
4)in NodeApp cmd/terminal type "ng serve -o" and then press enter.

testing

-If you want to really test the localisation functionnality run a vpn on your computer on china or america and see how the fetched data will get sorted (after re-login of course).
--just be sure to run a vpn on your system and not the browser, because node is the one handeling the localisation api and node doesn't run on the browser.

Further thoughts

-enhance security of authentication through JWT and use sessions
-Implementing google places Api to dynamically get real life nearby shops

niirshops's People

Contributors

imrane-akkouh avatar

Watchers

 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.