-
User
- username {
String} - password {
String} - role {
String} - cars {
[Object]} - money {
Number} without float numbers - rank {
Number} - dateRegistered {
Date} - respect {
Number} - level {
Number} Depends on respect - token {
String} generate on login - lastLogindate {
Date} - busyUnit {
Date} DateTime().now + busyHours
- username {
-
Race
- dateCreated {
Date} - users {
[Object]} / {[String]} (UserNamesOnly) - status {
String} - map {
String} / {Object}
- dateCreated {
-
Car
- price {
Number} - model {
String} - wheelsLevel {
Number} - engineLevel {
Number} - turbo {
Number} [0-100] - urlImage {
String} - dateCreated {
Data} - levelRequired {
Number} - damage {
Number} car status. 100 - broken
- price {
-
Map
- name {
String} - prizes {
[Number]} money which users will earn after race is finished - respectGiven {
[Number]} Same as prizes, and user can gain levels - damageToTake {
Number} Damage to take from each
- name {
-
Job
- name {
String} - money {
Number} - busyHours {
Number} user will earnmoneyafter that hours. User cannot participate in race while working
- name {
- / - home page (public) with nav bar, footer
- api/users/
GET/register displays a register form (public)GET/login displays a login form (public)POST/register (public)POST/login (public)
- api/admin/ (only for administrator)
GET/users?page=1&size=10&sort=asc&by=username - lists all users (default values if no query params provided)- Should have links to user's details. May use Kedno Grid
GET/users/:id - details about user- Should have buttons for delete and Update (role, money, username)
DELETE/users/:id - delete user from dbPUT/users/:id - update user properties (role, money, username)
- races/
GET/all?page=1&size10&sort=desc&by=date - (public) lists latest races- Should have links to races's details. May use Kedno Grid
GET/add (private registered users only) shows a form for create a race. User can choice a map only by name (dropdown) the user should provide a car (from his bought cars)POST/add (private) creates a new raceGET/:id (private) details about race, status, (ranking if finished)PUT/:id (private) user provides a car and joins into race. Car should not have damage 100%POST/:id/start (private) some logic when the race will start (the user creator of the race can starts)- game logic should give rewards on users
- shop/cars/
GET/all?page=1&size10&sort=desc&by=model - (private) cars- Should have links to cars's details. May use Kedno Grid
GET/:id (private) car details, money, engine level etc.- if user does'n have this car in collection, should have option to buy it
POST/:id/buy (private) if user have enough money, car is added to collectionGET/add (moderator and administrators only) form for creating a carPOST/add (moderator and administrators only) - if time is enough will be implementedDELETE/:id/remove (administrators only) - if time is enough will be implemented
- maps/ (moderators and administrators)
GET/all?page=1&size10&sort=desc&by=name - lists maps- Should have links to maps's details. May use Kedno Grid
GET/:id damage to take from cars, and prizes.GET/add form for creating a mapPOST/add adds a mapDELETE/:id/remove (administrator only) if time is enough will be implemented
- profile/ (private)
GET/ user infoGET/cars user carsGET/cars/:model car details where user should have an option to repair the car, if any damage is takenPUT/cars/:model/repair if user has enough money.
- jobs/ (private) if time is enough will be implemented
GET/all some jobs with buttons. Then clicked start working to earn money afterNhoursPUT/:id/ user cannot get another work, or race until this job is finished
User can buy a car. User makes a race with one of his cars. Other users can join while provide a car to race with.
The race can be started when there are more than one user. After race, first five users receive a respect and money
depends on map. For each car in the race deal a damage depends on map. When respect is enough user can gain a level
and new cars are unlocked in shop. Users should repair cars.