Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
68fb305
feat: add project documentation including MVP scope, user roles, matc…
ArchILLtect Oct 1, 2025
14a10d4
feat: implement authentication context, error handling, and user mana…
ArchILLtect Oct 1, 2025
870044c
feat: implement protected routes and user profile page; enhance API e…
ArchILLtect Oct 1, 2025
cbf3db8
feat: add Alert and FormField components; implement Login and Registe…
ArchILLtect Oct 1, 2025
6fa2683
feat(tests): add authentication form tests and configure testing envi…
ArchILLtect Oct 1, 2025
a5994f1
feat: enhance Login and Register components with loading state manage…
ArchILLtect Oct 1, 2025
b077510
feat: add authentication documentation including auth flow endpoints …
ArchILLtect Oct 2, 2025
147eef2
feat: update package-lock.json with new dependencies and versions; en…
ArchILLtect Oct 2, 2025
0df8260
feat: add RuntimeDebugPanel component for development diagnostics; en…
ArchILLtect Oct 2, 2025
b86f939
feat: enhance Home, Login, and Register components with improved user…
ArchILLtect Oct 2, 2025
9d52255
feat: add UserSummary component for displaying authenticated user inf…
ArchILLtect Oct 2, 2025
d50b9d8
feat: add Footer component for user logout functionality and site cre…
ArchILLtect Oct 2, 2025
804b060
feat: integrate Chakra UI for theming and styling
ArchILLtect Oct 2, 2025
0bb2be1
feat: update theme configuration for dark mode; add Things To Do (TTD…
ArchILLtect Oct 2, 2025
cddc391
feat: implement GlobalRouteTransition component for animated route tr…
ArchILLtect Oct 2, 2025
c934323
feat: add AuthForm component for user authentication; implement FormF…
ArchILLtect Oct 2, 2025
92c97d1
feat: enhance Login and Register components with AuthForm and Chakra …
ArchILLtect Oct 2, 2025
1cba330
feat: enhance Home and Me components with Chakra UI; implement health…
ArchILLtect Oct 2, 2025
9c9eb67
feat: refactor Footer and RuntimeDebugPanel components; remove unused…
ArchILLtect Oct 2, 2025
9fcffb2
feat: streamline frontend CI workflow and remove manual inputs
ArchILLtect Oct 2, 2025
0730429
chore: test husky
ArchILLtect Oct 3, 2025
dcded86
chore: husky test
ArchILLtect Oct 3, 2025
40c8f5e
chore: husky test
ArchILLtect Oct 3, 2025
2f7fa41
chore: husky test
ArchILLtect Oct 3, 2025
7599a7b
chore: move main project docs to new folder
ArchILLtect Oct 3, 2025
ee24dae
chore: add initial documentation for Week 3 and Week 4 plans, includi…
ArchILLtect Oct 3, 2025
c4d63ce
chore: update developer workflow checklist with completed setup steps…
ArchILLtect Oct 3, 2025
cc82543
chore: update coverage thresholds in vitest configuration
ArchILLtect Oct 3, 2025
8b9cd36
chore: add ESLint configuration file and ignore patterns
ArchILLtect Oct 3, 2025
dfb1fde
chore: add .gitattributes file to enforce LF line endings for husky s…
ArchILLtect Oct 3, 2025
2592f4f
chore: update package.json scripts and dependencies for improved lint…
ArchILLtect Oct 3, 2025
4e98e65
chore: add Husky hooks for commit message linting and pre-commit test…
ArchILLtect Oct 3, 2025
c14110d
chore: increase header max length to 150 characters in commitlint con…
ArchILLtect Oct 3, 2025
e4b35d4
refactor: improve type safety and code clarity in various components
ArchILLtect Oct 3, 2025
f6b48d1
docs: update README and TTD with enhanced developer workflow details …
ArchILLtect Oct 3, 2025
2a90668
feat(frontend): implement feature X to enhance user experience and op…
ArchILLtect Oct 3, 2025
1341e39
chore: update changelog to wrap up 0.1.0
ArchILLtect Oct 3, 2025
833391c
Update src/state/auth/auth-context.tsx
ArchILLtect Oct 3, 2025
2082fab
Update src/lib/api.ts
ArchILLtect Oct 3, 2025
ff35d06
Update vitest.config.ts
ArchILLtect Oct 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
build
coverage
node_modules
38 changes: 38 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = {
root: true,
env: { browser: true, es2021: true, node: true },
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: false, // set to tsconfig.json if you later need type-aware rules
ecmaFeatures: { jsx: true },
},
plugins: ["@typescript-eslint", "react", "react-hooks", "jsx-a11y"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
],
settings: {
react: { version: "detect" },
},
rules: {
// sensible defaults
"react/react-in-jsx-scope": "off", // Vite + React 17+ doesn’t need React in scope
"react/prop-types": "off", // we use TypeScript for types
"@typescript-eslint/explicit-module-boundary-types": "off",
// a11y nudges that are helpful in forms/links
"jsx-a11y/anchor-is-valid": "warn",
"jsx-a11y/no-autofocus": "warn",
},
ignorePatterns: [
"dist",
"build",
"node_modules",
"*.config.*",
"**/*.d.ts",
],
};
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# .gitattributes
.husky/** text eol=lf
*.sh text eol=lf
32 changes: 32 additions & 0 deletions .github/pull_request_template/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Pull Request

## Summary

Describe the change concisely.

## Type of Change

- [ ] Feature
- [ ] Fix
- [ ] Refactor
- [ ] Documentation
- [ ] Chore / Internal

## Changelog

- [ ] I added an entry under `[Unreleased]` in `CHANGELOG.md` (or this PR does not warrant a changelog line).

## Testing

Describe how you tested this (or include screenshots/logs if UI/behavioral change).

## Checklist

- [ ] Types pass (`npm run typecheck`)
- [ ] Lint passes (`npm run lint`)
- [ ] Tests pass (`npm test`)
- [ ] No unused exports / dead code introduced

## Follow-Up Tasks (Optional)

List any deferred work.
104 changes: 36 additions & 68 deletions .github/workflows/frontend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,7 @@ on:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
inputs:
node-version:
description: Node version
default: "20"
required: true
type: string
run-lint:
description: Run ESLint
default: true
type: boolean
run-typecheck:
description: Run TypeScript type check
default: true
type: boolean
run-tests:
description: Run unit tests (Vitest/Jest) with coverage if available
default: false
type: boolean
run-build:
description: Run production build
default: true
type: boolean
workflow_dispatch: {}

permissions:
contents: read
Expand All @@ -51,14 +29,13 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version || '20' }}
node-version: 20
cache: npm

- name: Install deps
run: npm ci

- name: Lint
if: ${{ inputs.run-lint != false }}
run: |
if npm run -s | grep -q "^ lint"; then
npm run lint -- --format github
Expand All @@ -67,29 +44,33 @@ jobs:
fi

- name: Typecheck
if: ${{ inputs.run-typecheck != false }}
run: |
if npm run -s | grep -q "^ typecheck"; then
npm run typecheck
else
npx tsc --noEmit
fi

- name: Tests (Vitest/Jest)
if: ${{ inputs.run-tests }}
- name: Tests (Vitest)
run: |
if npm run -s | grep -q "^ test"; then
npx vitest --run --coverage || npm test -- --run
npm run test
else
echo "No test script – skipping"
fi

- name: Changelog Check
run: |
if npm run -s | grep -q "changelog:check"; then
npm run changelog:check || (echo "\nChangelog check failed." && exit 1)
else
echo "No changelog:check script – skipping"
fi

- name: Build
if: ${{ inputs.run-build != false }}
run: npm run build

- name: Upload build artifact (dist/)
if: ${{ inputs.run-build != false }}
uses: actions/upload-artifact@v4
with:
name: web-dist
Expand All @@ -98,7 +79,6 @@ jobs:
retention-days: 7

- name: Upload coverage (if generated)
if: ${{ inputs.run-tests }}
uses: actions/upload-artifact@v4
with:
name: coverage
Expand All @@ -107,39 +87,27 @@ jobs:
coverage/**/*
if-no-files-found: ignore
retention-days: 7

