Skip to content
This repository was archived by the owner on May 25, 2023. It is now read-only.

eptitsyn/topjava-project-restvoteservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Restautant Voting App

App swagger on railway

Technical requirement:

Design and implement a REST API using Hibernate/Spring/SpringMVC (Spring-Boot preferred!) without frontend.

The task is:

Build a voting system for deciding where to have lunch.

  • 2 types of users: admin and regular users
  • Admin can input a restaurant and it's lunch menu of the day (2-5 items usually, just a dish name and price)
  • Menu changes each day (admins do the updates)
  • Users can vote on which restaurant they want to have lunch at
  • Only one vote counted per user
  • If user votes again the same day:
    • If it is before 11:00 we assume that he changed his mind.
    • If it is after 11:00 then it is too late, vote can't be changed

Each restaurant provides a new menu each day.

As a result, provide a link to GitHub repository. It should contain the code, README.md with API documentation and couple curl commands to test it (better - link to Swagger).

REST API documentation Данные для доступа:

Admin: admin@gmail.com / admin
User:  user@yandex.ru / password
Guest: guest@gmail.com / guest

Main hadlers

Restaurant list with today's menu: /api/restaurants

Vote: /api/votes

Vote Results /api/admin/votes/{date}/results

Note

For correct UTF8 display set enviroment variable

JAVA_TOOL_OPTIONS = -Dfile.encoding=UTF8

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages