Bulah  Pfeffer

Bulah Pfeffer

1686149276

Amazon Clone with Flutter, Javascript, Node, Express, MongoDB & Mongoose

Flutter Mobile App + Node.js Back End Tutorial – Code an Amazon Clone [Full Course]

Build a full stack e-commerce app with Flutter, Javascript, Node.js, Express, MongoDB and Mongoose.

In this tutorial, you'll learn to build the UI of Amazon from scratch, create REST APIs, store data in MongoDB using Mongoose, use REST APIs with Flutter & Dart using Models, use the Flutter State Management tool as a provider, and create a cross platform app that works on Android and iOS.

⭐️ Course Contents ⭐️
(0:00:03) Introduction & Demo
(0:01:04) Setting Up The Flutter Project
(0:05:30) Setting Up Themes
(0:09:05) Folder Structure
(0:10:31) Setting Up Routes
(0:16:58) Auth Screen UI
(0:38:57) What is Node.js
(0:39:53) Node.js Installation
(0:41:51) Initialising Node
(0:45:06) First Node.js Script
(0:46:47) NPM & Dependencies
(0:52:25) Creating Server
(0:58:39) Nodemon
(1:02:37) Create your First API
(1:08:49) Exercise 1: Create GET API
(1:09:19) Solution 1
(1:20:12) Routers
(1:17:45) Middleware
(1:21:33) Sign up Route
(1:26:31) Connecting to MongoDB
(1:33:17) Creating User Model
(1:42:34) Sign up Route cntd
(2:09:19) Connecting Sign Up Route With Client Side
(2:31:04) Adding TextField & Form Validator
(2:34:45) Sign In Route / Exercise 2
(2:37:12) Creating Sign In Route (Solution 2)
(2:47:57) Connecting Sign In Route with Client Side
(3:04:01) Persisting State
(3:25:11) Creating BottomNavBar
(3:36:33) Account Screen UI
(4:04:39) Home Screen UI
(4:41:35) Admin Screen BottomNavBar
(4:49:38) Add Product Screen UI
(5:08:21) Picking Images
(5:17:16) Admin - Selling Product 
(5:28:43) Create Admin Middleware / Exercise
(5:29:24) Solution
(5:31:39) Sell Product Contd.
(5:48:36) Admin - Fetching & Displaying All Products
(6:08:39) Admin - Deleting Product
(6:17:09) Self Exercise (Add Product Realtime)
(6:17:43) Getting & Displaying Products Based on Category
(6:41:19) Searching & Displaying Products
(6:47:59) Optional Exercise (Creating Search Product API)
(7:06:14) Product Details Screen UI
(7:25:58) Rating Products
(7:31:09) Rating Product API / Exercise
(7:31:43) Solution
(7:41:00) Display Ratings
(7:50:34) Fetch Deal of The Day (Optional Exercise)
(8:05:05) Adding To Cart
(8:31:46) Displaying Cart Products
(8:52:08) Decreasing Quantity in Cart
(9:00:33) Address Screen
(9:10:53) Adding GPay/ Apple Pay
(9:32:56) Storing User Address & Ordering
(9:55:55) Viewing My Orders
(10:06:07) Viewing Order Details
(10:28:37) Admin - Viewing All Orders
(10:37:42) Admin - Change Order Status
(10:45:53) Total & Category-Wise Earnings
(11:04:34) Display Sales Chart
(11:09:44) Log Out
(11:14:29) Deployment to Heroku
(11:19:55) Testing on Android Device
(11:21:46) (Bonus) Flutter 3 (Everything Works!)
(11:24:35) Material 3

💻 Source Code: https://github.com/RivaanRanawat/flutter-amazon-clone-tutorial 
💻 Colors and Images: https://github.com/RivaanRanawat/flutter-amazon-clone-tutorial/blob/master/lib/constants/global_variables.dart

#flutter #aws #node #javascript #expressjs #mongodb #mongoose

Amazon Clone with Flutter, Javascript, Node, Express, MongoDB & Mongoose
Hans  Marvin

