lcdss / dshop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DSHOP

DSHOP allows you to search products from different endpoints (stores) and mark the ones you liked the most as favorites.

Quick Start

You will need to have Docker and Docker Compose installed in your system to be able to follow the steps below:

  • Clone the git repository

    $ git clone git@gitlab.com:lcdss/dshop.git
  • Access the project root directory

    $ cd dshop
  • Copy the example environment file

    $ cp .env.example .env
  • Push, build and run the docker containers

    $ docker-compose up -d
  • Access the server container

    $ docker-compose exec server sh
  • Generate a secret for the JWT and update the .env file with it

    $ rails secret
  • Install the server app dependencies

    $ bundle
  • Run the server app - It'll be available at http://api.dshop.local

    $ rails s -b 0.0.0.0
  • In another terminal, access the client container

    $ docker-compose exec client sh
  • Install the client dependencies

    $ yarn
  • Run the client server - It'll be available at http://dshop.local

    $ yarn start
  • Add the api and client hostnames to your system's host file (needs root access)

    $ echo "127.0.0.1 dshop.local" >> /etc/hosts
    $ echo "127.0.0.1 api.dshop.local" >> /etc/hosts

DEMO

API: https://api-dshop.herokuapp.com

Client: https://client-dshop.herokuapp.com

API DOCS: https://documenter.getpostman.com/view/283907/SzRw3XRR

TODO

  • Paginate products (client)
  • Search/filter and sort products (client)
  • Favorite products (client and server?)
  • Invalidate JWT tokens after logout
  • Customize babel and postcss configuration to reduce the bundle size

What was used?

About


Languages

Language:Ruby 62.9%Language:TypeScript 35.6%Language:HTML 0.7%Language:Shell 0.5%Language:Dockerfile 0.3%