The application is a users management tool. Users are identified by the fields: name, email and phone. You can add, edit, and delete users from the application.
Check-out deployment link: https://rele-ai-project-matan.herokuapp.com/
- Vue.js Framework
- State management: VueX
- UI library: Vuetify
- Node.js with Express
- endpoints:
- GET - fetchUsers: returns an array of all users from firestore collection called 'users'
- POST - addUser: gets a user and adds it to the collection, and returns the added user
- POST - updateUser: gets a user and updates their fields in collection by id. Returns the user after the update
- POST - deleteUser: gets a user and deletes it from collection, returns deleted user
- endpoints:
- Firestore DB
- Unit Test: AVAJS library. Each endpoint is checked. The files located at: server/tests/test.index.js
The database structure is structured as follows:
- Users Collection
- User document identified by unique id
- Name
- Phone
- User document identified by unique id
In addition, when client-side reaches the fetchUsers endpoint, the response will be an array of user-objects that also includes id property for each user (the unique id key from firestore). This way, when client-side reaches the updateUser/deleteUser endpoints, we can compare the id we received from the client-side with all the keys in the firestore - so we can easily update/delete a user. This is the main reason I chose this database architecture
- Deployed to Heroku: https://rele-ai-project-matan.herokuapp.com/
Using the vue.config.js (located at client folder) file, the client's build-production folder is created in the server folder. In this way, the server is stored in heroku and can load the client according to the path
To run the project locally, first clone the project and then:
npm install
npm run server
(server runs on port 5000)
npm install
npm run client
(client runs on port 8080)