# netlify-deploy:
# name: Netlify deploy
# needs: build-test
# runs-on: ubuntu-latest
# if: >
# (github.event_name == 'pull_request') ||
# (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main')
# steps:
# - name: Download build artifact
# uses: actions/download-artifact@v4
# with:
# name: web-dist
# path: dist
#
# - name: Install Netlify CLI
# run: npm i -g netlify-cli
#
# - name: Deploy preview (PR) or prod (manual on main)
# env:
# NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
# NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
# run: |
# if [ "${{ github.event_name }}" = "pull_request" ]; then
# netlify deploy \
# --dir=dist \
# --site="$NETLIFY_SITE_ID" \
# --auth="$NETLIFY_AUTH_TOKEN" \
# --message "PR #${{ github.event.pull_request.number }}" \
# --draft --json
# else
# netlify deploy \
# --dir=dist \
# --site="$NETLIFY_SITE_ID" \
# --auth="$NETLIFY_AUTH_TOKEN" \
# --prod --message "manual main" --json
# name: web-dist
# path: dist
#
# - name: Install Netlify CLI
# run: npm i -g netlify-cli
#
# - name: Deploy preview (PR) or prod (manual on main)
# env:
# NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
# NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
# run: |
# if [ "${{ github.event_name }}" = "pull_request" ]; then
# netlify deploy \
# --dir=dist \
# --site="$NETLIFY_SITE_ID" \
# --auth="$NETLIFY_AUTH_TOKEN" \
# --message "PR #${{ github.event.pull_request.number }}" \
# --draft --json
# else
# netlify deploy \
# --dir=dist \
# --site="$NETLIFY_SITE_ID" \
# --auth="$NETLIFY_AUTH_TOKEN" \
# --prod --message "manual main" --json
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ dist-ssr
# local env
.env
.env.*
!.env.example
!.env.example

# Agent Reports
agent-reports
2 changes: 2 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
npx --no-install commitlint --edit "$1"
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm test
87 changes: 87 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Changelog

All notable changes to this project will be documented in this file.

Format loosely follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and (once stabilized) will align with [Semantic Versioning](https://semver.org/) for tagged releases.

## [Unreleased]

### Added
- Nothing yet.

### Changed
- Nothing yet.

### Fixed
- Nothing yet.

### Documentation
- Nothing yet.

### Internal
- Nothing yet.

### Notes
- Nothing yet.

## [0.1.0] - 2025-10-02

> Initial structured milestone capturing Week 3 outcomes (auth + UI/UX + tooling baseline).

### Added
- Auth pages: Login, Register, Me (protected) with Chakra-based forms.
- Central `AuthProvider` with single guarded bootstrap (`/api/me`).
- Error mapping layer (`errors.ts`) with friendly codes (BAD_CREDENTIALS, EMAIL_EXISTS, etc.).
- User normalization (role→roles[], displayName inference).
- ProtectedRoute gating + framer-motion route/state transitions.
- Health check card with interval polling, skeleton debounce, manual refresh.
- Runtime Debug Panel (collapsible, probe history, copy helpers, error count, reduced-motion respect).
- Chakra theme (dark mode default), selective component integration (Cards, Alerts, Buttons, Badges).
- Sticky footer with version + commit hash + feedback link.
- Environment variable typings (`vite-env.d.ts`).
- Release automation script (`scripts/release.mjs`).
- Changelog enforcement script (`scripts/check-changelog.mjs`).
- Husky integration & commitlint hook enforcement.
- Conventional commit rules (`commitlint.config.cjs`).
- Vitest coverage thresholds (50%).
- Developer Workflow Checklist (`docs/developer-workflow-checklist.md`).
- Coverage & workflow docs surfaced in README / architecture.
- CI enhancements (tests default, coverage gate, changelog step, ordered pipeline).

### Changed
- Layout refactored to full-height flex shell (`AppShell`) with sticky footer.
- Forms migrated from basic HTML to Chakra primitives with inline validation.
- Me page enhanced (avatar placeholder, role badges, grouped sections).
- `README.md`: workflow, coverage threshold, release script, Husky/commitlint details, expanded scripts table.
- `docs/architecture.md`: CI pipeline order clarity, tooling extension point, release automation details.
- `TTD.md`: Expanded workflow/tooling backlog (test guard, auto-labeling, feature test heuristics).

### Documentation
- README: Auth lifecycle, runtime debug panel, planning artifacts.
- `architecture.md`: Auth lifecycle, transitions, planning references.
- Week 3 progress checklist (percent metrics & blockers).
- Week 4 draft plan scaffold.
- Developer workflow appendix (git hooks, commit message enforcement) & planning/workflow links.

### Internal / Tooling / Dev Experience
- Structured fetch wrapper (`api.ts`) with typed generics and error cause propagation.
- Optional verbose auth bootstrap logging via `VITE_DEBUG_AUTH*` flags.
- ESLint configuration tightened (import sorting / a11y plugins; explicit `lint` / `lint:fix`).
- Standardized test invocation (`npm run test`) for coverage gating.
- Added `release`, `changelog:check`, and `lint:fix` scripts to `package.json`.
- Implemented `prepare` script for automatic Husky hook install.

### Notes
- Testing breadth still partial (protected route + basic form validation only).
- Next minor release (`0.2.0`) will focus on auth test gap closure + first resilience enhancement (pause-on-error health polling or reduced-motion toggle).
- Patch release pathway (`0.1.x`) available if urgent fixes needed.

---

Guidelines:

- Start new entries under [Unreleased]; move them into a dated version section when cutting a release (and optionally tagging in git).
- Group changes under: Added / Changed / Fixed / Removed / Deprecated / Security / Docs / Internal as needed.

[Unreleased]: https://github.com/sameboat-platform/frontend/compare/0.1.0...HEAD
[0.1.0]: https://github.com/sameboat-platform/frontend/tree/0.1.0
Loading