meddhiaka / employee-management-backend-challenge

REST API using Node.js, Express, and MongoDB (using TypeScript) to manage employee records
MIT License
0 stars 0 forks source link
docker express mongodb mongoose nodejs render typescript

🏆 48 Hour Backend Technical Challenge

The backend solution is an API for managing employees with just 3 controllers, using MongoDB for persistence, request validation with express-validator, and try-catch blocks to make the application understandable and easy to debug.

I personally used a Mongo Docker image and Render for deployment!


Github Workflow

More documentation is included in the issues tab.

I created this workflow with Figjam, a Figma product that is excellent for creating diagrams workflows and even project management ^^
workflow

Playing with the solution

npm run build


npm run dev


// navigate to docker compose
> cd ./db 

// run docker compose file in detached mode
> sudo docker compose up -d

// open the mongo shell to interacte with the database
> docker exec -it personal-mongo-database mongosh

YOURE INSIDE THE CONTAINER NOW YOU CAN LIST DATABASES, USE ONE, DO ANY CRUD OPERATIONS...

    # list all databases
    > show dbs

    # use a specific database
    > use db_name

    # see all the collections of the database selected
    > show collections

    # list all documents in a collection
    > db.db_name.find()

Demos of the backend application in action XD

the test is performed using Thunder Client

I recorded the tests before adding the reqeust validation branch


I recommand to see the issues tag in the process of understandimg the solution (ordered) implementations:

Also reading the mentionned pull request in every issue is a good win !

MIT license forever