Code Monkey home page Code Monkey logo

google-search-item-catalog-student's Introduction

Google Search Through Item Catalog

In this project, you will create a search bar for your item catalog. This will be the final step in your FullStack education. In this project you will see the separation of concerns between a frontend and a backend. This is also the final project before you create your own project. For that reason, there is less step by step and more of a general framework to follow, much as you would have in a final project.

Setup

You'll notice two folders: frontend and backend. The backend already contains a VagrantFile. You should just be able to drop your catalog folder inside that folder and have everything working. You then should be able to run the following commands

cd backend
vagrant up
vagrant ssh

You should then be able to run your project just like you did for the last project.

The frontend is already an Angular project. To get it up and working you should run the following commands OUTSIDE OF YOUR VAGRANTBOX (i.e. in a separate terminal window from which you ran your backend)

cd frontend
npm install

You should now be able to run ng serve and go to localhost:4200 to see the Angular welcome page.

Part I - Connect Frontend and Backend

You should create components for each of your classes in your database_setup.py except for user. You should then display the appropriate information for each component using your JSON methods. You may find this article helpful.

For right now I would just be able to load the data (save the POST requests for a bonus).

Part II - Implement Login through Angular

To me it makes more sense to handle the login on the frontend and only authorize calls to the backend if a user is logged in.

To implement login with Angular you should use Angular X Social Login

Part III - Implement Google Search Bar

The final part will be implementing the Google Search Bar. It will be very similar to the Spotify API Search Bar found in this project

You'll need a search endpoint on your backend. This will be another JSON endpoint. It will take in a search and query the database for all entries that contain the search. It will end up looking something like this though probably a lot less complicated.

You will also need to add bolding to the parts of the search that match what's in the search bar. I would use a pipe to accomplish this task.

Bonus - Implement POST Request

Finish linking your frontend by implementing the ability to add, edit, and delete to your catalog from the Angular frontend. Make sure that you are authorizing users.

google-search-item-catalog-student's People

Contributors

jd12 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.