Giter Site home page Giter Site logo

ror-koalified's Introduction

KOALIFIED

Rails Two-Sided Marketplace

Coder Academy Ruby on Rails Final Project

Due November 10th 2017 (two week sprint)

Koalified

Peer to Peer driving Lessons

The marketplace for Time, as a Learner you can purchase one hour blocks of time which Drivers can post.


Peer to Peer Driving Lessons, Drivers can post their availabilities and learners can book up to a week in the future. Payment is done through the app and the driver gets a high % of the payment.

Getting Started

it's live at Koalified! You can sign up for a profile, upload an avatar and your license data, and then you can post your availabilities;

Learner drivers can sign up and select automated ads from available drivers; and contact them or make a booking.

Prerequisites

Gems used

# user authentication, devise
gem 'devise'

# Font-awesome
gem "font-awesome-rails"

# shrine gem for file uploading
gem "shrine"

# cloudinary gem
gem "shrine-cloudinary"

for testing

gem 'dotenv-rails'
# rspec
gem 'rspec-rails', '~> 3.6'

# rubocop
gem 'rubocop', '~> 0.51.0', require: false

Installing

First you will need rails: version 5.1.4 ruby version : ruby 2.4.1p111

```
git clone
cd koalified
bundle
```

then run rails server
```
rails s
```

and goto localhost:3000

Coding Style Tests

RuboCop was used, for formating and enforcing Style.

To run rubocop

$ rubocop

it inherits from .rubocop_todo.yml and you can adjust the test slightly in there.

Deployment

To Deploy you will need your own STRIPE_KEY and SECRET_KEY, which I've stored as environment variables.

Built With

#Deliverables Design Documentation Demonstrate your ability to break down the problem and design a solution.

  • Presentation

  • 1 - One page summary of your application including problem definition, solution.

Flow

Flow2

Possible journeys at the moment, currently bookings redirects to "learn" - as implementation is pending.

  • 4 - Wireframes for at least 5 screens. I attempted to make high fidelity wireframes with figma, but I find it incredibly clumsy, and it seriously took me a full day to get these frames done, and I decided to stop and begin work on other aspects of the project. Figma

  • 5 - Entity Relationship Diagram (ERD). Dbdesigner

  • 6 - Project plan and estimation. Summary

Key concept I know I want to include

Fb or linkedin Login

I personally much prefer to log in with Facebook, and as it adds quite a bit of trust to users if you get their Facebook account, because it's a good way to verify their identity.

STATUS : Failed to integrate
Lessons learned

After spending two days trying to integrate Facebook login, with Devise and Omniauth; I unfortunately had to pull the plug, as Time is a factor with this assignment. I managed to successfully implement on localhost, but once I pushed to Heroku, it complicated matters as you have to change devise.rb and your facebook developer settings each time to swap between local and heroku, and in fact pushing to Heroku managed to break my local settings as well.


Key concept I know I want to include

HTML 5 TEMPLATE : I know that one of my weaknesses is design and front end css; My plan to mitigate this was to use a template from HTMLup.net

	STATUS: Implemented
Lessons learned

After a full 6 hours trying to integrate this as the templates are not designed specifically for rails; I managed to locate a bug that was stopping the custom JS from running and essentially breaking the whole design.

(For reference main.js was dependant on skel.js and it needed to be required inside the file. Additionally Font-awesome was being used, and it was erroring; This was solved with the font-awesome gem, Which I found very quickly compared to the several hours with the js errors )

Additionally further into development; I found that this proved to be a mistake, as it did not include bootstrap, and my css skills are sub-par at best. While my landing page looks swish, the rest of my app looks more and more inconsistent.


Key concept I know I want to include

Driver Posts Availability : My design plan had Drivers, posting availabilities As a simple form, with 1 hour blocks.

	STATUS: Implemented
Lessons learned

Originally, I had used strings in the database for the the days of the week, and I also had quite a bit of problems, organising the information inside the database; I had my data stored as UTC, which took me a full day to convert to local time. This was infuriating and the time would have been much better spend learning how to incorporate a JS date and time picker. My lack of JS skills definitely manifested in this scenario. What should have been a quite simple and easily Implemented widget.

Eventually I made this work, By making availabilities only created by the current user, rendered when posting new availabilities, and all availabilities posted when searching for a booking.

The next step is to trigger the booking boolean once the booking is confirmed and paid. and to remove it from the adverts view.


Key concept I know I want to include

STRIPE Payment for Drivers

I almost always prefer PayPal personally when it's an option because I know it's safe and secure; but Stripe is an excellent platform And I managed to have a price and checkout function, there is unfortunately no receipts no transactional history or tracking, and most importantly the Drivers are not connected to the site; meaning they never have the opportunity to get paid.

STATUS : Failed to integrate
Lessons learned

I tried several different tutorials online on how to integrate STRIPE Connect, but unfortunately I was not successful. My main problems were when I tried to integrate the Users as merchants. I didn't correctly set up the tables to handle the data, and ran into compounding issues.

Rails application code

Demonstrate Ruby on Rails development skills.

  • Create your application using Ruby on Rails.
  • Demonstrate knowledge of Rails conventions.
  • Use postgresql database in development.
  • Use appropriate gems.
  • Use environmental variables to protect API keys etc. (dotenv used)
  • Implement a payment system for your product. (e.g. Stripe)
  • Your app will have some type of searching, sorting and/or filtering capability.
  • Your app will have some type of file uploading capability (eg. images).
  • Your app will have authentication (eg. Devise, must have full functionality in place).
  • Your app will have authorisation (users have restrictions on what they can see and edit).
  • Document your application with a README that explains how to setup, configure and use your application.

--- YET TO BE IMPLEMENTED

  • Your app must send transactional emails (eg. using Mailgun).
  • Your app should have an internal user messaging system.
  • Use an API (eg. Omniauth, Geocoding, Maps, other..)
OUTCOMES SUMMARY
This was a hugely humbling experience for me; I was naive about how much time everything would take to implement, and My time management skills needed huge improvements.  
Lessons learned
Time management, expectation vs reality is a big factor here, Using the template for example compounded time issues, when trying to style on top of the template css.

I spend hours trying to learn and implement a feature only to run into errors and have to start from scratch.

I would also like to in the future have implemented much more testing from much earlier in the development cycle, trying to develop a TDD mentality.

Authors

Acknowledgments

HTML5UP template
This is a great resource, and I've included their readme inside the files as html5upreadme.md
[html5up.net](https://html5up.net/)
I can Acknowledge my weaknesses, and design is definitely one of them, using a template allows for quick proof of concept and faster prototyping.

License

Copyright 2017 James Marotta

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

ror-koalified's People

Contributors

j1marotta avatar

Stargazers

Luke Schoen avatar

Watchers

James Cloos avatar

ror-koalified's Issues

Go page

Go page is not properly responsive to larger screens

currently set to 85% screen with and 15% height per button

Time display error

Updated time display you can select a time in AM/PM format, but it is based on UTC time

and it does convert to local time but only after the user selects which one

Facebook login, angry at heroku #1

with commit - af5eb0a

Managed to get facebook login, working for localhost, but pushing to heroku login didn't work, and now local host also doesn't work.

error after redirect to facebook says

URL blocked: This redirect failed because the redirect URI is not white-listed in the app's client OAuth settings. Make sure that the client and web OAuth logins are on and add all your app domains as valid OAuth redirect URIs.

Profiles controller error

Profiles_path
vs profile path error on profiles controller when you get to the show page,

no use of profiles_path in entire code base, but it asks for profile_path.

I believe it is because it doesn't have the right params somewhere but i'm unsure of where

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.