8000 GitHub - patwey/outdoorsy: A customer data dashboard
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

patwey/outdoorsy

Repository files navigation

Contents

Overview

This application is a proof of concept for a fictional company - Outdoor.sy. It enables users to:

  • Upload customer data
  • View a table of past customer data imports
  • View a sortable table of customers.

Here's what a basic flow through the application looks like:

outdoorsy_functionality

Areas of Focus

For this proof of concept, I focused on:

  • Testing
  • Code structure
  • Delivering a full-stack solution

Future Enhancements

In the future, I'd like to add:

  • JS unit testing
  • JWT API authentication
  • API pagination
  • User authentication

Highlights

Customers, like Ansel Adams, can have multiple vehicles:

outdoorsy_customers

Users receive feedback on how many customers were successfully and unsuccessfully imported:

customer_imports

In the database, the application stores this information on a row-by-row basis:

outdoorsy_customer_import_metadata

Import File Guidelines

The application currently supports .txt or .csv files deliniated by commas or pipes and these fields:

  1. First name
  2. Last name
  3. Email
  4. Vehicle type
  5. Vehicle name
  6. Vehicle length

For examples, check out spec/fixtures

Schema

outdoorsy_schema

Setup

Installing SQLite3

You will need an installation of the SQLite3 database. Many popular UNIX-like OSes ship with an acceptable version of SQLite3. Others can find installation instructions at the SQLite3 website.

Verify that it is correctly installed and in your load PATH:

$ sqlite3 --version

The program should report its version.

Installing Ruby

Open up a command line prompt. On macOS open Terminal.app; on Windows choose "Run" from your Start menu and type cmd.exe. Any commands prefaced with a dollar sign $ should be run in the command line. Verify that you have a current version of Ruby installed:

$ ruby --version

This application requires Ruby version 3.0.0 or later. It is preferred to use latest Ruby version. If the version number returned is less than that number (such as 2.3.7, or 1.8.7), you'll need to install a fresh copy of Ruby.

For installation methods for most Operating Systems take a look at ruby-lang.org

Installing Rails

To install Rails, use the gem install command provided by RubyGems:

$ gem install rails

To verify that you have everything installed correctly, you should be able to run the following in a new terminal:

$ rails --version

If it says something like "Rails 7.0.0", you are ready to continue.

Installing Bundler

You will need to install bundler:

$ gem install bundler

And install all the dependencies:

$ bundle install

Installing Redis

Follow the instructions here to ensure redis is installed

Installing node and npm

Follow the instructions here to install Node.js and npm.

I ran into issues using newer versions of Node with webpacker (see: stackoverflow question). For this application, ensure that you're using node v16.x.x.

$ node -v
v16.15.1

If you have nvm installed, you can leverage the .nvmrc file and simply run:

$ nvm use

Installing yarn

Follow the instructions here to ensure yarn is installed.

Next, install yarn dependencies:

$ yarn install

Starting the Application

Run the migration with:

$ bin/rails db:migrate

Start the server with:

$ bin/rails server

Start redis with:

$ redis-server

Start sidekiq with:

$ bundle exec sidekiq

Lastly, to see the application in action, visit: http://127.0.0.1:3000/

About

A customer data dashboard

Topics

Resources

Stars

Watchers

Forks

0