This is a small user and groups management system. Relies on ReactJS & Redux. For testing I'm using Enzyme.
https://users-management-xlgpheumid.now.sh
Install all the dependencies running the following command
npm install
/users
This endpoind expects a JSON array of objects and returns a list of users and the groups the user has assigned
[{
name: 'Karen',
groups: [{id:1},{id:2}]
}, {
name: 'Andres',
groups: [{id:1},{id:2}]
}]
/groups
This endpoind expects a JSON array of objects and returns a list of groups
[
{id:1, name:'Administrator'},
{id:2, name:'Developer'}
]
To start the aplication run
npm run start
To test the aplication run
npm run test
For dev enviornment
npm run dev
For production
npm run start
List all users
http://localhost:3000/users
Create user
http://localhost:3000/users/create
Edit User
http://localhost:3000/users/Karen
List all groups
http://localhost:3000/groups
Edit group
http://localhost:3000/groups/1
Create a group
http://localhost:3000/groups/create
I started developing this app managing the state without Redux, building a high level state at App.js After a few days of developing I realized that managing the state this way was hard, it was difficult to send state to components and update state, so I started over…
Facing the fact that I didn’t know Redux (until today) I started learning as fast as I could, reading posts and watching videos. After a few days of struggle I managed to connect the DevTools and see the magic happen. I was dispatching actions, managing state and monitoring everything.
I’ll keep working on this project adding features like allowing to add one specific permission to a user and not a whole role; refactoring code and testing.