FreeRun e-commerce 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
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.
To get a local copy up and running follow these simple steps.
ruby '2.6.3
rails 6.0.2
- Clone the repo and cd into it
git clone git@github.com:Redvanisation/FreeRunAPI.git
cd freerunapi
- Install the gems
bundle install
- Create the database, migrate and seed it
rails db:create db:migrate db:seed
- Run the development server and start using the API on port:3000
rails start
- 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.
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.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Radouane Khiri - @redvanisation - LinkedIn - redvanisation@gmail.com