Hans Marvin

1626750720

Learn Express JS by building a Project - Mongoose & MongoDB Atlas

In this video series, we are going to learn Express JS by building a project. Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.

Along the way we are going to learn what is Express and how it works. Along with Express, we are also going to learn about other dependencies that are required for the backend. Finally, we will create an application that uses CRUD(create, read, update and delete) functionality.

In this video, we are going to set up our Mongo DB Database . We are going to use Mongo DB Atlas which is a cloud Database Storage and we are also going to set up Mongoose which is a package to connect our application with the database.


Get the entire code of this series here : https://github.com/Bishwahangdewan/Learn-Express-by-building-a-Project


#express js #mongodb #mongoose #express #js #nodejs

Learn Express JS by building a Project - Mongoose & MongoDB Atlas
Madyson  Moore

Madyson Moore

1626064058

Class Intro | Building an API With Next.js API Routes, Apollo Server, MongoDB,and Mongoose

In this class we’re going to learn how to build an API to support a future mobile app.

Technology Used:

Next.js - Host our API via API Routes
MongoDB - Database to store our data
Mongoose - Schema management for MongoDB
Apollo Server - Manage our GraphQL API

Full Class: https://www.reactnativeschool.com/building-api-nextjs-apollo-mongo-mongoose/

#api #next.js api #apollo server #mongodb #mongoose

Class Intro | Building an API With Next.js API Routes, Apollo Server, MongoDB,and Mongoose
Coding  Fan

Coding Fan

1625987220

Using Hapi.js, Mongoose, and MongoDB to Build a REST API

Learn how to build a REST API with data validation using the Hapi.js framework with MongoDB and the Mongoose ODM.

A written version of this tutorial can be found at https://www.thepolyglotdeveloper.com/…

Subscribe: https://www.youtube.com/c/ThePolyglotDeveloper/featured

#mongodb #mongoose

Using Hapi.js, Mongoose, and MongoDB to Build a REST API
Coding  Fan

Coding Fan

1625976420

Building a REST API with MongoDB, Mongoose, and Node.js

Learn how to create a CRUD based REST API using the NoSQL database, MongoDB, as well as Node.js and the ODM, Mongoose.

A written version of this video can be found at https://www.thepolyglotdeveloper.com/…

Subscribe: https://www.youtube.com/c/ThePolyglotDeveloper/featured

#mongodb #mongoose #node

Building a REST API with MongoDB, Mongoose, and Node.js
Lindsey  Koepp

Lindsey Koepp

1625475732

CRUD Operations: MERN Stack Tutorial

I got a new super interesting and challenging job in a great company doing data analytics and automations. So have not been practicing webdev for quite some time, but decided not to edit so much this video, this is the real development process lol.

In this video we build CRUD functionalities on MERN stack application using express, mongoose and axios!
I know the issues with video - next time I will try to reduce the sound of keyboard, increase video quality and whatever else you’ll write in the comments =) Thanks for watching!

Also for convenience, here is the link to my git repo: https://github.com/marinamuse/crud-mern-app

#express #mongoose #axios #mern

CRUD Operations: MERN Stack Tutorial
Nandu Singh

Nandu Singh

1625037976

MongoDB Populate Nested Subdocument

MongoDB has the join-like $lookup aggregation operator in versions >= 3.2. Mongoose has a more powerful alternative called populate(), which lets you reference documents in other collections.

Population is the process of automatically replacing the specified paths in the document with document(s) from other collection(s). We may populate a single document, multiple documents, a plain object, multiple plain objects, or all objects returned from a query.

var modelA = new Schema({
	firstName: {
		type: String,
		trim: true,
	},
	refModelB: {
	  type: Schema.ObjectId,
	  ref: ModelB
	},
});


var modelB = new Schema({
	name: {
		type: String,
		trim: true,
	},
	refModelC: {
	  type: Schema.ObjectId,
	  ref: ModelC
	},
});

var modelC = new Schema({
	name: {
		type: String,
		trim: true,
	},
});
modelA
    .find()
    .populate({path: 'modelB', populate: {path: 'refModelC'}})
    .exec(function (err, docs) {
        done(err, doc);
    });

