Skip to content

kiransain/sopra-fs25-group-26-server

Repository files navigation

🕵️ Welcome to Manhunt!

🎯 Introduction

Manhunt is a mobile, multiplayer web application that reimagines classic hide-and-seek for the smartphone era. By blending real-world movement with battle‐royale–style dynamics, it brings back a nostalgic childhood game in a modern, enhanced form—making playing outside fun again.

Players join or create a game as either Hunter or Hider, then physically move within a geo-fenced play area that dynamically shrinks. Strategic power-ups—* Reveal* (briefly expose all players) and Recenter (shift the game center)—add tactical depth. All clients remain tightly synchronized—sharing GPS positions, player statuses, and a server-anchored countdown—to ensure fairness and eliminate boundary or timing disputes.

Motivation

  • Rekindle the joy of a nostalgic outdoor game with modern technology
  • Solve childhood hide-and-seek frustrations (lost players, boundary disputes, unfair starts)
  • Encourage physical activity, social interaction and strategic thinking
  • Offer quick, repeatable rounds with clear rules and engaging mechanics

⚙️ Technologies Used

  • Foundation: Java & Spring Boot
  • Data Persistence : JPA (Hibernate)
  • Build Tool: Gradle
  • Database: H2 (in-memory database)
  • API Architecture: RESTful Web Services
  • Testing: JUnit, Mockito
  • Deployment: Google Cloud

🧩 High-Level Components

  1. Controllers

    • Role: Handle incoming HTTP requests and route them to the appropriate service methods.
    • Correlations:
      • Call Service methods to perform business logic.
      • Uses DTO Mappers to convert between DTOs and entities.
      • Convert entities returns from Services in API-responses.
      • Forward errors from Services to HTTP-Status codes.
    • Main File: GameController
  2. Services

    • Role: Implement core business logic and game mechanics.
    • Correlations:
      • Use Repositories to interact with the database.
      • Called by Controllers to process requests.
      • Manipulate and transform Entities objects based on the business logic.
      • Throw errors that are caught by Controllers and converted to HTTP-Status codes.
    • Main File: GameService
  3. Repositories

    • Role: Provide data access interfaces for the database.
    • Correlations:
      • Called by Services to persist and retrieve data.
      • Return Entities objects to Services.
      • Provide query operations called by Services.
    • Main File: GameRepository
  4. Entities

    • Role: Define the application's data model and its relationships.
    • Correlations:
      • Used by Repositories for Database queries.
      • Manipulated by Services to implement business logic.
      • Transformed by DTO Mappers to create Data Transfer Objects for Controllers.
      • Include relationships to other Entities.
    • Main File: Game
  5. DTO Mappers

    • Role: Convert between Data Transfer Objects and entities.
    • Correlations:
      • Used by Controllers to transform incoming requests into entities and vice versa.
      • Allow Services to work with entities.
      • Protect Entities from direct exposure to the API.
    • Main File: DTOMapper

🚀 Launch & Deployment

Prerequisites

  • Java 17
  • Gradle 7.0+ -Browser Location: Ensure that your browser has location services enabled otherwise the game functions will not work.

Clone the Repository

git clone git@github.com:kiransain/sopra-fs25-group-26-server.git
cd sopra-fs25-group-26-client

Local Development

Production Build

./gradlew build

Run the Application

./gradlew bootRun

Run Tests

./gradlew test

or directly in your IDE by running the test folder.

External Dependencies

  • H2 in-memory database is used for testing, development and production. No external database setup is required.

Deployment

  • The backend is automatically deployed to Google Cloud on pushes to the main branch.

Releases

  • Make sure changes are committed and pushed to the 'develop' branch.
  • Create a pull request to merge 'develop' into 'main'.
  • After code review and approval, merge the pull request.
  • Create a new tag for the release version and push it.
  • Google Cloud will automatically deploy the latest version to production.

🛣️ Roadmap

Future contributors might consider:

  1. Customizable role assignment logic (e.g. several hunters, teams).
  2. Add a persistent Database for production.

👥 Authors & Acknowledgments

  • Kiran Nanduri - frontend - Kiran Nanduri

  • Ermin Mumic - backend - Ermin Mumić

  • Gent Jashari - frontend - Gent Jashari

  • And many thanks to our TA Ambros Eberhard, the SoPra teaching team, the course in parallel Software Engineering by Prof. Thomas Fritz, and the open-source tools we relied on.

  • This code is based on the SoPra-FS25-Server

  • To see contributions, you can see Contributors


📄 License

This project is licensed under the Apache License Version 2.0.


About

SoPra-FS25-group26-server

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages