Changelog

v0.4.0

Better Auth Integration (Major Overhaul)
- Fully migrated the underlying authentication architecture from the legacy setup to **Better Auth**.
- **Magic Links**: Implemented robust passwordless login using Magic Links for both onboarding and returning users.
- **D1 Database Persistence**: Integrated Cloudflare D1 with the Better Auth adapter, ensuring lightning-fast edge database reads and writes.
- **Session Management**: Rebuilt session handling across Astro Server Side Rendering (SSR) pages and the client-side SPA.

Enhanced Security
- **Secure Password Handoff**: Removed the `setup_pass` query parameter from the registration Magic Link URLs. Temporary dummy passwords are now strictly handled via the browser's secure `localStorage`, eliminating the risk of passwords being logged in server access logs or email histories.
- **Strict Password Validation**: Added a new "Confirm Password" validation step in both the standalone Reset Password pages and the Profile Settings view inside the app. You must now type your new password twice, preventing accidental typos from locking you out.

Internationalization (i18n)
- Delivered completely separate and localized Astro entrypoints for English and German.
- Created `de/login`, `de/register`, and `de/onboarding` routes matching the standard English versions, ensuring a native experience for DACH users.
- Full English and German (`de`) translation coverage for all new password validation error states and UI elements.

UI/UX Enhancements
- **Dark Mode First**: Polished all authentication screens (Login, Register, Onboarding, Reset Password) to follow a sleek, modern dark mode design with glassmorphism elements.
- **Micro-Animations**: Added subtle CSS transition states to input fields and buttons.
- **Responsive Layouts**: Ensured forms and error messages span 100% width on mobile viewports for maximum touch ergonomics.

Performance & Infrastructure
- Migrated static routing builds to Astro `v5.0` features for faster compilation.
- Consolidated Cloudflare bindings (`.dev.vars`) to improve the local testing workflow.
- **Dynamic Routing**: The application now seamlessly detects if it's running on a preview environment (e.g., `dev.smartwirestudio.pages.dev`) or production and routes authentication requests accordingly without manual URL hardcoding.
- **Email Delivery Resilience**: Magic Links and Reset Password emails will now dynamically adapt their `From` address based on the deployment environment. It will strictly use `[email protected]` on production and preview branches (provided the domain is verified in Resend).