#mongoose #mongodb

MongoDB Populate Nested Subdocument
Gislason Dev

Gislason Dev

1624785960

The Ultimate Guide to Typescript with Mongoose for Node.js

In this video, we take a deep dive into typing Mongoose models with TypeScript and using Mongoose’s types to make strongly typed services.

0:00 Introduction
1:15 What are we going to build?
2:37 Current project setup
5:08 Add types to the Mongoose model
8:40 Add types to the service layer
10:57 Create tests
16:25 Conclusion

📚 Concepts & technologies covered

  • Mongoose
  • TypeScript
  • MongoDB

Repository: https://github.com/TomDoesTech/The-Ul…

🌎 Subscribe: https://www.youtube.com/c/TomDoesTech/featured

#mongoose #node #node-js

The Ultimate Guide to Typescript with Mongoose for Node.js
Reid  Rohan

Reid Rohan

1623148440

GraphQL — Code First(Resolver-First) using TypeGraphQL and Typegoose

GraphQL is an open-source query and data manipulation language for APIs created by Facebook back in 2015. Although it is defined by the community as a probable replacement for REST, depending on each API architecture and requirements, some projects might be suitable for GraphQL API while others might be suitable for REST API. But due to its popularity for past years some major companies have already migrated their APIs to GraphQL APIs while some have opted for hybrid approach of using both REST and GraphQL at the same time.

Image by GraphQL

