Giter Site home page Giter Site logo

wuletawwonte / my-store Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 221 KB

A client side ruby on rails application for a shopping website.

License: MIT License

Ruby 39.36% JavaScript 37.07% CSS 0.91% HTML 21.69% SCSS 0.35% Dockerfile 0.43% Shell 0.20%
ruby-on-rails stimulusjs tailwindcss

my-store's Introduction

My Store - A shopping website

A client side ruby on rails application for a shopping website.

Built With

Live Demo

live link

Getting Started

To get a local copy follow these simple example steps.

  • Make sure you have Ruby(rbenv preferred) installed.
  • Open the terminal window and clone the repository using this command:
git clone [email protected]:wuletawwonte/my-store.git
  • Open the repo by typing :
cd my-store
  • Install the project's dependencies by running this command:
bundle install
yarn install
  • Run rails server or rails s to start the application on local server.
  • To test the project, run rails test in your terminal

Configuring Rails

Create an .env file with the minimum ENV variables needed for booting Rails:

cp .env.example .env

You can edit the configruation options or go with the default setup.

Web server

This project uses Puma as a web server for development. The .env file is where some of the configuration of the app is written.

Use dev-tld-resolver to access the application with a custom domain name, because it redirects .dev tld to localhost. To install dev-tld-resolver it must be built using make according to its installation documentation.

To ensure that make is installed on your computer, please install the build-essential meta package according to the instruction here.

The default domain name in the development environment is mystore.dev but it can be changed to a custom domain name by setting DEV_DOMAIN_NAME=mystore.dev in the .env file.

HTTPS (recommended)

Use mkcert to generate and install certificates for local domains: mkcert mystore.dev "*.mystore.dev" localhost 127.0.0.1

In .env, set:

TEST_CERT_KEY=config/ssl/mystore.dev-key.pem
TEST_CERT=config/ssl/mystore.dev.pem
DEV_ENV_HTTPS=1

Run rails s to start Puma locally. config/puma.rb has setting to bind it to 0.0.0.0 when running with DEV_ENV_HTTPS=1. The app does not fully work on a non-standard port. To route every port to 3000, run: sudo iptables -t nat -A OUTPUT -o lo -p tcp --dport 443 -j REDIRECT --to-port 3000. Run the same command with -D instead of -A to disable. This will also be reset when you restart your computer.

Docker Setup

Before going through these steps please make sure you have docker and docker-compose installed in your machine.

NOTE: these docker setup is for setting up development environment only.

To start working on this project all you have to do is clone the repo locally and navigate to the project root directory. Execute the following command to build and start the docker images based on the configuration provided.

docker-compose up

Then open http://localhost:3000 or http://127.0.0.1:3000 on your browser.

Authors

๐Ÿ‘ค Wuletaw Wonte

๐Ÿค Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a โญ๏ธ if you like this project!

Acknowledgments

  • Windmill template used in the ui.
  • Hat tip to anyone whose code was used as inspiration

๐Ÿ“ License

This project is MIT licensed.

my-store's People

Contributors

wuletawwonte avatar

Stargazers

chirotaw Kentib avatar habtsho avatar  avatar  avatar

Watchers

 avatar

my-store's Issues

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.