Code Monkey home page Code Monkey logo

bike_index's Introduction

BIKE INDEX CircleCI View performance data on Skylight

Bike registration that works: online, powerful, free.

Registering a ๐Ÿšฒ only takes a few minutes and gives ๐Ÿšดโ€โ™€๏ธ a permanent record linked to their identity that proves ownership in the case of a theft.

We're an open source project. Take a gander through our code, report bugs, or download it and run it locally.

Dependencies

We recommend asdf-vm for managing versions of Ruby and Node. Check the .tool-versions file to see the versions of the following dependencies that Bike Index uses.

Running Bike Index locally

Follow the Getting Started guide for a complete set up. Or if you're familiar with developing Ruby on Rails applications start with these steps and a local Postgresql installation:

Toggle in development command default
Caching bundle exec rails dev:cache disabled
letter_opener bin/rake dev:letter_opener enabled
logging with lograge bin/rake dev:lograge enabled

Localization

See the localization docs for details (we use translation.io for localization).

Testing

We use RSpec and Guard for testing.

  • Run the test suite continuously in the background with bin/guard (watches for file changes/saves and runs those specs)

  • You may have to manually add the fuzzystrmatch extension, which we use for near serial searches, to your databases. The migration should take care of this but sometimes doesn't. Open the databases in postgres (psql bikeindex_development and psql bikeindex_test) and add the extension.

    CREATE EXTENSION fuzzystrmatch;

We use parallel_tests to run the test suite in parallel. By default, this will spawn one process per CPU in your computer.

  • Run all the tests in parallel with bin/rake parallel:spec

  • Run bin/rake parallel:prepare to synchronize the test db schema after migrations (rather than db:test:prepare).

  • Run specific files or test directories with bin/parallel_rspec <FILES_OR_FOLDERS>

  • Run Guard with parallelism bin/guard -G Guardfile_parallel

Code Hygiene

We use the following tools to automate code formatting and linting:

Run bin/lint to automatically lint the files and/or add auto formatters to your text editor (e.g. prettier-standard)

EditorConfig

EditorConfig ensures whitespace consistency. See the Download a Plugin section of the EditorConfig docs to find a plugin appropriate to your editor.

StandardRB

StandardRB is an opinionated Ruby style guide, linter, and formatter - it is "a spiritual port of StandardJS".

See the how do I run standard in my editor section of the StandardRB docs to find an appropriate plugin for on-the-fly linting.

ESLint

ESlint is configured to run on project JavaScript. To run it, issue yarn lint.

Bug tracker

Have a bug or a feature request? Open an issue.

Community

Keep track of development and community news.

Contributing

Open a Pull request!

Don't wait until you have a finished feature before before opening the PR, unfinished pull requests are welcome! The earlier you open the pull request, the earlier it's possible to discuss the direction of the changes.

Once the PR is ready for review, request review from the relevant person.

If your pull request contains Ruby patches or features, you must include relevant Rspec tests.

... and go hard

bike_index's People

Contributors

ackime avatar adherr avatar aokj4ck avatar barefootford avatar chancancode avatar dependabot[bot] avatar eld120 avatar florinpopacodes avatar gadogado avatar greysteil avatar jmromer avatar joshchernoff avatar kalmanh avatar laraferroni avatar londerson avatar mateusdeap avatar pdk avatar purcebr avatar realchrisolin avatar robertgervais avatar runt2pb avatar samwhited avatar sethherr avatar stevenbuccini avatar stevepiercy avatar tarnelope avatar timlkelly avatar torresga avatar willbarrett avatar wwwbruno avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bike_index's Issues

Master: Feature Request: Speed up specs.

The specs are running slow, I feel that will a little work we could speed the specs up considerably.

I'm personally gonna see if there is anywhere we can remove rails out of the specs. That should help get us a little bump in speed.

Requires over 512mb of RAM

When installing on a Digital Ocean droplet I found that it wouldn't install on a 512mb droplet giving errors like "Cannot allocate memory". Upgrading to 1gb resolved the issue.

Might be worth noting under Dependencies.

Decentralize the search - distributed "local" sites

Hi,

I like the idea of the bikeindex, but I wish there was functionnality to search on numerous "local" sites of the bikeindex. Having a P2P or federated search would enable less centralisation and empower local communities to install their own hosted version of bikeindex.

Deprecation: "$standardFontSize" by default is deprecated.

DEPRECATION WARNING on line 65 of /bike_index/app/assets/stylesheets/application_styles/_vars.scss:
Assigning to global variable "$standardFontSize" by default is deprecated.
In future versions of Sass, this will create a new local variable.
If you want to assign to the global variable, use "$standardFontSize: 17px !global" instead.
Note that this will be incompatible with Sass 3.2.

Vanity urls for users

Right now we are using a random string, users have requested the ability to set their own vanity url.

Add "Continuously Variable" to rear gearing menu

The nuVinci line of hubs utilize continuously variable gearing (there is no discrete number of gears). The current UI won't allow for internal gearing to be noted without specifying a number of gears.

Add keyboard control for images on bike show

If you look in app/assets/javascripts/views/bikes/bikes_show.js.coffee you see the beginning of the move to make switching between images possible through keyboard.

It would be cool to be able to press right arrow and zoom in on the next image.

Widget for blog owners to embed that promotes Bike Index

Bike Index would create a widget for every user that they can embed on their blog that showcases their bikes. It would also say, "Iโ€™ve registered my bike on Bike Index so people can quickly find out if someone steals it. Have you?"

If someone has more than one bike, it has a slideshow of all of them.

Firefox bike edit errors

Joseph (owner of Flyingpigeon) says:

I am having some trouble using Firefox on my Mac to register bikes - the CM/IN button doesn't drop down using this browser. Adding components also doesn't work using that browser on my computer(s). Chrome seems to handle those options with ease.

