I have used angular from 2016-2018 and never really got a chance to play with nestjs, though I have been primarily using ApolloGraphQL, Express, and Fastify as api-servers through out my career. I would request to overlook framework-specific best practices if not followed properly. I wanted to clarify just to be on the same page.
We could have used 0Auth or Passport like libraries to wrap it all up in abstract fashion but that wouldn't really have been a test or demonstration of skills, I chose the route of custom-impelementation of token-creation and refresh-token route to demonstrate code-quality and my style of programming.
I have also used TypeORM which is a great tool for SQL like database but I always wanted to use it with mongoDB. It did great except a few things like { select: false } is still returning unselect docs and queryBuilder is not supported for mongoDB. Though, I would always go with mongoose for real-world mongoDB projects (if ORM is needed).
I am available through the email to reason anything particular if you find confusing in the project or implementation.
-Saad Abbasi
- Backend Language: TypeScript
- Backend Framework: NestJS@10
- Frontend Language: TypeScript
- Frontend Framework: React@18
- Database: MongoDB
- ORM: TypeORM
Once the repository is fetch, navigate to the project folder
git clone https://github.com/isaadabbasi/easygen-assignment
# considering no alias for clone used
cd easygen-assignment
Make sure you have Docker 🚢 installed and running on your system.
Goto Frontend folder
Copy sample.env
to new file .env
Goto Backend folder
Copy sample.env
to new file .env
# pwd: <path-to-project>/easygen-test
cd ./frontend
cp sample.env .env
cd ../backend
cp sample.env .env
make build
Open up a new terminal instance and run
make up-backend
Open up a new terminal instance and run
make up-frontend
make test-backend