Giter VIP home page Giter VIP logo

recipe-lab's Introduction

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

recipe-lab's People

Contributors

emmacurwen avatar jnlsn avatar mahimshridhar avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mahimshridhar

recipe-lab's Issues

Publish a recipe

  • display publish button when mods are created for a recipe that you own.
  • publishing merges all mods with original recipe DB entry
  • modification DB entry is deleted.

Account deletion

As a user, I want to be able to completely delete my account because GDPR.
As an admin, I want to encourage my users to stay so that their content can still be used by the community.

AC:

  • account deletion page reachable via link from profile page
  • show user's recipe count
  • show user's recipe modification count.
  • show user's recipe bookmark count
  • show recent activity: list of user's who have interacted with your recipes.
  • display message: "Your recipes have been modified x times and bookmarked x times. Are you sure you want to delete your account?
  • In order to delete, User must select a "yes" checkbox and click submit

Profile page dashboard tab

  • Display 5 most recently updated / created recipes on profile.
  • Include link to full list of original recipes
  • Display 5 most recently modified recipes (not owned by user)
  • Include link to full list of modified recipes

User Account Management

As a user, I want to be able to change my personal information to reflect my life changes.

AC:

  • Account settings tab on user profile visible to current user
  • Fields for changing name, email, and user name.
  • If user name is changed, discourage user with a message: "Changing your username will change the URL to all of your recipes, which may make them difficult to find." or something
  • link to account deletion

Add a "follow me" button

  • Display in profile page header
  • Display in recipe page bio
  • Do not show for logged in user
  • If not logged in, clicking follow me will prompt user to sign in or create an account
  • If logged in, clicking follow me will save relationship to the DB
  • If relationship exists, change "follow me" to "unfollow"
  • Clicking "unfollow" deletes the relationship
  • follow: creates record in DB
  • unfollow: deletes DB record
  • display user's follower count in profile header
  • if follower count is less than ten, display as "< 10"

Profile page connections tab

  • Add a connections tab to the profile page
  • List all user's connections under the connections tab
  • display maximum ~25 connections w/ pagination
  • connections can be filtered via search input

Placeholder for step ingredients

When the firs step of the first item has no ingredients:

  • hand drawn representation of ingredients
  • actual add ingredients button
  • on click: remove placeholder ingredients

Placeholder for recipe items

When recipe has no items:

  • Hand drawn sketch of recipe item w/ steps
  • actual add item button
  • hand drawn prompt to click add item button
  • on click, remove placeholder graphic and replace with item editor

Profile page account tab

  • bio is editable
  • name is editable
  • photo can be uploaded
  • photo can be deleted
  • changes are saved to database
  • validate email & password

Admin User Account Management

As an admin, I want to be able to make changes to an user so that I can correct errors, grant permissions, and delete ghost accounts.

AC:

  • Account settings tab is visible to admins on all profile pages.
  • Account settings has additional user role field.

Deletion countdown

When deleting a modification, show a countdown / warning that it will be permanent. Allow cancelling the deletion before the countdown finishes.
AC

  • when not permanently deleting, countdown does not show
  • countdown shows when permanently deleting
  • user can cancel the delete countdown
  • on countdown finish, remove the modificaion

Profile page header

  • If count < 10, show as "<10"
  • Display recipes modified count
  • Display recipes posted count
  • Display user name
  • Display photo
  • display short bio

Remove carousel and replace with single image upload.

AC

  • Recipe only shows one image
  • Carousel dependency is removed
  • Recipe db is updated to only store one photo
  • RecipeCarousel component is renamed and refactored to be functional w/ hooks apis
  • Upload logic moved from recipe details into new photo component
  • New component uses react and apollo hooks api

Profile Page bookmarks tab

  • only show bookmarks tab to profile owner
  • display paginated list of bookmarked recipes
  • list can be filtered via search input

Recipe status bar

As a user, I want to see details about the edits I've made to a recipe, so that I know when to publish it.

Emma note - The buttons don't necessarily need to do anything for this story. Just focus on display

  • status bar does not show unless modifications exist.
  • status bar shows total modifications
  • status bar shows "publish" button for recipe owners
  • status bar shows "saving" status
  • stats bar shows countdown to auto save
  • option to forego countdown (save now)
  • do not show countdown, do not call save function when user is not logged in
  • stats bar shows warning if user is not logged in + login button

Merge localstorage changes upon sign in

As a user I want my "offline" changes to be saved "online" when I sign in to my account.
AC:

  • If modification does not exist in DB, create it silently.
  • If modification does exist in DB, prompt user about overwriting it.
  • Options are: Attempt to merge, overwrite with offline changes, discard offline changes
  • Attempt to merge: copy over any mods from localstorage, overwriting the fields where there is a conflict.
  • Overwrite: replaces DB entry with localstorage data
  • Discard: does nothing
  • On merge, clear localstorage
  • when attempt to merge is selected, warn user of potentially odd results.

Refactor RecipeDetails as functional component

Refactor RecipeDetails as functional component with react hooks api. The image uploader will be removed from this component (see #38), so implementing apollo hooks api for the uploader is not necessary. Recipe creation, however, will need to implement the apollo hooks api.

AC

  • Implements react hooks api
  • Implements apollo hooks api (for recipe creation only)

Save to localstorage when user is not signed in

AC

  • modifications are saved to local storage when user is not signed in
  • displays a warning that changes are only saved to user's computer
  • warning prompts user to sign in or sign up for account to save permanently.

What are our User Roles?

kitchen porter

  • can modify and save recipes privately
  • can book mark recipes
  • can publish on own path (/chef/username/recipes/recipename)
  • can create recipes which are not indexed, have no bio, and do not link to an author's page
  • recipe's can be shared via url, but are not searchable on the site or via search engine.
  • is presented with incentives to apply for verified chef status (future)

sous chef

  • can publish recipes publicly with a bio and link to author page
  • recipes are searchable via the site and search engine

commis chef

  • can write ponderings

executive chef

  • all of the above plus account management powers!

Start new recipe from scratch

  • New recipe button navigates to blank recipe page
  • Slug is not sexy (random cuid)
  • Title/description area is set to editing mode by default
  • On save: recipe is created in the DB
  • On save: unique sexy slug is generated
  • On save: Browser path updated with sexy slug

Bio placeholder

  • if no bio, generate a generic one like "Jay is an executive chef on recipe lab. He has posted x recipes and modified x"
  • otherwise display user's bio

Activity stream

As a user I want to see how my recipe is being used and be updated about recipes and users that I follow.

AC

  • query for modifications to the user's recipes
  • query for bookmarks of the user's recipes
  • query for followers of the user
  • query for published updates to a recipe that the user has bookmarked or modified in the past
  • query for new recipes from a user that the active user is following

Validate title / description fields

On new recipe creation:

  • Title, description, skill, and servings must be provided before saving
  • Editing cannot be dismissed / canceled
  • No photo upload field

On existing recipe edit:

  • Blank title, description, skill, or serving highlights field in red and shows popover with reason for error
  • Editing can be dismissed
  • On dismiss: invalid text is highlighted in red.

Placeholder for item steps

When item has no steps:

  • hand drawn graphic of recipe steps
  • actual add steps button
  • on click: remove placeholder steps

Profile page dashboard tab v2

  • Display 5 most recently bookmarked recipes
  • include link to full bookmarks list
  • Display ~10 most recent activities

Profile activities include:

  • another user bookmarking your recipe
  • another user modifying your recipe.
  • a recipe that you bookmarked has been updated by the recipe owner
  • a chef that you follow has published a new recipe

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.