Giter VIP home page Giter VIP logo

jogs-demo's Introduction

Jogging Tracker

Requirements

  • User must be able to create an account and log in
  • When logged in, user can see, edit and delete his times he entered
  • Implement at least three roles with different permission levels: a regular user would only be able to CRUD on their owned records, a user manager would be able to CRUD users, and an admin would be able to CRUD all records and users.
  • Each time entry when entered has a date, distance, and time
  • When displayed, each time entry has an average speed
  • Filter by dates from-to
  • Report on average speed & distance per week
  • REST API. Make it possible to perform all user actions via the API, including authentication
  • In any case you should be able to explain how a REST API works and demonstrate that by creating functional tests that use the REST Layer directly. Please be prepared to use REST clients like Postman, cURL, etc for this purpose.
  • All actions need to be done client side using AJAX, refreshing the page is not acceptable.
  • Bonus: unit and e2e tests!
  • You will not be marked on graphic design, however, do try to keep it as tidy as possible.

Set Up

API

Set up

cd server
bundle install
cp config/database.yml.example config/database.yml
cp .env.example .env

Make sure to edit config/database.yml and .env with proper settings.

And then run:

make db_create name=jogger_development
make db_migrate env=development

To initialize a server in port 9393:

make server

To initialize a development server that reloads on every request:

make dev_server

Run the client:

npm install
npm start

And then you can access the site at http://localhost:8080

Tests

API Tests

Set up:

cd server
make db_create name=jogger_test
make db_migrate env=test
cp .env.example .env.test

Run tests:

make test

Client Tests

Set up:

npm install

Run tests:

npm run test

jogs-demo's People

Contributors

kitop avatar

Watchers

 avatar James Cloos avatar  avatar

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.