I have implemented simple CRUD operations for user management.
I have used Node.js as javascript runtime environment, Express.js as the backend framework and MongoDB as the database.
- Available API endpoints:
-
GET /api/users?page={page}&search={search} - Get all users with pagination and search
-
POST /api/users - Create a new user
-
PUT /api/users/:id - Update user details
-
DELETE /api/users/:id - Delete a user
-
- Clone the repository
- Run
npm install
to install all the dependencies - Create a .env file in the root directory and add the following environment variables:
mongoURI=<your_mongo_uri>
- Run
node index.js
to start the server
The frontend is built using Next.js(React.js) and Tailwind CSS. I have utilised NextUI for the UI components.
The frontend is a simple user dashboard where you can view, add, update and delete users. One can click on the columns to sort the users based on the column and can also search for a user.
- Clone the repository
- Run
npm install
to install all the dependencies - Run
npm start
to start the server