Skip to content

Release 0.0.2

Choose a tag to compare

@github-actions github-actions released this 20 Feb 05:18
· 222 commits to master since this release
5972f1f

Summary

Builds on the initial scaffold by adding user authentication (login & register), a protected dashboard, session management, database migrations, and a suite of tests — plus Docker and CI/CD improvements.
Changes
Auth & Routing

Add login and register endpoints with redirect to dashboard on success
Add authMiddleware for protected routes and resolveUserMiddleware for page handlers
Add APP_ENV validator restricted to dev, production, and test
Refactor routes into api, auth, pages, and routes packages

Dashboard & Sessions

Add dashboard page with active sessions view and user_agent tracking
Add session goroutine cleanup
Add username icon to header via getUserName

Database

Add migrations and Migrate helper for the database
Refactor database layer to use DBConfig; update server, routes, and tests accordingly

Validation

Add input validator for RegisterInput with TestValidationMessage

SEO & Static

Add sitemap.xml, robots.txt, and SEOMeta to the header

Frontend & Infrastructure

Fix Docker: copy frontend-template static files into the production image
Update Air and Docker Compose to mount tmp volume and properly install Tailwind
Add GIN_MODE environment variable
Add Go formatter to Makefile and reformat all files
Update CI/CD with sqlc generation; add lint, vet, sqlc, and goose steps
Cache Go modules in CI

Tests

Add TestRegisterPageHandler, TestRegisterHandler, TestContactPageHandler
Add formatted route tests and unknown-route test
Update route tests to cover login/register redirect and new dashboard handler

Changelog

  • 60c88d6 Add: APP_ENV validator to 3 values dev, production, test; Add: Redirect to dashboard for login and register; Add: authMiddleware for protected routes; Add: Page dashboard; Update: Routes test to test redirect of login and register handlers; Add: Routes test with new dashboard page handler test;
  • a4dfe5e Add: ContactPageHandler test, Test unknown route
  • 01559d9 Add: migrations, add Migrate for db; Update: CI/CD with sqlc generation
  • ed8957e Create LICENSE
  • 291f3e9 Fix Docker: copy frontend-template static files to prod image
  • 61a9cde Merge pull request #10 from PhuNguyenPT/phunpt
  • 1b25d7b Merge pull request #11 from PhuNguyenPT/phunpt
  • d081a3d Merge pull request #12 from PhuNguyenPT/phunpt
  • 30b8ae4 Merge pull request #13 from PhuNguyenPT/phunpt
  • 83f7bf8 Merge pull request #15 from PhuNguyenPT:phunpt
  • 214aff7 Merge pull request #16 from PhuNguyenPT/phunpt
  • e85f75a Merge pull request #17 from PhuNguyenPT:phunpt
  • 3ff027e Merge pull request #18 from PhuNguyenPT:phunpt
  • 7f4dba1 Merge pull request #19 from PhuNguyenPT:phunpt
  • e06d53e Merge pull request #20 from PhuNguyenPT:phunpt
  • eedbaa9 Merge pull request #21 from PhuNguyenPT:phunpt
  • 76f6cfd Merge pull request #22 from PhuNguyenPT:phunpt
  • e4039f2 Merge pull request #23 from PhuNguyenPT:phunpt
  • f91067b Merge pull request #24 from PhuNguyenPT:phunpt
  • 08ea5fc Merge pull request #25 from PhuNguyenPT:phunpt
  • 5972f1f Merge pull request #26 from PhuNguyenPT:phunpt
  • e39c9e4 Merge pull request #7 from PhuNguyenPT/PhuNguyenPT-patch-1
  • e4da20d Merge pull request #8 from PhuNguyenPT:phunpt
  • b331129 Merge pull request #9 from PhuNguyenPT/phunpt
  • ba794cf Refactor: database to use DBConfig, update tests, routes and server to use Config
  • 9986919 add GIN_MODE
  • 4162480 add Status and Header for homePageHandler
  • 67ffe15 add TestRegisterPageHandler, add TestRegisterHandler, update air docker
  • a258f08 add active sessions, update dashboard, add user_agent to session
  • cbf83db add cache go modules
  • a161d39 add config test
  • 4663de6 add docker watch, add register endpoint
  • a811658 add formatted route test
  • 1fdd6b7 add lint, vet, sqlc, goose
  • 428d8be add login endpoint, add login test, update air docker toml
  • def0353 add session goroutine cleanup
  • 3ef0079 add username icon to header, add resolveUserMiddleware, add getUserName to PageHandler
  • 37309f3 add validator for RegisterInput, add TestValidationMessage
  • 53fbf3a add validator to go mod, update routes test and remove HelloworldHandler in routes
  • 8b67159 add: go formatter to make file, update: formatting files
  • 18feedb feature: Add sitemap.xml
  • cf0765b feature: add SEOMeta for Header
  • 70477de feature: add robots.txt
  • 7cacb47 fix missing err check
  • 04acd8c fix return status to OK 200 in route test for TestRegisterHandler
  • f364ad0 refactor routes into api, auth, pages, routes
  • 94a7f7f remove unused css
  • ac4cfe4 test pre-commit hook
  • 2df5e12 tidy go.mod
  • 471a539 update air and docker compose to mount volume tmp
  • f3ebf6d update air docker toml, docker compose and dockerfile to properly install tailwind
  • 13f07dd update air docker toml, update makefile and dockerfile for dev and prod
  • 9fc40bb update deprecated zip to tar.gz for gorelease.yml, update readme
  • b5a66d3 update docker file and make file with local and docker environment go command
  • 270ffa0 update go test ci
  • 050394c update makefile to remove v1 docker compose
  • 5dd1f00 update node engines version to 24.13.1
  • c13588f update test, db, server, routes