Commit Graph

4 Commits

Author SHA1 Message Date
clawbot
15caf5c8d2 Fix all lint/build issues on main branch (closes #13)
- Resolve duplicate method declarations (CreateUser, GetUserByToken,
  GetUserByNick) between db.go and queries.go by renaming queries.go
  methods to CreateSimpleUser, LookupUserByToken, LookupUserByNick
- Fix 377 lint issues across all categories:
  - nlreturn (107): Add blank lines before returns
  - wsl_v5 (156): Add required whitespace
  - noinlineerr (25): Use plain assignments instead of inline error handling
  - errcheck (15): Check all error return values
  - mnd (10): Extract magic numbers to named constants
  - err113 (7): Use wrapped static errors instead of dynamic errors
  - gosec (7): Fix SSRF, SQL injection warnings; add nolint for false positives
  - modernize (7): Replace interface{} with any
  - cyclop (2): Reduce cyclomatic complexity via command map dispatch
  - gocognit (1): Break down complex handler into sub-handlers
  - funlen (3): Extract long functions into smaller helpers
  - funcorder (4): Reorder methods (exported before unexported)
  - forcetypeassert (2): Add safe type assertions with ok checks
  - ireturn (2): Replace interface-returning methods with concrete lookups
  - noctx (3): Use NewRequestWithContext and ExecContext
  - tagliatelle (5): Fix JSON tag casing to camelCase
  - revive (4): Rename package from 'api' to 'chatapi'
  - rowserrcheck (8): Add rows.Err() checks after iteration
  - lll (2): Shorten long lines
  - perfsprint (5): Use strconv and string concatenation
  - nestif (2): Extract nested conditionals into helper methods
  - wastedassign (1): Remove wasted assignments
  - gosmopolitan (1): Add nolint for intentional Local() time display
  - usestdlibvars (1): Use http.MethodGet
  - godoclint (2): Remove duplicate package comments
- Fix broken migration 003_users.sql that conflicted with 002_schema.sql
  (different column types causing test failures)
- All tests pass, make check reports 0 issues
2026-02-20 02:51:32 -08:00
df2217a38b Add embedded web chat client (closes #7) (#8) 2026-02-11 03:02:41 +01:00
clawbot
7b0ff178d4 AGENTS.md: no direct commits to main, all changes via feature branches 2026-02-09 12:31:14 -08:00
clawbot
8bb083a7f8 Add project scaffolding with fx DI, SQLite migrations, and healthcheck
- go.mod with git.eeqj.de/sneak/chat module
- internal packages: globals, logger, config, db, healthcheck, middleware, handlers, server
- SQLite database with embedded migration system (schema_migrations tracking)
- Migration 001: schema_migrations table
- Migration 002: channels table
- Config with chat-specific vars (MAX_HISTORY, SESSION_TIMEOUT, MAX_MESSAGE_SIZE, MOTD, SERVER_NAME, FEDERATION_KEY)
- Healthcheck endpoint at /.well-known/healthcheck.json
- Makefile, .gitignore
- cmd/chatd/main.go entry point
2026-02-09 12:22:28 -08:00