Demo react application for learning and assignment purpose
This project was bootstrapped with Create React App.
- Clone project :
git clone https://github.com/jaspreet57/salon-staff-management.git
OR using SSHgit clone [email protected]:jaspreet57/salon-staff-management.git
- Move to the project:
cd salon-staff-management
- Install packages:
npm install
- Install json-server:
npm install -g json-server
- Start json-server:
json-server -p 3001 -w db.json
- Open another terminal in same project
- And run
npm start
- Go to browser with link
http://localhost:3000
(note port number in your local running app) - Login with any randon name (Authentication is not in scope of project)
- And that is it !
- I used material design for fast development. It provides well tested and accessible components for all our requirements.
- For displaying list of appointments, I used calendar view instead of list view. This will help user to identify working hours and availability of the staff. Package used is :
@aldabil/react-scheduler
. This page can also be used to create and edit appointments. Clicking on any available area, you can create appointment. - I used json-server for backend development. Use of APIs in application is configured in such a way, that it is very easy to switch from json-server to another real server. You just need to change Base path URL in .env file.
- IMPORTANT - I have put all the validation logic in API call - inside
/src/api/appointments.ts
file. As this is backend job to validate if appointment can be booked or not, this logic should not be written withing react component. Component should capture details and post them and display error if any.
@aldabil/react-scheduler
for calendar view.react-router-dom
for routing between pages.@reduxjs/toolkit
for managing data store. It helps in create Actions and Reducers easily.@mui/material
for UI design@mui/x-date-pickers
for date inputs. - this make it easy to select date and time fields.axios
for calling REST APIs.uuid
for creating unique IDs.VS Code
for development and running application.git
andgithub
for managing code versions and hosting code as a public repository.