Giter VIP home page Giter VIP logo

redvanisation / freerunapi Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 378 KB

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: MIT License

Ruby 99.64% HTML 0.36%

freerunapi's Introduction

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 [email protected]: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 - [email protected]

freerunapi's People

Contributors

redvanisation avatar dependabot[bot] avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar ngodi albert avatar

Forkers

edemagbenyo

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.