DEV Community

Cover image for A sample e-commerce web app built with ReactJS, ExpressJS and MongoDB
Linh Truong Cong Hong
Linh Truong Cong Hong

Posted on

A sample e-commerce web app built with ReactJS, ExpressJS and MongoDB

MERN stack which stands for MongoDB, ExpressJS, ReactJS and NodeJS has become a popular choice for fullstack Javascript web developer.

As a personal project for education purpose, I developed a basic bookstore web app with MERN stack.

Through this project, beginners could have a useful resource to understand how to implement ReactJS, Redux, React Router and others related libraries in React ecosystem to build up a functional front-end solution.

In addition, the back-end developed with ExpressJS and MongoDB is also an example for building a web api with Javascript.

Further detail information is available on Homepage of the live demo at:
https://bn-bookstore.herokuapp.com/#/

The source code is available at:
https://github.com/linhtch90/bn_bookstore_public_source

Please give me a Github star ⭐ as a compliment if my effort is useful for you! Thanks!

Discussion (15)

Collapse
noncototient profile image
Bo

Not to hate on this, but is anyone still using MongoDB for new projects? A lot of devs I've spoken with who had chosen to use MongoDB regretted their decision later.

Collapse
bryangarciad profile image
Bryan Ramses Garcia

I believe that all NO-SQL engines are amazing but I also believe that the nature of the data and how we handle it 90% of the times fits better with SQL engines because of the high quality features for relational models, so if we go with hype driven development we can make mistakes choosing tech stack

Collapse
noncototient profile image
Bo

I agree with this, the way most web applications work fits really well with a simple SQL database be it MySQL or PostgreSQL.

Collapse
caigengliang profile image
chase

which one is more in line with the business,which one is batter

Collapse
aquibsayyed42 profile image
aquib sayyed

What's the better alternative? I'm new and looking to learn database.

Collapse
noncototient profile image
Bo

Definitely MySQL.

Thread Thread
aquibsayyed42 profile image
aquib sayyed

Ok thanks

Thread Thread
activenode profile image
David Lorenz • Edited on

To be precise: There is no "better" option of both. I do relate with "many regretted it" because relational database such as MySQL, PSQL (which I recommend over MySQL) are still state-of-the-art but the power of NoSQL DBs such as MongoDB must not be underestimated. I think the problem is that people start with NoSQL databases before they got a proper education how to work with it - I did the same. And hence they feel like missing out their well-known relational structures - which is a valid and fair point.

But I think it is really not as simple as saying: One is better than the other :)

There are a lot of really good "Relational Database vs Document-based Database" articles out there so I would recommend starting to read those and then depending on what fits your needs making the decision 👍

Thread Thread
noncototient profile image
Bo

For beginners nothing can beat MySQL, though. Even for majority of projects a simple relational DB like MySQL or PostgreSQL is the best choice. The only successful use of MongoDB that I know about in the wild is Trello.

Thread Thread
activenode profile image
David Lorenz

I disagree to the extent that as always in business it comes down to a proper pre-analysis. Depending on which type of learner you are NoSQL / SQL can be easier. That really is individual. Stating "Nothing can beat MySQL" is a very absolute expression. In IT things can rarely be seen absolute but always depend on the individual and the business case: linkedin.com/pulse/why-amazon-goog...

Collapse
aitor profile image
dragonDScript

Postgres SQL is the most popular but SQLite3 and MySQL are fine :)

Thread Thread
noncototient profile image
Bo

MySQL feels a little easier to work with compare to PostgreSQL and in my experience a lot easier to find answers to issues that you might run into during development with MySQL.

Collapse
japhernandez profile image
John Piedrahita

Look at post for Backend, please…
dev.to/japhernandez/authentication...

Collapse
singhrahul31 profile image
singhrahul31

I would suggest to make it responsive in mobile as well