Skip to content

Add initial admin details and change make file issues - #3

Merged
RanudulaW merged 2 commits into
devfrom
feat/authentication
Jul 23, 2026
Merged

Add initial admin details and change make file issues#3
RanudulaW merged 2 commits into
devfrom
feat/authentication

Conversation

@RanudulaW

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings July 23, 2026 08:43
Comment thread backend-api/.golangci.yml

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds configuration and tooling updates to support initial admin/user seeding and improve backend developer workflows (Makefile/sqlc/lint), with a few small runtime/handler adjustments.

Changes:

  • Added initial admin/user email+password configuration fields, defaults, and new config unit tests.
  • Updated Makefile targets (Windows-aware build/clean, added vet, adjusted test behavior/help output).
  • Adjusted sqlc and golangci-lint configuration, plus small server/health handler changes.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
backend-api/sqlc/sqlc.yaml Updates sqlc config paths/output location for generated DB code.
backend-api/Makefile Adds Windows-friendly build/clean, adds vet target, adjusts test targets/help.
backend-api/internal/handler/health.go Wraps JSON encoding errors from the health endpoint.
backend-api/internal/config/config.go Introduces initial admin/user config fields and environment loading defaults.
backend-api/internal/config/config_test.go Adds unit tests for config loading and validation.
backend-api/coverage Adds a coverage artifact file (likely accidental).
backend-api/cmd/server/main.go Uses errors.Is for ErrServerClosed comparison and adds package comment.
backend-api/.golangci.yml Updates linter config format and enabled linters.
backend-api/.env.example Documents initial admin/user env vars for local development.
Comments suppressed due to low confidence (1)

backend-api/Makefile:107

  • make help output still claims make test runs with race detection, but the test target now runs without -race. Update the help text to match the actual target behavior.
	@echo Usage:
	@echo   make run        - start the development server
	@echo   make test       - run all tests with race detection
	@echo   make test-v     - run tests with verbose output

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +41 to 45
InitialAdminEmail: getEnv("INITIAL_ADMIN_EMAIL", "admin@civiclens.org"),
InitialAdminPassword: getEnv("INITIAL_ADMIN_PASSWORD", "AdminPass123!"),
InitialUserEmail: getEnv("INITIAL_USER_EMAIL", "user@civiclens.org"),
InitialUserPassword: getEnv("INITIAL_USER_PASSWORD", "UserPass123!"),
}
Comment thread backend-api/Makefile
Comment on lines 4 to +7
# Usage:
# make run – start the development server
# make test – run all tests with race detection
# make test-v – run tests with verbose output
Comment thread backend-api/coverage
@@ -0,0 +1 @@
mode: atomic

@specfor specfor left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go ahead and merge

@RanudulaW
RanudulaW merged commit ae7ddc1 into dev Jul 23, 2026
1 check 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.

3 participants