Skip to content

Development#1

Merged
fiqrikm18 merged 89 commits into
masterfrom
development
Jul 13, 2026
Merged

Development#1
fiqrikm18 merged 89 commits into
masterfrom
development

Conversation

@fiqrikm18

Copy link
Copy Markdown
Contributor

No description provided.

fiqrikm18 added 30 commits July 9, 2026 09:24
fiqrikm18 added 28 commits July 12, 2026 07:13
…er normalization

- Add toggleable multi-tenancy via TenantConfig with JWT/header/subdomain resolution
- Add TenantResolver middleware that resolves tenant from JWT → X-Tenant-ID → subdomain
- Add TenantID to JWT claims, stored in context by auth middleware
- Create tenant management module with CRUD endpoints at /api/v1/admin/tenants
- Create migrations: tenants table (007), user normalization (008), tenant_id columns (009)
- Refactor auth persistence to use normalized tables (user_credentials, user_security, user_tokens)
- Refactor user/todo/authz repositories to use raw SQL with tenant_id filtering
- Add tenantfilter helper package for conditional row-level isolation
- Add TenantID to audit/error log structs and raw SQL inserts
- Clean up unused sqlc generated files
- Add sqlc entry for tenant in sqlc.yaml
- Create queries.sql and generate sqlc code
- Rewrite tenant_repository.go to use sqlc types and helpers
- Fix authorization repositories for regenerated sqlc types (Row types differ from base types after schema changes)
- Remove auditlog entry from sqlc.yaml (no longer uses generated code)
- Update auth and user queries.sql to match current schema
…ning

- Casbin: custom persist.Adapter backed by casbin_rule table, sync from RBAC
- Cursor pagination: bidirectional cursor across all domains, replaces offset/limit
- sqlc: user/todo CRUD migrated to sqlc, dynamic filters stay raw SQL
- Error hardening: env-aware 500 with stacktrace, all errors persisted to error_logs
- LIKE escaping: escape % and _ in todo search input
- Fix: ErrorRecorder nil logger bug
…tion

- .golangci.yml: add go 1.24 version override, replace deprecated govet.check-shadowing with shadow linter
- .github/workflows/ci.yml: bump GO_VERSION from 1.22 to 1.25, add sqlc generate and swag init steps to lint/test/build jobs
- Generated missing sqlc and swagger output files
Pre-built golangci-lint v1.64.8 was compiled with Go 1.24 and
cannot type-check Go 1.25 code. Switch from the action's
pre-built binary to 'go install', which compiles golangci-lint
with the Go 1.25 toolchain already set up by actions/setup-go.
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
6.4% Duplication on New Code (required ≤ 3%)
C Security Rating on New Code (required ≥ A)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

💡 Need a hand with PR review? Try Gitar by Sonar!

@fiqrikm18
fiqrikm18 merged commit 5475110 into master Jul 13, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant