REST API service to store and track changes of steam user's dota 2 inventory items.
- Inventory history - created, updated, deleted items
- Rate limiter
- Unit tests
Swagger OpenAPI 3 is available by path:
- UI:
host:port/swagger-ui.html
- JSON:
host:port/api-docs
- Show Inventories:
GET /api/v1/inventories/
- Create an Inventory (load items from steam):
POST /api/v1/inventories/:steamid/
- Show an Inventory:
GET /api/v1/inventories/:steamid/
- Update an Inventory (reload items from steam):
PUT /api/v1/inventories/:steamid/
- Delete an Inventory:
DELETE /api/v1/inventories/:steamid/
- Show Inventory Items:
GET /api/v1/inventories/:steamid/items/
- Show Inventory Items (pagination):
GET /api/v1/inventories/:steamid/items/page/
- Show Inventory Items changes:
GET /api/v1/inventories/:steamid/changes/
- Show Inventory Items changes (for a version):
GET /api/v1/inventories/:steamid/changes/:version/
- Java 17
- Apache Maven
- MongoDB 5.0
- Create
.env
based on.env.example
- Create
environment.properties
based onenvironment.properties.example
inapp/src/main/resources
- Set the steam api key property to access Steam's API:
env.steam.api.key=your_api_key
- To run in development environment.
You can use a default build for IntelliJ IDEA to run the app -
.run/dev-build.run.xml
.docker-compose up
- To run in production environment
docker compose -f docker-compose.prod.yml up -d
Conceptual entity relation diagram (Barker's system):
Assumptions:
- Average inventory item size - 500 bytes.
- Average user has 7000 inventory items.
- Users update inventory once per day. Each day it increased by some small coefficient (0.05).
- Data is stored for a year.
Estimate:
- User inventory size: 500 * 7000 = 3.5 MB
- User inventory size for a year: 3.5 MB + (365 * 0.05 * 3.5) = ~70 MB
- Storage for 100K users: 70MB * 1000000 = 7 GB
The GNU General Public License v3.0. Please see License File for more information.