Skip to content

This is the API of a PROTOTYPE project of a real e-commerce that I have previously developed, it's a full-stack mobile responsive app with a React front-end and a Ruby on Rails API back-end with AWS S3 for image storage via active storage, and it uses JWT tokens in HTTPOnly cookies for the authentication and authorization.

License

Notifications You must be signed in to change notification settings

Redvanisation/FreeRunAPI

Repository files navigation

FreeRun API

FreeRun e-commerce API

MIT License


FREE RUN API

Rails API for a full-stack modern e-commerce prototype project, this is the back-end repo which was developed using Ruby on Rails, PostgreSQL, tested with RSpec, implemented JWT tokens for authentication/authorization and made use of AWS S3 and Rails Active Storage to save images.

Report Bug · Request Feature

Table of Contents

About The Project

This project is a PROTOTYPE of a real e-commerce that I have previously developed, it's a full-stack mobile responsive app with a React front-end and a Ruby on Rails API back-end with AWS S3 for images' storage via active storage, it has a PayPal checkout integration and the cart is saved in the browser's local storage. This is the back-end repo and you could find the front-end code on https://github.com/Redvanisation/FreeRun.

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • ruby '2.6.3
  • rails 6.0.2

Installation

  1. Clone the repo and cd into it
git clone git@github.com:Redvanisation/FreeRunAPI.git

cd freerunapi
  1. Install the gems
bundle install
  1. Create the database, migrate and seed it
rails db:create db:migrate db:seed
  1. Run the development server and start using the API on port:3000
rails start

Usage

  • Run the following command to get all the available API endpoints
rails routes
  • Requests can be made to the sessions routes auth/login, auth/logout to login and create a JWT token which will be stored into an HTTPOnly cookie and sent back in the response and used for authentication later on, and to logout.
  • The users route auth/register is used to register new users and doesn't require a JWT token.
  • The products routes can be used to make RESTful requests in order to get the list of products and update or delete them.
  • The orders routes are used to retreive the registered users' orders history and the products they have previously purchased.
  • The whishlist routes are used to retreive the registered users' wishlists or to delete products from it.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Radouane Khiri - @redvanisation - LinkedIn - redvanisation@gmail.com

About

This is the API of a PROTOTYPE project of a real e-commerce that I have previously developed, it's a full-stack mobile responsive app with a React front-end and a Ruby on Rails API back-end with AWS S3 for image storage via active storage, and it uses JWT tokens in HTTPOnly cookies for the authentication and authorization.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published