When comes to creating a GraphQL API many tools can be used to manage the creation of APIs. Some of the major and popular tools that are currently available to create GraphQL APIs are

  • GraphQL (graphql/graphql-js )
  • Apollo (apollographql/apollo-server )
  • Express graphQL (graphql/express-graphql )
  • Prisma ( https://www.prisma.io/)
  • AWS AppSync

Other than these there are many more tools currently as well as being developed as I write this article. All these tools have their own advantages as well as disadvantages among themselves. This article is not going to be about these tools comparison so let’s continue our GraphQL creation discussion.

When creating a GraphQL API the main component we need to do is define the GraphQL schema. There are two common ways we can do this.

  • Schema-first development
  • Code-first development

Schema First Development

In schema first development we first define the schema and then implement the code matching the definitions on the defined schema. To define the schema, we will use Schema Definition Language, which is a query definition language the GraphQL team introduced. Below is an example of how we can define a schema using the Schema-first development.

#mongoose #graphql #typescript #mongodb #api

GraphQL — Code First(Resolver-First) using TypeGraphQL and Typegoose
Bongani  Ngema

Bongani Ngema

1621304017

Make Mongoose Queries Faster without Losing Your Defaults

How to maintain data consistency while making your queries blazing fast

Using Mongoose provides many advantages when interacting with MongoDB in Node.js. Typecasting, validation, query building, business logic hooks, defaults are all musts when it comes to building, modeling, and storing your application’s data. Mongoose provides all of this out of the box without writing too much boilerplate code or using multiple libraries.

Mongoose does this by adding a lot of magic to each result document of a query by hydrating those documents. This _hydration _transforms a plain old JavaScript object (POJOs) into a wonderful and magical Mongoose Document. This comes at a cost though, which is Mongoose documents are on average 8 to 10 times bigger than their POJO counterparts.

In order to make the performance of our app as fast as possible, we need to query our DB as effectively and efficiently as possible. Imagine we are retrieving thousands or even hundreds of thousands of documents in one query, making each document 10 times smaller would be a huge gain in performance.

Cars going very fast

Picture by Vova Krasilnikov

Lean

The folks at Mongoose have already thought about this and provided us with a neat solution, lean. Lean skips hydrating each document and returns plain old POJOs.

Take the following Mongoose query.

const leanPerson = await Person.findOne()

Using lean is very simple indeed.

const leanPerson = await Person.findOne().lean()

#nodejs #javascript #programming #mongoose

Make Mongoose Queries Faster without Losing Your Defaults

NodeJS/Express – POST/GET to MongoDB using Mongoose – AngularJS + Bootstrap form

https://grokonez.com/node-js/nodejs-express-post-get-to-mongodb-using-mongoose-angularjs-bootstrap-form

NodeJS/Express – POST/GET to MongoDB using Mongoose – AngularJS + Bootstrap form example

In the tutorial, we show how to POST/GET form data to/from MongoDB in NodeJS/Express application using Mongoose with AngularJS & Bootstrap view.

Related posts:

Goal

Technologies – NodeJS/Express – Mongoose – MongoDB – AngularJS – Bootstrap

We create a NodeJS/Express project as below structure:


/NodeJS-Express-AngularJS-Bootstrap-MongoDB
	/app
		/config
			mongodb.config.js
		/controllers
			user.controller.js
		/models
			user.model.js
		/routes
			user.route.js
	/node_modules
	/resources
		/static
			/js	
				controller.js
	/views
		404.html
		index.html
	app.js
	package.json

Run above project then makes POST/GET requests, results:

-> Bootstrap view:

NodeJS-Express-AngularJS-Bootstrap-POST-GET-form-data-MongoDB-view

-> MongoDB’s collections:

More at:

https://grokonez.com/node-js/nodejs-express-post-get-to-mongodb-using-mongoose-angularjs-bootstrap-form

NodeJS/Express – POST/GET to MongoDB using Mongoose – AngularJS + Bootstrap form example

#nodejs #express #mongoose #angularjs #bootstrap

NodeJS/Express – POST/GET to MongoDB using Mongoose – AngularJS + Bootstrap form

Vue.js + Node.js/Express RestAPIs – Mongoose ODM + MongoDB CRUD example » grokonez

https://grokonez.com/frontend/vue-js/vue-js-node-js-express-restapis-mongoose-orm-mongodb-crud-example

Vue.js + Node.js/Express RestAPIs – Mongoose ODM + MongoDB CRUD example

In this tutorial, we show you Vue.js Http Client & Node.js Server example that uses Mongoose ODM to do CRUD with MongoDB and Vue.js as a front-end technology to make request and receive response.

Related Posts:
Crud RestAPIs with NodeJS/Express, MongoDB using Mongoose
Vue Router example – with Nav Bar, Dynamic Route & Nested Routes

Technologies

– Node.js/Express – Mongoose

– Vue 2.5.17
– Vue Router 3
– Axios 0.18.0

  • MongoDB

Overview

This is full-stack Architecture: Vue-nodejs-express-restapi-mongoose-mongodb-full-stack-architecture

1. Node.js Server

vue-nodejs-express-restapi-mongoose-mongodb---nodejs-backend-mysql-architecture

2. Vue.js Client

vue-nodejs-express-restapi-mongoose-mongodb---front-vue.js

Practice

1. Node.js Backend

- Project structure: vue-nodejs-express-restapi-mongoose-mongodb---nodejs-project-structure

Setting up Nodejs/Express project

Init package.json by cmd:

More at:

https://grokonez.com/frontend/vue-js/vue-js-node-js-express-restapis-mongoose-orm-mongodb-crud-example

Vue.js + Node.js/Express RestAPIs – Mongoose ODM + MongoDB CRUD example

#vue #nodejs #express #mongoose #odm #restapi

Vue.js + Node.js/Express RestAPIs – Mongoose ODM + MongoDB CRUD example » grokonez

Mongoose Many-to-Many related models with NodeJS/Express, MongoDB » grokonez

https://grokonez.com/node-js/mongoose-many-to-many-related-models-with-nodejs-express-mongodb

Mongoose Many-to-Many related models with NodeJS/Express, MongoDB

In the tutorial, we will show you how to develop Mongoose Many-to-Many related documents with NodeJs/Express, MongoDB.

Related post:
Crud RestAPIs with NodeJS/Express, MongoDB using Mongoose

Goal

Prerequisites

Crud RestAPIs with NodeJS/Express, MongoDB using Mongoose In the above tutorial, we show how to build CRUD RestAPIs with NodeJS/Express and MongoDB using Mongoose:

/nodejs-restapi-mongodb
	/app
		/config
			mongodb.config.js
		/controllers
			customer.controller.js
		/models
			customer.model.js
		/routes
			customer.routes.js
	/node_modules
	package.json
	server.js

Objective

In the tutorial, we show how to develop Mongoose Many-to-Many related documents with NodeJS/Express, MongoDB. Project structure:

More at:

https://grokonez.com/node-js/mongoose-many-to-many-related-models-with-nodejs-express-mongodb

Mongoose Many-to-Many related models with NodeJS/Express, MongoDB

#mongoose #mongodb #node #express

Mongoose Many-to-Many related models with NodeJS/Express, MongoDB » grokonez

Crud RestAPIs with NodeJS/Express, MongoDB using Mongoose » grokonez

https://grokonez.com/node-js/crud-restapis-with-nodejs-express-mongodb

Crud RestAPIs with NodeJS/Express, MongoDB using Mongoose

In the tutorial, we show how to build CRUD RestAPIs with NodeJS/Express and MongoDB using Mongoose.

Related posts:

Goal

Prerequisites: Create NodeJs/RestAPIs tutorial

-> Project structure:


/nodejs-restapi
	/app
		/controllers
			customer.controller.js
		/routes
			customer.routes.js
	/node-modules
	package.json
	server.js

Objective: design, create models and interact with MongoDB by Mongoose.

-> The tutorial will create a project as below structure:


/nodejs-restapi-mongodb
	/app
		/config
			mongodb.config.js
		/controllers
			customer.controller.js
		/models
			customer.model.js
		/routes
			customer.routes.js
	/node_modules
	package.json
	server.js

Mongoose

Mongoose is a MongoDB object modeling tool that provides a schema-based solution to model data. Mongoose is installed in your project (package.json) by commandline:

More at:

https://grokonez.com/node-js/crud-restapis-with-nodejs-express-mongodb

Crud RestAPIs with NodeJS/Express, MongoDB using Mongoose

#node #express #mongoose #crud

Crud RestAPIs with NodeJS/Express, MongoDB using Mongoose » grokonez

NodeJS – use Mongoose to save Files/Images to MongoDB » grokonez

https://grokonez.com/node-js/nodejs-use-mongoose-to-save-files-images-to-mongodb

NodeJS – use Mongoose to save Files/Images to MongoDB

In the tutorial, we will show how to build a NodeJS application to save files/images to MongoDB database using Mongoose.

Related posts:

Mongoose save files/images to MongoDB

Firstly, we define a Mongoose model for files/images with Buffer data as below:

const ImageSchema = mongoose.Schema({
    type: String,
    data: Buffer
});

To read/write data of file/image, we use fs.readFileSync(‘/path/to/file’) and fs.writeFileSync(‘/path/to/file’, image.data) functions of NodeJS file-system module.

Below segment code is used to store file/image to MongoDB:


// Connecting to the database
mongoose.connect(dbConfig.url)
.then(() => {
	
	// empty the collection
    Image.remove(err => {
		if (err) throw err;
		console.log("Removed all documents in 'images' collection.");
		var imageData = fs.readFileSync('/path/to/file');
		
		// Create an Image instance
		const image = new Image({
			type: 'image/png',
			data: imageData
		});

	    // Store the Image to the MongoDB
		image.save()
		.then(img => {
			// Find the stored image in MongoDB, then save it in a folder
			Image.findById(img, (err, findOutImage) => {
				if (err) throw err;
				try{
					fs.writeFileSync('/path/to/file', findOutImage.data);
				}catch(e){
					console.log(e);
				}
			});
		});
	})
	
})

Practice

We build a NodeJS project as below structure:

More at:

https://grokonez.com/node-js/nodejs-use-mongoose-to-save-files-images-to-mongodb

NodeJS – use Mongoose to save Files/Images to MongoDB

#node #mongoose #mongodb #save-file

NodeJS – use Mongoose to save Files/Images to MongoDB » grokonez