The California Times Cooking
Full-Stack Project, 2021 (2 weeks)
React | Ruby on Rails | Javascript | PostgreSQL | HTML/CSS
This project is a clone of my holy grail cookbook, The NYT Cooking.
The New York Times Cooking is a digital cookbook platform and cooking guide alike, that helps home cooks discover, save and organize recipes written by its editors. Users can also rate and comment while browsing recipes or curated collections of recipes.
Since this was a self-initiated 2-week project that was built from ground up, I decided on 6 key MVPs that captured the essence of the original project:
Search for recipes.
Collect recipes and filter by categories.
Add ingredients to shopping list.
Rate / Comment on recipes.
Browse recipes by author/category/collection.
Authenticate users
Based on this high level structure, I designed the Postgres schema, using an Entity-Relationship Diagram (ERD) centered around Recipes and Users table:
Sample State
entities: Stores objects and their attributes sent from the server via jBuilder needed to render React components.
ui: Stores boolean values that toggle certain ui components, such as a pop-up, a modal, or a loading screen.
errors: Stores any errors handled by server while being processed by the controller.
session: Stores information about the authenticated user. null when no authenticated user is present.
{ entities: { recipes: { < recipe_attr > }, categories: { < category_attr > } collections: { < collection_attr > } }, ui: { loading: < boolean >, modal: < boolean > }, errors: { login: ["Incorrect username/password combination"], }, session: { currentUserId: 25 } }
Implementation!
After carefully planning the database schema, strategizing state management, and planning front/back-end API routes, all I had left to do was to implement these MVP features!