Personal Log Manager is an ASP.NET Core REST API for storing and querying personal activity logs in a JSON file.
The API supports:
- creating logs
- querying logs with filters
- updating existing logs
- deleting logs
- localized text output (English and Romanian)
- Overview
- Requirements
- Configuration
- Run the API
- API Reference
- Filtering Behavior
- Templates and Data
- Storage
- Development
- Release
- Contributing
- Related Projects
- License
Base route:
/PersonalLog
Controller actions:
POST /PersonalLogto store a new logGET /PersonalLogto retrieve log text entriesPUT /PersonalLogto update an existing logDELETE /PersonalLogto delete a log
- .NET SDK/runtime with support for
net10.0
Default configuration is defined in appsettings.json:
{
"dataStoreSettings": {
"logStorePath": "Data/logs.json"
},
"securitySettings": {
"apiKey": "[[PERSONAL_LOG_MANAGER_API_KEY]]"
},
"nuciLoggerSettings": {
"logFilePath": "logfile.log",
"isFileOutputEnabled": true
}
}Important settings:
dataStoreSettings.logStorePath: path to the JSON file used as persistent storage.securitySettings.apiKey: API key required by the controller authorization.
At startup, the app creates the store directory/file automatically if missing.
dotnet restore
dotnet runBy default, ASP.NET Core prints the listening URLs in the console.
Requests are validated through the NuciAPI request model and an API key authorizer.
All request DTOs inherit from NuciApiRequest, so include the inherited auth fields expected by your client integration (typically including apiKey).
POST /PersonalLog
Request body:
{
"apiKey": "YOUR_API_KEY",
"date": "2026-04-23",
"time": "19:10",
"timeZone": "Europe/Bucharest",
"template": "WaterDrinking",
"data": {
"amount": "300",
"amount_currency": "ml"
}
}Notes:
dateis required.time,timeZone,template, anddataare optional.- A new identifier is generated internally (format like
L123456789).
GET /PersonalLog
Supported query parameters:
apiKeydatetimetemplatelocalisation(default:en, Romanian also supportsro,ro-RO,ro-MD)count(default:1, allowed range:1..100000)
Optional structured filter:
datakey-value filters can be passed by clients that support object-style query serialization.
Example request:
GET /PersonalLog?apiKey=YOUR_API_KEY&date=2026-04-23&template=WaterDrinking&localisation=en&count=5
Success response shape:
{
"logs": [
"L123456789 2026-04-23: 19:10 Europe/Bucharest: I drank 300 ml of water"
],
"count": 1
}PUT /PersonalLog
Request body:
{
"apiKey": "YOUR_API_KEY",
"id": "L123456789",
"time": "19:15",
"data": {
"amount": "350"
}
}Notes:
idis required.- Any provided field is updated.
- For
data, provided keys are merged/overwritten on the existing dictionary.
DELETE /PersonalLog
Request body:
{
"apiKey": "YOUR_API_KEY",
"id": "L123456789"
}Notes:
idis required.
When querying logs:
date,time, andtemplatefilters are applied as anchored regex patterns.- each provided
datafilter is matched case-insensitively against existing log data values. - output is sorted by:
- date descending
- time descending
- template ascending
- creation timestamp ascending
Template names map to enum values in:
Service/Models/PersonalLogTemplate.cs
The text output for each template is produced by localized builders:
Service/TextBuilding/Localisation/EnglishTextBuilder.csService/TextBuilding/Localisation/RomanianTextBuilder.cs
Different templates use different keys in the data object (for example: platform, discriminator, amount, currency, and many others).
Logs are persisted as JSON records at the configured logStorePath.
Stored fields include:
iddatetimetimeZonetemplatedatacreatedDTupdatedDT
dotnet builddotnet runThe repository includes release.sh, which delegates to the upstream deployment script used by the project maintainer.
bash ./release.sh 1.0.0This script downloads and executes an external release helper from: https://raw.githubusercontent.com/hmlendea/deployment-scripts/master/release/dotnet/10.0.sh
Note: Piping into bash is an intensely controversial topic. Please review any external scripts before running them in your environment!
Contributions are welcome.
Please:
- keep the changes cross-platform
- keep the pull requests focused and consistent with the existing style
- update the documentation when the behaviour changes
- add or update the tests for any new behaviour
Licensed under the GNU General Public License v3.0 or later. See LICENSE for details.