Git Product home page Git Product logo

redwood-tutorial's Introduction

Redwood Tutorial App

This is my implementation of the Redwood Tutorial App. It's a pretty full featured blog but it's missing a little depth in some areas. Below I highlight the features, improvements I made, and highlighted a few things missing and noted some rough areas.

Features:

  • Blog feed and article views
  • Blog posting, editing, and deleting with Role Based Access Control (RBAC)
  • Basic commenting system with RBAC moderation
  • Basic access control: login, signup, and logout
  • Contact us form
  • User input validation

Improvements made to the standard tutorial:

  • added admin role to moderator delete comment function
  • added corresponding storybook views and test coverage
  • fixed permission on contact us form graphql so anon user can contact
  • all tests pass

Improvements needed:

  • add name to signup form
  • add email sending
  • add input validation message to comments
  • add account management page
  • complete test coverage: add adminPosts
  • don't show ellipsis on summary if body length < 100
  • check rbac issue with seeded admin viewing admin routes
  • user management (admin only)
  • contact us form response view (admin only)

Notes:

  • comments tests fail after db migration add userId to post in chap 7 accessing current user, leading to the fixes to scenarios mentioned above
  • chap 7 RBAC has PrivateSet but my code has Private, as does their github repo
  • web/src/components/Post/EditPostCell/EditPostCell.js did not have the function EditPostById, it also does not appear in their repo
  • added missing user-related fields to scenarios and tests, see commit history
  • Redwood CLI mentions you can update but kept it at same version for tutorial

Setup

The tutorial itself contains instructions for getting this repo up and running, but here is a summary of the commands:

git clone https://github.com/redwoodjs/redwood-tutorial
cd redwood-tutorial
yarn install
yarn rw prisma migrate dev
yarn rw prisma db seed
yarn rw dev

Resetting dev database:

yarn rw prisma migrate reset

Adding admin user role:

yarn rw c
> db.user.update({ where: { id: 1 } , data: { roles: 'admin' } })

redwood-tutorial's People

Contributors

bootstrapt avatar

Watchers

 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.