A javascript based project. was thinking of what to do in pendemic lockdown. recetly like on start of 2020 i gave interview to a Austria base company tourradar so this project is base of following online resources
so this project is basicly a pointer to js related tips which is can be easily skipped as time passes. Any Noob Developer who wanted to explore world of JS and how things can be done in JS way can go through the project and get the insights. I never worked opensource before in my life. and that could be because of self-conscious about sharing my code it has to start some day. so putting its as my 2020 reveleation since feburary 2020 and this one is first repo. Have to start from somewhere....!
project URL https://travelmate.herokuapp.com/
postman setting to save auto token
pm.environment.set("JWT", pm.response.json().token);
- Node (Express)
- React
- Redux
- sass
- Mongo
- Docker
As of now very limited data is present in the app. all locations belongs to UAE so if user is in dubai then it will show accurated location around user otherwise i populated it with dummy data
marking importent aspects for new developers to understand the basics how things can be done. Frontend
- Carousel as vanilla js scrollLeft by default dont have smoth scroll its just jumps
- Redux Config its important to note that if REDUX_DEVTOOLS_EXTENSION_COMPOSE is not agvailable on env app will not work so during dev if you want to check on phone it wont work and through error
- Lazy Loaded Map The whole component it self is lazy loaded on detail of tour is clicked + until session is not returned from api Stripe payment gateway is not loaded so that is lazy loaded too
- If image Not available small trick which works like a charm actually i was very happy first time when i came to know about this.
- Auth Header nothing just if else if user is logged in attach header to request interceptor and on response interceptor if token is not valid anymore just remove localstorage so one place to handle all the fuss.
- Mixins its very handy if ones want to write media quries i guess its best place to use. here is the usage
- close element when clicking outside component belive me there is way of refrence but you can use reference somewhere else but this is not a place to use its better to make one backdrop and listen when clicked on it and close or clear whatever you want.
backend
- CatchAsync a decent way to handle error resolved by promise
- Mongo GeoJson field should be marked as 2dsphere coordinates are in lnglat sequence to get $geoWithin