Create a printable pdf

Stolen Bike owners often want the ability to create fliers. We ought to make this easier for them.

Requirements for the PDF

  • Always fits on a single page.
  • It displays at least one picture of the bike (if the bike has one).
  • It displays any named attributes that a bike has (model, year, frame material, etc.), only if they have been input.
  • It displays as many components as it can (without going over the page limit).
  • Shows the bike's url (preferably as a link, in case the pdf is sent digitally).
  • Shows the bike's QR Code.
  • The Bike Index logo is somewhere on the page.
  • It prints nicely in B&W.
  • It clearly highlights the fact that the bike is stolen and shows all stolen information if the bike is stolen.
  • It opens the PDF in a new window.
  • Only stolen bikes can generate pdfs.
  • Anyone can view the PDF (not exclusively the bike owner).

Ability to edit e-mail address

I created my Bike Index account with my Facebook account, which has a Facebook-specific e-mail address. That's not the e-mail address that someone should contact me at if they find my bike stolen.

If I change the e-mail address of my listing, it presumes I've sold my bike and want to give it to another user. (This is a bad presumption, and these side-effects should be communicated more clearly in the UI.)

There's no way to change the e-mail address associated with my account (and my bikes) in the Preferences section, and there should be.

Send frame size with the API response

It would be great if the API response included the bike frame size. I'm working on a used bike marketplace webapp for bikes that have been registered on BikeIndex and would like to make the listings searchable by size.

Encrypt logins

Browsing is encrypted with HTTPS, but logging in isn't because forwarding to HTTPS isn't enforced on the homepage.

However, once I logout, the logout page is HTTPS and thus the login form is.

Make serial_number and rear_wheel_size_id optional on Bikes#new

At the time of a user's attempt to register a bike, the user might only know the manufacturer and color of his or her bike (e.g., a black IRO). The user might not a) know offhand the bike's serial number or rear wheel size or b) be close enough to the bike to check or confirm this information. This user cannot add the bike to the index.

Allow users to add bikes with only manufacturer and color, without requiring the serial number or rear wheel size. Allow users to return to a bike's record to add this information when they have it available.

Header search improvements

Right now we are just searching for colors in the attribute box.

It would be awesome to add in more searchable items there, like handlebar type, wheel size and stuff

Bike description, components and pertinent information string

Attribute on bike that grabs all the attributes other than year, manufacturer and model (such as the description and components) and formats them for display.

Could be stored as an array so that we can run .to_sentence on it, or could just be a string.

We will need to truncate it, so putting the most important information first would be good.

Commenting

We need our own commenting system.

Requirements

  • It should email messages to users when someone comments on their bike.
  • It should allow threading
  • It should load via an AJAX call, so that things can still be cached.
  • Users should be able to turn off comments on their bike.

Bikes created by a user for themselves do not need to be claimed

It might be less confusing if there was logic that changes the ownership email if it's being created by owner. The new email would say thank you rather than informing the owner who added the bike for them, and it would not imply that claiming the bike was necessary or possible (as it's claimed as soon as it's created in your own account).

Redirect to "view" by default after edit

If the user edits a bike and clicks "Save", the entry should be displayed in the "view" state, so he can proofread it in the same format that a passerby would read it in.

In the future, the view state and edit state could collapse into a single view, where only the owner has permission to make changes, but the information is displayed in the same fashion to both the owner and a passerby.

Personal webpage vulnerable to XSS

The user can insert arbitrary HTML and Javascript into the 'personal text' section of the website.

This means that a malicious attacker can insert code causing of other logged in user to perform arbitrary action, including transferring bikes, changing passwords, etc.

Better image upload

Right now, uploading images blocks things (especially for mobile devices).

Perhaps we could show the the image is uploaded, then throw the processing in a background job and not worry about when it finishes.

We used to have an image uploader on the new bike registration page - but on mobile devices it would take 1 or 2 minutes to do, and sometimes it would fail and everything would be lost. It would be great to have an image uploader on the new bike registration page, and not have it suck.

Chart of last week of bikes

Found a small rails project you can work on @adherr!

We're using Chart.js to make some charts. I think a chart of the count of bikes that have been made each day in the past week would be good. For now let's put it in the admin section.

Some information about what we're looking for is in the view and the controller review method (also viewable on the Index as an Admin)

Make it. Contact me with questions.

Add "Show your bike(s)" button to site header

There should be a top-level button on every page that takes the user to his bikes list (or to his bike's individual page if he has only one bike). "See your bike" (or "bikes", if the user has more than one) should be sufficient.

As it is now, it isn't super obvious that the user needs to click his truncated e-mail address to open a menu to find the "Your bikes" button.

Make better use of vertical space

The site has a nicely contemporary visual design, but the placement of items on it feels haphazard.

For instance, on /user_home, the whole point of the page is to see my bikes, but they don't start to appear until the bottom fifth of the page. I didn't even see the "info about your lock" section until just now, because it's way below the fold (and below the things I'm looking for on that page).

Most of every page is taken up by a search bar (which despite being huge doesn't feel obvious) and a user menu (which likewise isn't super apparent unless you're actively looking for it).

For a free resource, it's in many ways good enough (and way better than any other bike registries I've seen), but the page layout could probably use some more consideration.

If I have some time later, maybe I can put together some mocks to show you what I mean.

Seat tube length should be called "size"

Most casual cyclists won't know want "seat tube length" means, but might be able to tell you they have a 20" or a 56cm bike. A better title for this field would be "size (seat tube length)."

It's also worth considering having an option for ordinal sizes like "S, M, L, XL." The goal of the form is to get as much information as possible from a user, which means it should match the cyclist's mental model as closely as possible.

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.