# Project pack: LubeLogger @ 63fa5cd

Facts about **LubeLogger** for an AI following the [BespokeAI handover guide](https://handoff.bespokeai.software/guide/v2.md). This pack is pinned to one version and never changes after publication.

> LubeLogger is a self-hosted vehicle maintenance and fuel mileage tracker. You record services, repairs, upgrades, fuel, taxes and odometer readings for each vehicle, set reminders for upcoming work, and see costs and fuel economy over time. It is simple to run and keeps your records in your hands.

## Version and source
- Repository: https://github.com/hargata/lubelog
- Pinned commit: `63fa5cd267497ba01c29f4888c65efbbdd4b94bf`. Use exactly this version.
- Fresh checkout: use the setup below in an empty folder. If you already have this exact source checked out, keep your branch and use the development command instead; do not clone again or reset local changes.
- Or download a zip: https://github.com/hargata/lubelog/archive/63fa5cd267497ba01c29f4888c65efbbdd4b94bf.zip
- Official docs: https://docs.lubelogger.com
- Live demo: https://github.com/hargata/lubelog?tab=readme-ov-file#demo. See the project README for the demo link and sign-in.
- Licence: **MIT**. Free to use, change and share, even commercially. Keep the original copyright notice.

## Running the pinned source
- Fresh pinned-source setup (skip clone and checkout in an existing worktree):

  ```sh
  git clone https://github.com/hargata/lubelog bespoke-lubelogger
  cd bespoke-lubelogger
  git checkout --detach 63fa5cd267497ba01c29f4888c65efbbdd4b94bf
  # Prepare development requirements and local configuration first.
  dotnet restore
  dotnet run
  ```

The commands below are a starting point from the reviewed source. Prepare the listed tools, local configuration and companion services before starting the app. These instructions have not yet been validated in participant sessions.

### Separate trial of the current release
This tries an upstream release, which may differ from the pinned source above. It does not run your source changes. Use only sample data and a separate data directory or volume. Check the upstream documentation before running it.

  ```sh
  docker run -d --name lubelogger -p 8080:8080 -v lubelogger-data:/App/data -v lubelogger-keys:/root/.aspnet/DataProtection-Keys ghcr.io/hargata/lubelogger:latest
  # then open http://localhost:8080
  ```

- Needs: Docker for a trial, .NET 8 SDK for development
- Develop: `dotnet run`
- Build: `dotnet build`
- Stack: csharp, javascript (ASP.NET Core MVC, Razor, Bootstrap). Difficulty for a non-developer with an AI: **easy**. A compact ASP.NET MVC app with straightforward controllers and views. Records, reminders and reports are good places to extend.

## Customisation points (settings → extend → code)
- **vehicles-and-records** [settings]: Service, repair, upgrade, fuel and tax logs. → `In the app, under Vehicles and the record tabs`
- **reminders** [settings]: Reminders by date or mileage, with optional email. → `Reminders tab`
- **settings** [settings]: Metric or imperial, tab order and look. → `Settings (units, currency, visible tabs, themes)`
- **api** [extend]: Read and add records from scripts. → `docs.lubelogger.com API section`
- **controllers-and-views** [code]: New reports and record types. → `Controllers/ and Views/`

## Must keep working
- Data file format, so existing records continue to load.
- Reminder calculations for date and mileage.
- Authentication when enabled.

## Staying updatable
Prefer settings and the API. Add features as new controllers and views to keep merging simple.

## Data, costs and safety
- Personal data: **yes**. Stored in: A local database file and attachments under /App/data. Contains your vehicle details and plate numbers. Back up the data folder.
- Service: Email (SMTP, optional, set in the MailConfig settings) (optional, usually free to a few dollars): Reminder emails.
- It contains vehicle and plate details. Enable the login and HTTPS if it is reachable from the internet.
- Don't commit the data folder.

---

# Customising LubeLogger

LubeLogger is a small ASP.NET MVC app. The folder layout is the standard Controllers, Models, Views and Logic.

## How the code is laid out

| You want to change… | Look in |
|---|---|
| Controllers | Controllers/ |
| Business logic and data access | Logic/ and External/ |
| Models | Models/ |
| Pages (Razor) | Views/ |
| Static files | wwwroot/ |
| Settings | appsettings.json |

## Use the gentlest change first

1. **Settings (no code):** units, currency, tabs, themes and reminders.
2. **Extend:** the API.
3. **Code:** new record types and reports.

## Recipes

- **New report:** add a method to the relevant controller, a model for the result and a Razor view, and link it from the vehicle page.
- **New field on service records:** add it to the model, the data access class and the record form and list views.

## Running and checking your changes

- `dotnet build` and run the app, then add a vehicle and a fuel record.
- Check imperial and metric units.

## Pitfalls

- Keep the data directory outside the source tree.
- Mind the data-protection keys volume in Docker, or logins reset on restart.

---
Machine-readable: [bespoke.yaml](https://handoff.bespokeai.software/p/lubelogger/63fa5cd/r2/bespoke.yaml) · Hosting options: [hosting.md](https://handoff.bespokeai.software/p/lubelogger/63fa5cd/r2/hosting.md) · Agent skill: [SKILL.md](https://handoff.bespokeai.software/p/lubelogger/63fa5cd/r2/SKILL.md)
