Skip to content

Conversation

@abe2dev
Copy link
Owner

@abe2dev abe2dev commented Apr 20, 2022

No description provided.

@helgakern
Copy link

QUIZ 3

SCORESHEET FOR IBRAHIM

TOTAL: 115/125

TOTAL PERCENTAGE: 92/100%

LEGEND

Icon Value
correct
wrong
no value

Build a bidding website with a Rails JSON API and a React client.

Part 1: Rails HTTP API – Auction and Bid CRUD

Value: 20

Score: 20/20

Build a Rails JSON API. Based on the wireframes, at the bottom of this page, choose which columns you will need for your application's models.

Feature Mark Notes
Implement create, show and index actions for Auctions.
Auctions should have many Bids.
Implement the create action for Bids.

Part 2: Rails HTTP API – User Authentication

Value: 20

Score: 10/20

Add user authentication.

Feature Mark Notes
Implement a SessionsController.
Add a create action to sign-in users.
Add a destroy action to sign-out users.
Only authenticated users can:
Create auctions.
Create bids.
Users must be associated to the auctions and bids they create.

CORS and Serializers set up?

Value: 15

Score: 15/15

Part 3: React Client – Public Routes

Value: 20

Score: 17.5/20

Build a React Client for the JSON API. Use the wireframes below as a guide.

Implement the following page components:

Feature Mark Notes
WelcomePage display welcome text. There is no welcome text.
AuctionIndexPage lists all auctions.
AuctionShowPage shows a single auction. the AuctionShowPage is illustrated in the wireframes.
Create a NavBar to navigate between WelcomePage and AuctionIndexPage.

Part 4: React Client – Sign In

Value: 15

Score: 15/15

Add support in the client for user authentication:

Feature Mark Notes
Implement a SignInPage and link to it in the NavBar.
Only show the SignInPage link if the user is not signed in. Otherwise, display their name.
Submitting the form on the SignInPage updates the session cookie and updates the React application state with the user.

Part 5: React Client – Auctions and Bidding

Value: 15

Score: 12.5/15

Add support for auctions and bids in the client:

Feature Mark Notes
Implement the AuctionNewPage shown below to allow authenticated users to create bids. There's no link to Auction New Page in the Navbar.
After successfully creating a new auction, redirect the user to its AuctionShowPage.
Implement the ability to bid on auctions from the AuctionShowPage.

Part 6: React Client – Authenticated Routes

Value: 10

Score: 10/10

Create a component to redirect users attempting to access unauthorized routes.

Feature Mark Notes
Create a AuthRoute component based on react-router-dom's Route component.
AuthRoute takes an isAllowed prop. When the prop is true, let the route render the given component. When the prop is false, redirect the user to the SignInPage. In all other respects, it functions like the Route component.
Use it to prevent users from accessing the AuctionNewPage if they are not signed-in.

Stretch 1: Sign Out

Value: 2

Value: 2/2

Add the ability for users to sign out.

Feature Mark Notes
Add a Sign Out link to the NavBar that is only shown to signed-in users.
Clicking it signs out the user. Removing them from the application state and removing their id from the session cookie.

Stretch 2: Sign Up

Value: 3

Value: 3/3

Add the ability for users to sign up from the frontend client.

Feature Mark Notes
Implement a UserController with a create action to allow users to sign up through the API. Creating a user should also sign in the user meaning that the create action must return a JWT.
Implement a SignUpComponent to create a user.
Add a link to the SignUpComponent in the NavBar if the user isn't signed in.

Stretch 3: Auction States

Value: 5

Value: 0/5

Support auction states.

Feature Mark Notes
Add support for states, draft, published and reserve met, to the auction model.
When created an auction should be set to the draft state. In draft state, the auction is only visible to the author.
Implement a Publish button, only visible to the author of the auction, in the AuctionShowPage.
When clicked, this sets the auction's state to published. All published auctions should be visible.
When a user bids higher than the auctions reserve price, set the reserve met state on the auction. This can only happen on published auctions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants