Technical Task • How To Use • Screenshots • Download • Credits • Development Logbook
To build a Rails App to meet the following user stories:
-
User Story - 1
- As an Employee, I need to be able to enter information into an app when I refuel a vehicle so that my company can keep track of this information.
-
Acceptance Criteria:
- I need to be able to go to the app (url) and enter in the following information about refuelling -- Date, Driver, Vehicle, Odometer Reading, Refuel location, litters of Fuel. I need to be able to enter and save this information.
-
User Story - 2
- As a manager - with log in credentials, I need to be able to view refuelling information that other people have entered into the system so that I can view and keep track of that information.
-
Acceptance Criteria:
- I need to be able to log in with credentials so that I can access the manager section of the system.
- I need to be able to view refuelling information in the form of a table.
- I need to be able to log out of the system.
To clone and run this application, you'll need the following installed on your computer:
- Ruby version: ruby 2.6.3p62 (2019-04-16 revision 67580) x64-mingw32
- Git
- Node.js (which comes with npm)
From your command line:
# Clone this repository
$ git clone https://github.com/mjtabaya/fuel-tracker-app
# Go into the repository, then react app's directory
$ cd fuel-tracker-app/FuelTrackerApp
# Install dependencies
$ npm install
# Migrate and seed the database
$ rails db:migrate db:seed
For Testing:
# Go into the root directory
$ cd fuel-tracker-app
# Migrate the database for the test environment
$ rails db:migrate RAILS_ENV=test
# Run the specs/tests
$ rspec
From your command line:
# From inside the root directory (may also be ran from subfolders)
$ cd fuel-tracker-app
# Start the app (runs on ports 3000 and 3001, configured in Procfile.dev)
$ rake start
Open the app on your chosen browser with the following url: http://localhost:3000
From the first command line:
# Go into the react app's directory
$ cd fuel-tracker-app/FuelTrackerApp
# Run the app (runs on port 3000 by default)
$ npm start
From a second command line:
# Go into the root directory
$ cd fuel-tracker-app
# Start Rails API from port 3001
$ rails s -p 3001
Note: If you're using Linux Bash for Windows, see this guide or use node
from the command prompt.
You can download the latest installable version of Fuel Tracker App for Windows, macOS and Linux.
This software uses the following open source packages:
- Add specs/tests for react
- Add search function for Manager View
GitHub @mjtabaya