[BTAPI-43] Dependency and repo cleanup + add /health endpoint #1

Open
chris wants to merge 6 commits from feature/BTAPI-43 into main
Owner

Ticket

BTAPI-43 — Dependency and repo cleanup + add /health endpoint

Summary

  • Prune unused server deps: imap, mailparser, uuid (code uses node-imap / mailparser-mit), plus nodemon and @types/imap dev-deps; drop the trustedDependencies array (its only entry nodemailer isn't a dependency).
  • Error handler now detects err instanceof z.ZodError (zod is a real dependency now) and the stale "zod is not yet a dependency" comment is refreshed. Test updated to throw a real ZodError.
  • Drop sourceMap: true from server/tsconfig.json — Bun runs the TS directly and tsc is --noEmit, so it only produced stray .js.map files.
  • Add a cheap GET /health liveness endpoint (no Mongo, no auth) plus a docker-compose api healthcheck that hits it via bun's fetch (the oven/bun image ships no curl).

Not touched: the legacy in-source server/db/ Mongo data is already gitignored and superseded by the db-data Docker volume — left in place since deleting on-disk data is destructive.

Verification: bun --cwd=./server run type-check clean; bun --cwd=./server test green (135/135).

## Ticket [BTAPI-43](http://192.168.2.100:7123/home/browse/BTAPI-43/) — Dependency and repo cleanup + add /health endpoint ## Summary - Prune unused server deps: `imap`, `mailparser`, `uuid` (code uses `node-imap` / `mailparser-mit`), plus `nodemon` and `@types/imap` dev-deps; drop the `trustedDependencies` array (its only entry `nodemailer` isn't a dependency). - Error handler now detects `err instanceof z.ZodError` (zod is a real dependency now) and the stale "zod is not yet a dependency" comment is refreshed. Test updated to throw a real `ZodError`. - Drop `sourceMap: true` from `server/tsconfig.json` — Bun runs the TS directly and `tsc` is `--noEmit`, so it only produced stray `.js.map` files. - Add a cheap `GET /health` liveness endpoint (no Mongo, no auth) plus a docker-compose `api` healthcheck that hits it via bun's `fetch` (the `oven/bun` image ships no curl). Not touched: the legacy in-source `server/db/` Mongo data is already gitignored and superseded by the `db-data` Docker volume — left in place since deleting on-disk data is destructive. Verification: `bun --cwd=./server run type-check` clean; `bun --cwd=./server test` green (135/135).
Enable SSH transport for the origin remote in the dev container
Some checks failed
server / check (pull_request) Has been cancelled
341534f615
Add openssh-client to Dockerfile.dev and mount the host's ~/.ssh
read-only into the dev service so the SSH origin remote
(ssh://git@git.chrisharrington.me:2222/...) works without minting a
container-specific key.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Update Dockerfile to allow for NAME:
Some checks are pending
server / check (pull_request) Waiting to run
7ee1a06cf6
tea - command line tool to interact with Gitea

USAGE:
   tea [global options] [command [command options]]

VERSION:
   Version: 0.14.1  golang: 1.26.3  go-sdk: v0.25.1

DESCRIPTION:
   tea is a productivity helper for Gitea. It can be used to manage most entities on
   one or multiple Gitea instances & provides local helpers like 'tea pr checkout'.

   tea tries to make use of context provided by the repository in $PWD if available.
   tea works best in a upstream/fork workflow, when the local main branch tracks the
   upstream repo. tea assumes that local git state is published on the remote before
   doing operations with tea.    Configuration is persisted in $XDG_CONFIG_HOME/tea.

COMMANDS:
   help, h  Shows a list of commands or help for one command

   ENTITIES:
     issues, issue, i                  List, create and update issues
     pulls, pull, pr                   Manage and checkout pull requests
     labels, label                     Manage issue labels
     milestones, milestone, ms         List and create milestones
     releases, release, r              Manage releases
     times, time, t                    Operate on tracked times of a repository's issues & pulls
     organizations, organization, org  List, create, delete organizations
     repos, repo                       Manage repositories
     branches, branch, b               Consult branches
     actions, action                   Manage repository actions
     webhooks, webhook, hooks, hook    Manage webhooks
     comment, c                        Add a comment to an issue / pr

   HELPERS:
     open, o                         Open something of the repository in web browser
     notifications, notification, n  Show notifications
     clone, C                        Clone a repository locally
     api                             Make an authenticated API request

   MISCELLANEOUS:
     whoami    Show current logged in user
     admin, a  Operations requiring admin access on the Gitea instance

   SETUP:
     logins, login      Log in to a Gitea server
     logout             Log out from a Gitea server
     ssh-keys, ssh-key  Manage SSH public keys

GLOBAL OPTIONS:
   --debug, --vvv  Enable debug mode
   --help, -h      show help
   --version, -v   print the version installation.
Some checks are pending
server / check (pull_request) Waiting to run
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature/BTAPI-43:feature/BTAPI-43
git switch feature/BTAPI-43

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff feature/BTAPI-43
git switch feature/BTAPI-43
git rebase main
git switch main
git merge --ff-only feature/BTAPI-43
git switch feature/BTAPI-43
git rebase main
git switch main
git merge --no-ff feature/BTAPI-43
git switch main
git merge --squash feature/BTAPI-43
git switch main
git merge --ff-only feature/BTAPI-43
git switch main
git merge feature/BTAPI-43
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
chris/budget-tracker!1
No description provided.