Skip to content

fitiz/challenge-service

Repository files navigation

Fitiz - Challenge Service

This project aims to enhance user engagement and competitiveness by implementing location-based challenges and real-time leaderboards, encouraging users to participate and track their progress within these challenges actively.

fitiz-app - Page 1 (2)

  • Publishes step-count topic to Kafka (by simulator just for now, there will be a separate endpoint for the producer)
  • Uses Flyway + jOOQ
  • Create challenge:
    • POST /api/challenges
  • Participate in challenge:
    • POST /api/challenges/{challengeId}/participants/{userId}
  • Claim challenge reward:
    • POST /api/challenges/{challengeId}/participants/{userId}/rewards

Please see the ChallengeManager , LeaderboardRedisProvider detailed implementation

*This service was later separated into challenge-service and leaderboard-websocket-service. Some codes are still here even though they were used in the leaderboard-websocket-service and other consumer services.

UI

  • Live Mode, users can initiate a WebSocket (STOMP) connection and subscribe to the challenge-specific channel
Screenshot 2024-02-12 at 5 13 33 PM

Getting Started

Prerequisites

Make sure you have the following software installed:

Installation

  1. Clone this repository to your local machine:

    git clone https://github.com/fitiz/challenge-service.git
    
  2. Clone this repository to your local machine:

    cd challenge-service
    
  3. Clone this repository to your local machine:

    ./gradlew bootRun
    

Usage

Once the project is successfully running, you can visit the following URLs in your browser:

Contributing

  1. Create a new feature branch:

     git checkout -b new-feature
    
  2. Commit your changes:

     git commit -am 'Added a new feature'
    
  3. Push to the branch:

    git push origin new-feature
    
  4. Submit a pull request.

Formatter

Please use google-java-format to formats Java source code to with Google Java Style:

https://github.com/google/google-java-format/tree/master

About

Real-time location-based challenges and leaderboards, utilizing Kafka, Redis, and WebSocket

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published