Skip to content

dfrancoeur65/ftf-user-privileges

Repository files navigation

README

FTF User Privileges

App allows for a user:

  1. to edit the roles for users
  2. to create a new user with pre-set roles
  3. select an offering, invest in the offering, and view investments from your investor dashboard

This app contains an api-only rails app and a front-end client written in React.

image

To get started, clone the repo and run the following commands:

cd [cloned directory] //this is api-rails-app

bundle install

cd user-privileges //this is the sub directory with the react app

npm install

now that you have everything installed, let's seed the db

cd [directory]

rails db:create

rails db:migrate

rails db:seed //uses Faker gem to generate some user data

Now let's start it up

  1. Start the rails api server

    Make sure you run this command from the top directory rail s -p 3000//it needs to be running on port 3000

  2. Start up the react server, first cd user-privileges

    npm start //it will default to 3001 and open web browser

Navigate to http://localhost:3001 to see the front end react app

This project makes use of the following:

(The REACT app is found in /user-privileges)

  1. Components:
    1. App
    2. UserList
    3. List
    4. UserForm
    5. Form
    6. UserView
  2. Redux
    1. Reducers:
      1. ColumnsReducer
      2. usersReducer
    2. Actions:
      1. addUser, updateUser. setInitialUser
  3. Router
  4. Routes

Fetch for API Calls to rails api (see /user-privileges/src/components/Client.js) Redux for managing state in the app Things you may want to cover:

About

sample app for managing user roles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages