Mars-EMS is a full-stack web application that simulates an Employee Management System for, both, the accountant and HR departments. It uses Google Sheets as a database and Google OAuth 2.0 for authentication. It allows users to manage employees, their salaries, bonuses, penalties, and more. It also calculates the total payroll for each month and displays it in a dashboard. The EMS stands for an employee management system which was built to help companies reduce their time spent regarding the Accounting and HR departments. It helps with generating salaries, penalties, bonuses, etc. Employing a new staff member is only a few clicks away or giving an end date takes one click. It contains many other features, like giving loans to employees, tracking their installments, making annual/ monthly reports, and much more. It looks and feels great thanks to great structure and design, and even though it possesses many features, the complexity is hidden from the end-user. So it always appears easy to use, no matter what functionality level you choose. It uses ReactJS (AND its entire ecosystem) on the frontend and NodeJS (SailsJS) + MongoDB/ Mongoose on the backend.
Tech | Docs | Description |
---|---|---|
ReactJS | A JavaScript library for building user interfaces | |
Node.js | A JavaScript runtime environment that executes JavaScript code outside a web browser | |
Express | A web application framework for Node.js | |
MongoDB | A cross-platform document-oriented database program | |
Bootstrap | A popular front-end framework for building responsive web pages | |
Redux | A state management library for JavaScript applications | |
OAuth2 | An open standard for access delegation | |
React Router | A collection of navigational components for React applications | |
CSS3 | A style sheet language for describing the presentation of web pages | |
Redux Forms | A library for managing form state in Redux applications | |
Redux Thunk | A middleware for writing async logic that interacts with the Redux store | |
Google Sheets API | An API for reading and writing data to Google Sheets | |
Sails.JS | A framework for building Node.js applications with a modern MVC architecture | |
Lodash | A utility library for manipulating and iterating over arrays, objects, and strings | |
Google App Scripts | A scripting platform for automating tasks across Google products and third-party services | |
Restful API | An architectural style for designing web services that provide a uniform interface for interacting with resources |
In order to run & use this app locally, follow these steps:
- Clone the repository:
git clone https://github.com/dzenis-h/Mars-EMS
- Install the necessary dependencies: Run
npm install
in all three folders:- ROOT folder (
Mars-EMS
). - BACKEND folder (
Mars-EMS\backend
). - FRONTEND folder (
Mars-EMS\frontend
).
- ROOT folder (
- Add your own credentials:
- Go to Google Cloud Console
- Create a new project.
- Enable the Google Spreadsheets API.
- Create OAuth credentials - for the client choose Web client
- Copy the Client ID and paste it inside of the config file (
frontend\src\config\config.js
). - Don't forget to do similar for the backend -Look into the 'client_secret' JSON file for more info.
- For the backend, youβll have to choose 'Otherβ aka Installed.
- Download the file and save it inside of the backend (its root) folder under the name 'client_secret.json'.
- NOTE: Both of them have to point to the same project. Additionally, if you want to use a remote MongoDB storage, youβll have to edit the
connections.js
file and change your preferences. The file is located inside of thebackend\config\connections.js
file.
- Now letβs start the project:
- Run an instance of your local MongoDB:
mongod
[ Important β this needs to start first ] - Run the following command inside of the root folder:
npm start
- NOTE: It will start the NodeJS backend and the ReactJS frontend at the same time.
- Run an instance of your local MongoDB:
- Itβs time to log in: The login restriction has been removed (by default). To log in, you can use your Gmail account.
- Previously, the login was restricted, and to log in you had to use the email which I was providing. If youβre still interested in changing the default behavior, you can achieve that, on a basic level, by editing the config file located in
frontend\src\config\config.js
- This part is very important: After you get redirected, copy the code received from Google, go back to localhost: 3000 or Heroku (depending on where you're doing the testing), paste it into your app, and confirm.
- Previously, the login was restricted, and to log in you had to use the email which I was providing. If youβre still interested in changing the default behavior, you can achieve that, on a basic level, by editing the config file located in
Contributions are always welcome! If you would like to contribute to this project, please follow these steps:
- Fork the repository. π΄
- Create a new branch. π΅
- Make your changes and test them thoroughly. π¨βπ»
- Submit a pull request. β
This project is licensed under the MIT License. See the LICENSE file for more details.
This project was created by Dzenis H.
"If you like what you see, please consider giving a βοΈ