DEV Community


Posted on

Rails JavaScript Ecommerce SPA


TLTR: Feel free to get the source code.


-The application must be an HTML, CSS, and JavaScript frontend with a Rails API backend. All interactions between the client and the server must be handled asynchronously (AJAX) and use JSON as the communication format.

-The JavaScript application must use Object Oriented JavaScript (classes) to encapsulate related data and behavior.

-The domain model served by the Rails backend must include a resource with at least one has-many relationship. For example, if you were building an Instagram clone, you might display a list of photos with associated comments.

-The backend and frontend must collaborate to demonstrate Client-Server Communication. Your application should have at least 3 AJAX calls, covering at least 2 of Create, Read, Update, and Delete (CRUD). Your client-side JavaScript code must use fetch with the appropriate HTTP verb, and your Rails API should use RESTful conventions.

App Design

The overall plan for this single page application was to design a web site with a full-stack design using a Rails backend with a JavaScript frontend.

Based on the requirements, the app allows users CRUD functionality across multiple objects involved in a large-scale ecommerce marketplace application -products, reviews, carts, lineitems, orders, etc.

Similar to large scale counterparts, it is designed for straightforward use with minimal explanation required for the user.

Data Design

See the schema for more info.

Controller Design

See the controllers folder for more info.

Discussion (0)