{"id":35663991,"url":"https://github.com/madalinpopa/gocost-web","last_synced_at":"2026-01-30T22:13:59.946Z","repository":{"id":332411097,"uuid":"1128397056","full_name":"madalinpopa/gocost-web","owner":"madalinpopa","description":"The anti-subscription expense tracker. Self-hosted. Open source. brutally simple.","archived":false,"fork":false,"pushed_at":"2026-01-26T22:00:41.000Z","size":1403,"stargazers_count":38,"open_issues_count":2,"forks_count":4,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-27T08:53:46.232Z","etag":null,"topics":["alpinejs","expense-tracker","go","htmx","webapp"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/madalinpopa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-01-05T15:20:54.000Z","updated_at":"2026-01-27T05:07:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/madalinpopa/gocost-web","commit_stats":null,"previous_names":["madalinpopa/gocost-web"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/madalinpopa/gocost-web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madalinpopa%2Fgocost-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madalinpopa%2Fgocost-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madalinpopa%2Fgocost-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madalinpopa%2Fgocost-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/madalinpopa","download_url":"https://codeload.github.com/madalinpopa/gocost-web/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madalinpopa%2Fgocost-web/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28920788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T20:25:28.696Z","status":"ssl_error","status_checked_at":"2026-01-30T20:25:13.426Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpinejs","expense-tracker","go","htmx","webapp"],"created_at":"2026-01-05T17:15:23.161Z","updated_at":"2026-01-30T22:13:59.942Z","avatar_url":"https://github.com/madalinpopa.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gocost-web\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/madalinpopa/gocost-web)\n\nGolang-based web application for personal expense management, focused on a clean monthly workflow and intuitive tracking of recurring and non-recurring costs.\n\nLive demo: [cost.coderustle.ro](https://cost.coderustle.ro)\nUser: `admin@gocost.ro`, Password: `secret123`\n\n## Screenshots\n\n![Dashboard](./docs/images/desktop-dark.png)\n\n## Overview\n\n### Typical Workflow\n- **Pick a month**: Move between months to review past spending or plan upcoming costs.\n- **Create Groups**: Create groups (e.g., Housing, Transportation) to organize your expenses.\n- **Set up Categories**: Inside each group, create categories (e.g., Rent, Groceries). Define a budget for the category and choose if it is recurrent or for the current month only.\n- **Record Expenses**: Add specific expenses to a category (e.g., \"Weekly Shop\"). Mark them as paid or unpaid to track cash flow.\n- **Review Status**: Visually track spending against your category budgets and see what's left to pay.\n\n### Core Features\n- **Category Management**: Organize expenses into groups (e.g., Housing, Transportation).\n- **Flexible Category Types**:\n    - **This month only**: applies only to the currently selected month.\n    - **Recurrent**: persists across months until a specified end date (or indefinitely).\n\n## Recording Expenses\n\nFor each expense category, the user can record expenses by providing:\n\n- an **amount**, and\n- a **payment status** (paid or unpaid).\n\nThe payment status is visually reflected in the category so the user can immediately see which expenses are settled and which are pending.\n\n## User Experience Goals\n\n- Intuitive navigation centered on monthly context.\n- Clear grouping of categories and expenses.\n- Efficient handling of both recurring and non-recurring costs.\n\n## Technical Details\n\n- **Backend:** Go (1.25+), `net/http`, `a-h/templ` for server-side UI rendering.\n- **Frontend:** Tailwind CSS, HTMX for server-driven updates, Alpine.js for lightweight client state.\n- **Data:** SQLite database with migrations managed by `goose`.\n- **Configuration:** Environment-driven configuration via `.envrc` (generated from `envrc.template`).\n- **Tooling:** `make` targets for build/dev/test; `air` for live reload.\n\n## Environment Variables\n\nRequired:\n- `ALLOWED_HOSTS`: comma-separated list of allowed hostnames (e.g. `localhost,example.com`).\n- `DOMAIN`: base domain for the app (e.g. `localhost` or `gocost.example`).\n\nOptional:\n- `CURRENCY`: symbol shown in the UI (default: `$`).\n- `DB_PATH`: SQLite file path used by the Docker entrypoint (default: `/app/data/data.sqlite`).\n- `VERSION`: Docker image tag used by `compose.yml` (default: `latest`).\n- `GOOSE_DRIVER`, `GOOSE_DBSTRING`, `GOOSE_MIGRATION_DIR`: used by `goose` during development (see `envrc.template`).\n\n### Project Structure\n\n- `cmd/web`: web server entry point.\n- `internal/domain`: core business entities.\n- `internal/usecase`: application use cases and interfaces.\n- `internal/interfaces`: HTTP handlers, routing, and web adapters.\n- `internal/infrastructure`: configuration and storage implementations.\n- `ui`: Templ components and static assets.\n- `migrations`: SQL migration files.\n\n## Run Locally with Docker\n\nUse the provided `Dockerfile` and `compose.yml` to build and run the app locally.\n\n### Using Docker Compose\n\n```bash\n# build the image for local use\ndocker build -t ghcr.io/madalinpopa/gocost-web:local .\n\n# create the external network used by compose (safe if it already exists)\ndocker network create public\n\n# start the app on http://localhost:4000\nVERSION=local docker compose up\n```\n\nOptional environment overrides (set before `docker compose up`):\n`ALLOWED_HOSTS`, `DOMAIN`, `CURRENCY`.\n\n### Using Docker Run\n\nTo run the container without Docker Compose:\n\n```bash\n# build the image\ndocker build -t ghcr.io/madalinpopa/gocost-web:local .\n\n# run the container\ndocker run -d \\\n  --name gocost \\\n  -p 4000:4000 \\\n  -e ALLOWED_HOSTS=localhost \\\n  -e DOMAIN=localhost \\\n  -v gocost_data:/app/data \\\n  ghcr.io/madalinpopa/gocost-web:local\n```\n\n## Development\n\n### Prerequisites\n\n- Go 1.25+\n- Node.js + npm (Tailwind CLI)\n- Optional: `direnv` and 1Password CLI (`op`) for `.envrc` generation\n\n### Common Commands\n\n- `make init`: download deps, generate Templ, install npm packages, create `.envrc`.\n- `make dev`: run server + Templ + Tailwind watchers with live reload.\n- `make build/web`: build the web server binary to `bin/server`.\n- `make test`: run Go tests under `./internal...`.\n- `make test/race`: run race detector tests.\n- `make check`: run `go vet` and `staticcheck`.\n\n## Contributing\n\nContributions are welcome. Please follow these steps:\n\n1. Fork the repository and create a feature branch.\n2. Keep changes focused and follow the existing project layout.\n3. Run `make test` (and `make check` if you have `staticcheck`) before opening a PR.\n4. If you change `.templ` files or CSS, ensure generated files are up to date.\n5. Open a pull request with a clear description of the change.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadalinpopa%2Fgocost-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadalinpopa%2Fgocost-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadalinpopa%2Fgocost-web/lists"}