(Store your items & organize your team)
Our warehouse is a Saas (Software As A Service) App that allows users to store items in boxes and share them with a team, at the same time that they indicate what items are being actually used.
Payment using the Stripe test mode has been applied.
David Orejuela Software Developer |
---|
ย |
This software is a 1-week challenge created to test our technical knowledge using Ruby on Rails.
If the user is not logged into the app then he can pick a plan to register, login or receive an email from an admin to create the account:
As an admin user (The Team creator) you can invite and see the billing information of your current team, create boxes, move items, add items, and use items. Complete image to explore
As a regular user you can create boxes, move items, add items, use items, but you are not allowed to invite or see/change the billing information of your current team.
Our Warehouse was created using Ruby on Rails, additionals gems used to simplify the logic were used:
Gem | Utility |
---|---|
Devise | Simplifies user session logic |
Devise Invitable | Allows devise to create users by sending emails |
pagy | Simplifies loading objects into the view with a pagination logic |
Pay | Makes it easy to connect payment methods with models |
Stripe - Stripe event | To simplify the use of the Stripe API |
Dotenv | Handles env variables by placing them in a .env file |
Rqrcode | Easily generate QR codes with the information you need |
Truemail | To confirm that the email makes sense before sending information |
- Ubuntu 18.04+
- Ruby 2.7+
- Rails 6+
- Postgres 1.8+
- Stripe account
- Stripe CLI
Please make sure that you have installed the essentials and rails 6+ before cloning:
sudo yum install -y git-core zlib zlib-devel gcc-c++ patch readline readline-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl sqlite-devel
Set your products in the stripe dashboard & extract their product keys (price_*) into the STRIPE_FREE_PLAN, STRIPE_MODERATE_PLAN, STRIPE_UNLIMITED_PLAN respectecly in the stripe product dashboard.
After setting up the products configure what the user can do in the billing portal, using the stripe billing portal.
Set the following env variables:
Key | Value |
---|---|
STRIPE_PUBLIC_KEY | Public key from your Stripe dashboard |
STRIPE_PRIVATE_KEY | Private key from your Stripe dashboard |
STRIPE_SIGNING_SECRET | This key will be given after you run the stripe listen --forward-to localhost:3000/pay/webhooks/stripe command |
STRIPE_FREE_PLAN | Id of the Free Plan subscription |
STRIPE_MODERATE_PLAN | Id of the Moderate Plan subscription |
STRIPE_UNLIMITED_PLAN | Id of the Unlimited Plan subscription |
To install the stripe CLI follow this link
This software uses the dotenv gem so you can create a .env file in the app to showcase this keys.
- Clone the repository:
git clone https://github.com/daorejuela1/our-warehouse
- Go to the folder:
cd our-warehouse
- Install gems in requirements
bundle
- Create the data base
rails db:create
- Run the migrations
rails db:migrate
- Install bootstrap
yarn add bootstrap@4.3.1 jquery popper.js
- Start the stripe webhook
stripe listen --forward-to localhost:3000/pay/webhooks/stripe
- Run the server:
rails s -b 0.0.0.0 -p 3000
Get into the URL 127.0.0.1:3000
to start the app, and sign up with a new account test credit cards can be found here Stripe test cards:
- You can use stripe to have a recurrent payment.
- You can change your billing information and check how long have you been paying and change your credit card information.
- You can invitate new users, by putting their E-mail.
- You can create boxes with a QR image that links to the box object.
- You can move items from one box to another
- You can mark items as in used so other people know what's available
Here are some awesome projects I have been working on:
Mastermind Hackday Project | Daily tweet | Monty bytecode decoder | Serpent Algorithm | Custom Shell v2 |
---|---|---|---|---|
Special thanks to koombea.com for letting me be part of this awesome challenge.