E-commerce Shopping Website-Demand and Design

  express, mongodb, mongoose, node.js

1. Function introduction

  1. Users can complete registration, login and browse the goods after login.

  2. After logging in, the user can purchase and add related products to the shopping cart.

  3. Users can add, reduce and delete the goods in the shopping cart.

  4. Users can settle the shopping cart goods.

2. Technical Selection

This project involves the use ofNodeJSExpress frameworkMongoDB databaseMongoose object model library, detailed as follows:

NodeJSNode.jsUseGoogle ChromeBrowser’sV8Engine, a backendJavascriptOperating environment, providing many system-levelAPI, such as file operation, network programming, etc.

ExpressA concise and flexible baseNode.jsTheWebApplication development framework, supportEjs、jadeAnd provides a series of powerful functions, such as template parsing, static file service, middleware, route control, etc.

MongoDBMongoDBIs a high-performance, open source, modeless document database based on distributed file storageBSONThe format of the document is stored on disk.

Mongoose: one aimed atMongoDBThe operation of the object model library, encapsulationMongoDBSome common methods such as adding, deleting, modifying and checking documents.

3. Structure division

The project is mainly divided into the following modules:Registration module,Login module,Commodity moduleShopping cart moduleSettlement module.

  1. User registration module: After the user name, password and confirmation password are filled in, successful registration is realized, and then login is performed.

  2. User login module: Fill in the registered user name, fill in the correct password and enter the commodity display page.

  3. Commodity module: The user selects relevant products to add to the shopping cart.

  4. Shopping cart module: add, reduce and delete related commodities.

  5. Settlement module: settle the selected goods in the shopping cart.

The module structure is shown in the following figure:

4. Process design

This flow chart shows that the user can log in and register. If the user has already registered, he can log in directly. If he has not registered, he must register successfully before logging in. After logging in successfully, he can enter the commodity page to browse commodities, or select relevant commodities and add them to the shopping cart. In the shopping cart page, he can perform relevant operations on shopping cart commodities, and finally settle accounts by selecting relevant commodities.

The flow chart is as follows: