Tibia Stalker - API is an ASP.NET Web Api that helps players to detect other characters of their enemy. |
You can check out https://api.tibiastalker.pl/
- General Info
- Technologies Used
- Features
- Screenshots
- Setup
- Usage
- Docker Usage
- Project Status
- Room for Improvement
- Contact
- License
-
Have you ever been killed or cheated by some noob character, and you want revenge on his main character ?
-
Now it's possible! Application gives opportunity to find all characters of that player. Just type your suspect character name, and it gives you list of most possible other characters.
- You have to remember that application does not have 100% sure of other character match, it is only suggestion based on probability. The more player plays, the more likely result will be close to true.
- ASP.NET Core 7.0
- C# 11.0
- EF Core 7.0
- Postgres - version 16
- RabbitMq
- SignalR
- TestContainers - documentation here
- BenchmarkDotNet
- Dapper
- Moq
- Serilog
- Seq - documentation here , license here
- Swagger - documentation here
- Xunit
- MediatR
- FluentAssertions
- Autofac
- Docker
- Polly
List the ready features here:
- All data analyser mechanism with optimization data storage, also work if character changed name or was traded
Endpoints:
- GET
/health
- health check. - GET
/api/tibia-stalker/v1/characters/{characterName}
- returns character details with 10 most scores possible other character names. - GET
/api/tibia-stalker/v1/characters
(params(string)searchText
,(int)page
,(int)pageSize
) - returns list of character names based on a fragment of the name, sorted in ascending order. - GET
/api/tibia-stalker/v1/characters/prompt
(params(string)searchText
,(int)page
,(int)pageSize
) - returns list of character names starts at fragment of the name, sorted in ascending order. - GET
/api/tibia-stalker/v1/worlds
(params(bool?)isAvailable
) - returns filtered worlds.
Life Time Character Tracker:
Track your enemies whether is online or not.
To track specific character use WebSockets to connect with:
{baseUrl}/connection-hub
Ones you connected send message:
{
"protocol":"json",
"version":1
}�
Now join to group to track enemy sending:
{
"arguments":[
"your_enemy_character_name"
],
"target":"JoinGroup",
"type":1
}�
To receive messages set "target:CharacterTracker":
Received message example:
{
"type":1,
"target":"Character Tracker",
"arguments": [
{
"name":"bobeek",
"isOnline":true,
"hubEventId":"8bf7b7b9-77d6-41e7-8002-b30f8309718e",
"occurredOn":"2024-07-15T12:59:42.7452908Z"
}
]
}
To stop tracking one character just send message
{
"arguments":[
"your_enemy_character_name"
],
"target":"LeaveGroup",
"type":1
}�
or disconnect connection to stop tracking all enemies.
To catch exceptions set "target:JoinGroupFail":
{
"type":1,
"target":"JoinGroupFail",
"arguments":[
"Character (bobeek test) not found."
]
}�
Try with Postman. Example here
Warning: Do not forget about special sign on the end!
- SDK version 7.0.x or higher ( instruction for Windows/Linux/macOS here )
- ASP.NET Core Runtime version 7.0.x or higher ( instruction for Windows/Linux/macOS here )
- Clone repository
git clone https://github.com/TibiaStalker/tibiastalker-api.git
- Seq environment on Windows here or docker container here
- Your own Postgres Database
- RabbitMq environment or docker container
- Create database in Postgres and configure
appsettings.json
or if you have Development environment copyappsettings.Development-template.json
change file name toappsettings.Development.json
and input your secrets - Configure
launchSettings.json
- Firstly you need to build project - go into repo directory, open CMD and type (
dotnet build
) - Than
dotnet publish -c Release -o /app
- Next you should firstly run
TibiaStalker.Api
to add all migrations - go into./app
, open CMD and typedotnet TibiaStalker.Api.dll
- Last step is to configure
cron
on your machine with periods as below:
WorldScanAnalyser
- (dotnet WorldScanAnalyser.dll
) - ones per dayWorldScanSeeder
- (dotnet WorldScanSeeder.dll
) - minimum ones per 5 minDbCleaner
- (dotnet DbCleaner.dll
) - ones per day/weekWorldSeeder
- (dotnet WorldSeeder.dll
) - best practise ones per dayChangeNameDetector
- (dotnet ChangeNameDetector.dll
) - ones per day
Also, 2 projects should run all the time:
TibiaStalker.Api
- (dotnet TibiaStalker.Api.dll
)WorldScanAnalyserSubscriber
- (dotnet WorldScanAnalyserSubscriber.dll
) - possible run multiple instancesChangeNameDetectorSubscriber
- (dotnet ChangeNameDetectorSubscriber.dll
) - possible run multiple instances
Want to contribute? Great!
To fix a bug, enhance an existing module or add something new, follow these steps:
- Fork the repo
- Create a new branch (
git checkout -b feature/<new_feature_or_improve_name>
) - Make the appropriate changes in the files
- Add changes to reflect the changes made
- Commit your changes (
git commit -am 'Add xxx feature'
) - Push to the branch (
git push origin feature/<new_feature_or_improve_name>
) - Create a Pull Request
- Firstly pull image
- Create database in Postgres
- Then create and configure file
.env
with environment variables as here - Then open CMD and run container
docker run --env-file .env -p <port1>:80 --network <seq_container_network> --name ts_api -d --memory 200m --restart always ghcr.io/tibiastalker/tibia-stalker-api:latest dotnet TibiaStalker.Api.dll
- And
docker run --env-file .env --network <seq_container_network> --name ts_change-name-detector-subscriber -d --memory 300m --restart always ghcr.io/tibiastalker/tibia-stalker-api:latest dotnet ChangeNameDetectorSubscriber.dll
- And
docker run --env-file .env --network <seq_container_network> --name ts_world-scan-analyser-subscriber -d --memory 500m --restart always ghcr.io/tibiastalker/tibia-stalker-api:latest dotnet WorldScanAnalyserSubscriber.dll
- Last step is to configure
cron
on your machine with periods as below:
docker run --env-file .env --network <seq_container_network> --name ts_world-scan-analyser --rm -d --memory 200m ghcr.io/tibiastalker/tibia-stalker-api:latest dotnet WorldScanAnalyser.dll
) - ones per daydocker run --env-file .env --network <seq_container_network> --name ts_world-scan-seeder --rm -d --memory 200m ghcr.io/tibiastalker/tibia-stalker-api:latest dotnet WorldScanSeeder.dll
) - minimum ones per 5 mindocker run --env-file .env --network <seq_container_network> --name ts_db-cleaner --rm -d --memory 500m ghcr.io/tibiastalker/tibia-stalker-api:latest dotnet DbCleaner.dll
) - ones per day/weekdocker run --env-file .env --network <seq_container_network> --name ts_world-seeder --rm -d --memory 200m ghcr.io/tibiastalker/tibia-stalker-api:latest dotnet WorldSeeder.dll
) - best practise ones per daydocker run --env-file .env --network <seq_container_network> --name ts_change-name-detector --rm -d --memory 300m ghcr.io/tibiastalker/tibia-stalker-api:latest dotnet ChangeNameDetector.dll
) - ones per day
- Go into Actions section on GitHub
- Then
Deploy
- Then
Run workflow
- Choose branch and input version of the Docker image
Project is: still in progress .
- Add authorization and authentication
- Kubernetes
- Frontend
You can check out the full license here
This project is licensed under the terms of the MIT license.
Created by @kamiljanek GitHub