| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A simple and open-source playtesting backend for indie game developers.
Playtesters.API is a lightweight, secure RESTful service built with .NET 10 and Entity Framework Core (SQLite).
It’s designed for indie developers or small teams who need a simple way to manage playtesters, access keys, and access validation history for private or early-access game builds.
This API was originally created to support the roguelike action game I’m building with my best friend from school — but it has grown into a fully reusable, standalone solution.
cd src# ---------------------------------------------------------
# Admin authentication key for protected endpoints
# ---------------------------------------------------------
API_KEY=your-admin-key
# ---------------------------------------------------------
# SQLite database file used to store testers and access logs
# ---------------------------------------------------------
SQLITE_DATA_SOURCE=playtesters.db
# ---------------------------------------------------------
# Discord webhook URL for sending notifications
# (set this only if you want Discord alerts)
# ---------------------------------------------------------
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/xxxxx/xxxxxdotnet runhttp://localhost:5183/swagger
docker build -t playtesters-api .docker run -p 5183:8080 --env-file .env playtesters-apiIf you want the playtesters.db file to persist across restarts:
docker run \
-p 5183:8080 \
--env-file .env \
-v playtesters_data:/app/data \
playtesters-apiSQLITE_DATA_SOURCE=/app/data/playtesters.dbWhen the application starts, EF Core automatically applies the migrations and creates the SQLite database (along with its schema) inside the path /app/data. This is important because the database file is generated at runtime, meaning the container writes it into the mounted volume. By doing this, the volume does not overwrite the database path with an empty directory — instead, it simply persists the file that the app creates.
All admin endpoints require the following header:
X-Api-Key: <your-admin-key>The admin key must be defined in your .env file:
API_KEY=your-admin-keyOnly the endpoint /api/testers/validate-access is publicly accessible for validating tester access, and /api/testers/{accessKey}/playtime is publicly accessible for reporting accumulated playtime.
You can use this Playtesters.API.http file (VS Code / Rider / Visual Studio compatible) to test every endpoint of the API.
The /api/testers/validate-access endpoint should be called before allowing gameplay or enabling private build features to ensure the tester has valid access.
The /api/testers/{accessKey}/playtime endpoint can be called anytime during or after gameplay to report accumulated playtime for the tester.
Below is a quick demonstration of how you can integrate the Playtesters API into a Unity login screen using a simple access key workflow.
We provide two ready-to-use scripts in assets/unity/:
TesterLoginMenu.cs – Handles tester login and access key validation.
PlaytimeReporter.cs – Reports playtime increments to the backend.
You can find them here:
MIT License — feel free to use, modify, and extend it for your own projects.
| Back | FazBrowse Home | New Git URL |