The HRCom Crud App is a simple application that handles real-life events. It was coded within just under 4 hours per the requirements. Users can create and list events through a user-friendly interface. The backend is built with Express and serves as a REST API, while the frontend is developed using React Vite. It's a CRUD application, but with only Create and Read operations implemented.
The application also includes a suite of tests built with Jest.
- Node.js v16
- MongoDB v5.0 with a database named "hrcom"
To install and run the backend API, follow these steps:
- Navigate to the
api
directory:
cd api
- Install the necessary packages:
npm install
- Start the server:
node -r dotenv/config bin/www
- (Optional) To run the tests for the API, use the following command:
npm run test
To install and run the frontend app, follow these steps:
- Navigate to the
app
directory:
cd app
- Install the necessary packages:
npm install
- Start the server:
npm run start
- (Optional) To run the tests for the App, use the following command:
npm run test
After starting both the backend API and the frontend application, you can use the app to create and list events.
This project was meant to be completed in 4 hours, so there are definitely some work-in-progress elements. These include debugging the tests, creating a database startup script to run indexes and insert dummy data, cleaning up modules in package.json, improving state management in React, and fixing basic errors showing up in the console.
There were many shortcuts used in order to achieve the objective in 4 hours, so some refactoring is in order, especially for components and styles on the frontend. Contributions are welcome! Please feel free to submit a pull request.
This project is licensed under the terms of the MIT license.
If you have any questions or issues, please open an issue in this repository.