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.
- 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.
- Live Mode, users can initiate a WebSocket (STOMP) connection and subscribe to the challenge-specific channel
Make sure you have the following software installed:
-
Clone this repository to your local machine:
git clone https://github.com/fitiz/challenge-service.git
-
Clone this repository to your local machine:
cd challenge-service -
Clone this repository to your local machine:
./gradlew bootRun
Once the project is successfully running, you can visit the following URLs in your browser:
- Application: http://localhost:8080
- Actuator Endpoints: http://localhost:8080/actuator
-
Create a new feature branch:
git checkout -b new-feature
-
Commit your changes:
git commit -am 'Added a new feature' -
Push to the branch:
git push origin new-feature
-
Submit a pull request.
Please use google-java-format to formats Java source code to with Google Java Style:
