NE

nutmos/expensetrackr

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

0 stars Качество 63 Тренд 14MIT

A small expense-logging web service in Go (Gin) with a plain HTML + vanilla JS web page and a JSON API. Data is stored in SQLite through the pure-Go modernc.

Обзор

A small expense-logging web service in Go (Gin) with a plain HTML + vanilla JS web page and a JSON API. Data is stored in SQLite through the pure-Go modernc.org/sqlite driver, so no CGO or C toolchain is needed. Status: prototype for local use. It listens on 127.0.0.1 by default and requires a username/password login (server-side sessions); see docs/auth.md. Data is not per-user yet. - Go 1.24+ (go.mod targets go 1.24 / toolchain go1.24.4, and every dependency is pinned to a version that builds with the locally installed Go 1.24.4) - No CGO (CGO_ENABLED=0 works) - GNU make (optional; the targets are thin wrappers around go commands) Modelled on prometheus-operator: go.mod at the repo root, binaries under cmd/, packages under pkg/, a Makefile for common tasks, and documentation in its own folder. Everything runs from the repo root; no cd needed. Import packages as github.com/nutmos/expensetrackr/pkg/ .

README

Показан фрагмент оригинального README. Открыть оригинал.

expense-service

A small expense-logging web service in Go (Gin) with a plain HTML + vanilla JS web page and a JSON API. Data is stored in SQLite through the pure-Go modernc.org/sqlite driver, so no CGO or C toolchain is needed.

Status: prototype for local use. It listens on 127.0.0.1 by default and requires a username/password login (server-side sessions); see docs/auth.md. Data is not per-user yet.

Requirements

  • Go 1.24+ (go.mod targets go 1.24 / toolchain go1.24.4, and every dependency is pinned to a version that builds with the locally installed Go 1.24.4)
  • No CGO (CGO_ENABLED=0 works)
  • GNU make (optional; the targets are thin wrappers around go commands)

Repository layout

Modelled on prometheus-operator: go.mod at the repo root, binaries under cmd/, packages under pkg/, a Makefile for common tasks, and documentation in its own folder. Everything runs from the repo root; no cd needed.

go.mod, go.sum   module github.com/nutmos/expensetrackr
Makefile         build / run / test / vet / fmt / clean
cmd/server/      the expense-server binary (main package)
pkg/             library packages (api, store, transaction, balance, category, user,
                 money, validate), pkg/web (embedded web page) and pkg/apidoc
                 (embedded OpenAPI spec + offline Swagger UI)
docs/            project documentation (non-code)
skills/          AI-agent skill (SKILL.md) for using the HTTP API
README.md
bin/, data/, server.log   local runtime files (git-ignored)

Import packages as github.com/nutmos/expensetrackr/pkg/. The web page lives in pkg/web (an embed package like any other), not a root web/ folder, so all Go code other than cmd/ lives under pkg/.

Run

cd /workspace/expense-service    # repo root
make run                         # build bin/expense-server, serve http://127.0.0.1:8080 with data/expenses.db

# the same without make
CGO_ENABLED=0 go build -o bin/expense-server ./cmd/server
./bin/expense-server -addr 127.0.0.1:8080 -db data/expenses.db

# or straight from source
go run ./cmd/server              # defaults: 127.0.0.1:8080, data/expenses.db

make run takes overrides: make run ADDR=127.0.0.1:9090 DB=/tmp/test.db. The default -db data/expenses.db is relative to the current directory, so run from the repo root.

Flag Env var Default Notes
-addr EXPENSE_ADDR 127.0.0.1:8080 Keep on 127.0.0.1: there is no auth (:8080 would expose it on all interfaces)
-db EXPENSE_DB data/expenses.db Created automatically (directory included)
Открыть полный README на GitHub

Рекомендуемые инструменты

Попробуйте другой запрос или уберите фильтр.

Установка

npx skillfish add nutmos/expensetrackr
Новичок в MCP? Начните с руководства на mcpskill.org →