This project is a simple 'Never Have I Ever' anonymous game that you can play with your friends
To use this application you have to have Java 25 installed on your local machine
If you want just to run the application, simply download ihne.jar from release folder.
Then open terminal in the folder with this jar and type:
For Windows, Linux and MacOS (for MacOS you have to run it with sudo)
$ java -jar ihne.jar
To use application you should run it in some local network, and give IP address or host name of the host machine to people you're playing with.
In this example I will use localhost instead of it.
Give link to this page to all the people, one of them can create room and others will connect to it by the code, then they can ask questions until the host (who created the room) hits "Start play" and questions are shown in random order to him.
http://localhost/
You can build the application by running:
$ ./gradlew build
To assemble new jar (that will appear in the release folder use this:
$ ./gradlew bootJar
You can launch the application by running:
$ ./gradlew bootRun
Also you can build and run using IntelliJ IDEA Spring Boot plugin.
This project uses kotlin-spring plugin to avoid requiring open modifier on proxified
classes and methods, see this blog post for more details.
This project uses a Kotlin based Gradle configuration.
POST http://localhost/api/v1/room
Response
{
"code": Int
}
GET http://localhost/api/v1/room/{code}
Response
200 OK - room exists
404 Not Found - there is no such room
GET http://localhost/api/v1/room/{code}/notShownCount
Response
Long /* count of questions not shown in the room. */
200 OK - room exists
404 Not Found - there is no such room
POST http://localhost/api/v1/room/{code}/load
{
"size": Int,
"datasetName": String /* values: common, horny */
}
Response
Long /* count of questions added to the room. Identical questions are not added so 0 means you already have all questions from this dataset in the room */
POST http://localhost/api/v1/room/{code}/upload
form-data
file: yourFile.txt
/* every question from new line */
Response
Long /* count of questions added to the room. Identical questions are not added so 0 means you already have all questions from this dataset in the room */
POST http://localhost/api/v1/room/{code}/questions
{
"question": String
}
Response
200 OK - question added
400 Conflict - such exact question already exist in this room
GET http://localhost/api/v1/room/{code}/questions/random
Response
{
"question": String
}
GET http://localhost/api/v1/room/{code}/questions/download
Response
200 OK - You receive file (ByteArray to download)
405 Method Not Allowed - not all questions were shown in this room. Play a game first.
- Kotlin 2.2.10
- Spring Boot 4.0.0
- Spring WebFlux Reactive web server and client
- Spring Kotlin support
- Reactor Kotlin
- Gradle Kotlin DSL
- h2(local), PostgreSQL/MySQL(prod, selectable)
- Thymeleaf