Fullstack CRUD application using Fastify, React, Redux & MongoDB Part-1

Let’s create something interesting

Jatin Kumar
May 25, 2019 · 16 min read
Image for post
Image for post

Things to know before getting started

Image for post
Image for post

Project Setup

mkdir fastify-react-crud
cd fastify-react-crud
touch .babelrc
mkdir server
mkdir src && cd src
touch index.html index.js menu.js menu.css
mkdir components && cd components
touch form.js menuItem.js
cd ..
mkdir redux/actions
mkdir redux/reducers
mkdir redux/store
cd redux/actions && touch actions.js && cd ../../
cd redux/reducers && touch reducer.js && cd ../../
cd redux/store && touch store.js cd ../../../../
npm init -y
npm i --save react react-dom redux react-redux redux-thunk uuid
npm i --save redux-devtools-extension
npm i --save-dev parcel-bundler
npm i --save-dev @babel/plugin-proposal-class-properties
"scripts": {
"dev": "parcel src/index.html"
}
{ 
"plugins": [ "@babel/plugin-proposal-class-properties" ]
}
fastify-react-crud
|--node_modules // contains node modules
|--server // will contain server related files
|--src // will contain cleint side related files
|----components // will contain child components of menu.js
|------form.js // form component for Addition & Updation
|------menuItem.js // component to display menu item
|----redux // contains redux related files & folders
|------actions
|--------actions.js // contains redux actions
|------reducers
|--------reducer.js // contains redux reducer
|------store
|--------store.js // here we create redux store
|----menu.css // will contain css code
|----menu.js // will contain react code
|----index.html // will contain html template
|----index.js // will contain react code
|--package.json
|--.babelrc // babel plugin config

Let’s start building our React-Redux Frontend!

Quick Structure Analysis

Image for post
Image for post
Application component structure
Image for post
Image for post

Enter Redux!

Image for post
Image for post

Let’s create something presentable!

Image for post
Image for post
Image for post
Image for post

What’s next?

The Startup

Medium's largest active publication, followed by +684K people. Follow to join our community.

Sign up for Top Stories

By The Startup

A newsletter that delivers The Startup's most popular stories to your inbox once a month. Take a look

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

Jatin Kumar

Written by

Just another Programmer. Visit www.jatinkumar.tech to know more about me

The Startup

Medium's largest active publication, followed by +684K people. Follow to join our community.

Jatin Kumar

Written by

Just another Programmer. Visit www.jatinkumar.tech to know more about me

The Startup

Medium's largest active publication, followed by +684K people. Follow to join our community.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store