Git Product home page Git Product logo

dreammelter / agfzb-cloudappdevelopment_capstone Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ibm-developer-skills-network/agfzb-cloudappdevelopment_capstone

0.0 0.0 1.0 805 KB

Capstone Project for IBM Full Stack Cloud Dev cert on Course Era.

Home Page: https://tac-x0-dealerapp.us-south.cf.appdomain.cloud

License: Apache License 2.0

Python 14.67% HTML 9.53% CSS 33.21% JavaScript 42.12% Dockerfile 0.27% Shell 0.19%

agfzb-cloudappdevelopment_capstone's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m @dreammelter, a kid who grew up making art and tinkering with websites.
  • ๐Ÿ‘€ Iโ€™m interested in building interactive experiences or tools that leverage both art and tech.
  • ๐ŸŒฑ Iโ€™m currently learning Svelte / Astro (for web) and Python (for 3D/Games) in my free time. Then C# for uni. ๐Ÿ”ฅ This is fine. (0u0 ) ๐Ÿ”ฅ
  • ๐Ÿ’ž๏ธ Iโ€™d like to collaborate on game or tech art projects (if you're open to new kids)
  • ๐Ÿ“ซ You can reach me on Twitter/BlueSky (or just about anywhere else on the web) at the same username. ๐Ÿ‘

agfzb-cloudappdevelopment_capstone's People

Contributors

dreammelter avatar ibm-skills-network-bot avatar lavskillup avatar shiningbox avatar upkarlidder avatar

Watchers

 avatar

Forkers

ermyas04

agfzb-cloudappdevelopment_capstone's Issues

Get all dealerships for a state

So one interpretation of the provided instructions is to use a Cloud function to query the database by state.
(Another option would be to filter all the results with Django... so fine for a small project/database)

Create index in database

I've made two for testing: state-index and single-state-index

  • state-index includes the multiple fields needed
  • single-state-index just looks for the state code

Went back to just a single index: dealersByState - will try using the use_index option in another test query.

{
   "index": {
      "fields": [
         "st"
      ]
   },
   "name": "dealersByState",
   "type": "json"
}

Create Cloud Function to Query Database

Running the public Cloudant function "List-query-indexes" lists all of them there.
Running the exec-query-find one, however, runs into an error stating there aren't any queries.

Because of this, I'm not sure if the "create index" step was done right. I have 3 or 4 different IBM API docs open to add to the confusion.

Custom Cloud Function Suggestion

The following has been suggested for the state query filter:

if(params.state){
    return { 
            query: {fields : ['id','city','state','st','address','zip','lat','long','short_name','full_name'], 
            "selector":{st:{"eq":params.state}}}, include_docs: true}
}

The include_docs bit means I can throw away the pass-the-docs step. Or would this be part of it?

Others have reported not passing the parameter as a string (just with CA, for ex.) causes trouble. (This is while manually testing the API. We could easily account for that with toString() or something.)

Somebody make it make sense please...

Prettify Dealer listing page(s)

If there's anything to really add...

The table filters dealers by state, but... it doesn't implement the "get dealers by state" feature at all.
Could maybe add a link to that somewhere?

Get Dealers By State

Probably gonna run through this last as it'll need a new API link and extra fiddling.

  • Create route in API
  • Create method in restapis module (mirror get_dealer_reviews_from_cf)
  • Update views to use new API function
  • Add new URL/Template? (or just add a button to homepage? sounds like extra js)

TIP:

"The only diff from the CF version is adding a URL parameter arg:
get_request(url, **kwargs) โ†’ e.g get_request(url, dealerId=dealerId)

See also: #14 (comment)

Create Cloud Function Endpoints

Create the following Cloud Function Endpoints and APIs:

  • Get all dealerships
  • #39
  • #40
  • Post review for a dealership

Create APIs:

  • Get All Dealerships
  • ?? Get state Dealerships
  • Get reviews for dealership
  • Post review

(If you run into an issue, maybe convert the task into one.)

Run GitHub Action Workflow?

Yeah the first one just failed due to login issue (group names are case-sensitive)

Now the staging step of the second is failing and states it has trouble finding my key file. (Which makes sense. However we're gonna expose a new secret key in the mean time.)

Create view to add dealer reivews

Task 4/4 to create the proxy services for the Cloud functions.
Create add_review view to post dealer review

This should wrap up the general implementation of the backend features.

Add Signup View

Create Django view to handle signup request.

This should complete the (initial) User Management tasks.

Prettify Review Pages

Clean-up/polish task (which may be in the "dynamic pages" milestone but eh.)

  • Update reviews on dealership page
  • update review form itself

As mentioned in #17 (comment)

Revise for production deployment

May be a "wontfix" thing depending on time constraints.
But they seem like simple enough revisions to some settings.

Run through the Deployment checklist, but I mostly want to

  • turn off debug mode
  • #60

Include Dealer names as arg

It'd be nice to have the name of the dealer on their detail/review page. Easiest way to do that would be to pass it along with the dealer ID, instead of calling the API again.

Update reviews with Watson NLU

Task 3/4 to create the proxy services for the Cloud functions.
Incorporate Watson NLU in get_dealer_details view for analyzing review sentiment

Create Base Template / Refactor About + Contact

Wasn't gonna go with this at first but I may as well.

I only updated the navbar links on one template page, so when the About/Contact started working, they were still using the placeholder.

We'll start with refactoring those two pages to extend a base template before we deploy to cloud or tamper with the others.

  • Create Base.html
  • Refactor About page
  • Refactor Contact page
  • Verify the links and pages still load.

Add artifacts and deploy

"Add deployment artifacts for the app so it can be managed by Kubernetes"

  • Create deployment.yaml
  • deploy with IBM k8s

Create view to get dealer list

Task 1/4 to create the proxy services for the Cloud functions.
Create the get_dealerships view to get the list of dealers.

Create view for dealer reviews

Task 2/4 to create the proxy services for the Cloud functions.
Create the get_dealer_details view to get the all the reviews for a dealer.

Cleanup Navbar

PLACEHOLDER UPDATES

  • Show actual name/username
  • update href/action links:
    • navbar title
    • navbar login/logout/sign up
    • About and Contact (#5 has this listed?)

FIX / CLEANUP

NAVBAR: Spacing on login items
NAVBAR: Styling for links to about/contact

Originally mentioned: #1 (comment)

Import Full review data

Looks like I only imported the partial version.

This should help clear up any of the broken reviews I submitted for testing, too.
(We will have to update our randint() method used to give reviews an ID in the add_dealer_review method.)

Submit project for review!

URLs to Gather:

That should do it for Tasks 1-7

User Functionality

Ensure the user can...:

  • filter dealerships by state
  • click a dealership and see all reviews
  • sign up using "sign up" button
  • login if they're already registered
  • logout if they're logged in
  • submit a review if they're registered

That should take care of Tasks 8-13

Admin Functionality

Ensure a registered admin can...:

  • login into the app/admin site
  • can logout of app
  • can add new car make and model
  • can see newly added cars in admin view form

That should handle remaining Tasks 14-17

General Functionality

  • "Use Bootstrap to make application more intuitive"

Review submissions are broken

"ValueError at /djangoapp/review/4/Solarbreeze
Field 'mdid' expected a number but got 'Signal - Twice - 2017'."

Great. Something about L176 in views.py?

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.