Feature/plan 1 foundation#1
Merged
Merged
Conversation
Captures the agreed shoplit v1 design after brainstorming:
- creator accounts (Google + phone OTP); viewers stay anonymous
- two link types: /c/{slug} cart pages and /p/{slug} single-product redirects
- live carts (URL always reflects latest)
- all outbound clicks redirected through shoplit with affiliate tag injected
- three deployable units: shoplit-api, shoplit-redirect, shoplit-web
- Postgres schema, Redis caching, click drain worker
- MVP scope only; social/discovery/wishlist/reviews deferred to v2
17 bite-sized tasks: bootstrap the go module, schema migrations, postgres + redis wiring, both shoplit-api and shoplit-redirect binaries with /health, golangci-lint and github actions ci. Outcome of plan 1: deployable empty skeletons. Auth and business logic live in subsequent plans (2: auth, 3: carts, 4: redirect, 5: frontend + deploy).
Fix .gitignore binary patterns to use rooted paths (/shoplit-api, /shoplit-redirect) so the cmd/shoplit-api source directory is not inadvertently ignored.
- Add .golangci.yml with govet, errcheck, staticcheck, unused, ineffassign, gosimple, gofmt, goimports, misspell; errcheck excluded in _test.go files - Add .github/workflows/ci.yml with test and lint jobs - Bump golangci-lint to v1.64.8 (v1.59.1 incompatible with Go 1.26.2) - Remove deprecated middleware.RealIP from both binaries (SA1019 / GHSA spoofing)
All direct imports (chi, pgx, testify, testcontainers, etc.) were incorrectly marked // indirect in go.mod; tidy promotes them and adds the missing go.sum hashes required by the Go toolchain.
- CI: bump go-version to 1.26 to match go.mod toolchain - config: remove `required` tag from DBDSNReadOnly so shoplit-api can start without it; shoplit-redirect now validates the DSN itself - Makefile: bump MIGRATE_VERSION to v4.19.1 to match the runtime lib - config_test: use t.Setenv (auto-restoring) instead of os.Unsetenv to avoid leaking unset env vars into adjacent tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.