Giter Site home page Giter Site logo

shopengine-ecomm-backend's Introduction

ShopEngine | An E-Commerce Backend

Overview

This application is an Express.js API that uses Sequelize to interact with a MySQL database. It allows you to manage categories, products, and tags of an e-commerce application.

Table of Contents

Features

  • Database Connection: Connects to a MySQL database using Sequelize by providing database name, MySQL username, and MySQL password in an environment variable file.
  • Database Creation and Seeding: Allows creating a development database and seeding it with test data using schema and seed commands.
  • Server Start and Model Sync: Starts the server and syncs the Sequelize models to the MySQL database.
  • Test API GET Routes: Allows testing of the API GET routes for categories, products, or tags to ensure the data is being retrieved correctly.
  • Test API POST, PUT, DELETE Routes: Allows testing of the API POST, PUT, and DELETE routes to ensure the data can be successfully created, updated, and deleted in the database.

Usage Guide

  1. Installation:

    git clone [email protected]:lightoftwelve/ShopEngine-ecomm-backend.git
    npm install
  2. Setting up the Database: Navigate to the db folder and run the schema.sql in your preferred database tool (e.g., MySQL Workbench) to set up the database tables.

  3. Starting the Application:

    node server.js

Screenshots

A screenshot of the app routes in Insomnia

Technologies Used

  • Node.js
  • Sequelize
  • MySQL2
  • DotENV

Live Demo

Watch the demo here.

Credits

This project was accepted and completed as part of the UofT SCS Coding Boot Camp Online: Fullstack Flex PT course through the University of Toronto. The contents of the seeds folder, config folder, and pieces of other files as marked in the code were created by edX Boot Camps LLC. and has been modified for the purpose of this assignment. Otherwise, this project was independently developed by myself, Victoria Alawi.

License

The license for this project is currently unavailable.

shopengine-ecomm-backend's People

Contributors

lightoftwelve avatar

Watchers

 avatar

shopengine-ecomm-backend's Issues

Database Creation and Seeding

Database Creation and Seeding

User Story

AS a developer
I WANT to create a development database and seed it with test data
SO THAT I can start working with some initial data.

Acceptance Criteria

GIVEN a functional Express.js API and connection to the database
WHEN I enter schema and seed commands
THEN, a development database is created and is seeded with test data

Test API GET Routes

Test API GET Routes

User Story

AS a developer
I WANT to test the API GET routes for categories, products, or tags
SO THAT I can ensure that the data is being retrieved correctly.

Acceptance Criteria

GIVEN a running server and a connected database
WHEN I open API GET routes in Insomnia for categories, products, or tags
THEN, the data for each of these routes is displayed in a formatted JSON

Server Start and Model Sync

Server Start and Model Sync

User Story

AS a developer
I WANT to start my server and sync the Sequelize models to the MySQL database.
SO THAT the application is ready to handle requests.

Acceptance Criteria

GIVEN a functional Express.js API and a seeded development database
WHEN I enter the command to invoke the application
THEN my server is started, and the Sequelize models are synced to the MySQL database

Database Connection

Database Connection

User Story

AS a developer
I WANT to connect to a database using Sequelize
SO THAT I can manage the data of my application.

Acceptance Criteria

GIVEN a functional Express.js API
WHEN I add my database name, MySQL username, and MySQL password to an environment variable file
THEN I can connect to a database using Sequelize

Test API POST, PUT, DELETE Routes

Test API POST, PUT, DELETE Routes

User Story

AS a developer
I WANT to test the API POST, PUT, and DELETE routes
SO THAT I can ensure that I can successfully create, update, and delete data in my database.

Acceptance Criteria

GIVEN a running server and a connected database
WHEN I test API POST, PUT, and DELETE routes in Insomnia
THEN, I can successfully create, update, and delete data in my database.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.