feat: Implement subscription management and article saving features

- Added subscriptionPlan and subscriptionExpiresAt fields to UserProfile model.
- Enhanced profile routes to handle subscription state updates and expiration logic.
- Introduced email and password validation during user registration.
- Implemented link stripping for processed articles in the articles route.
- Added save article functionality with appropriate UI feedback in the frontend.
- Updated AccountSettings and FeedContent components to reflect subscription state and saved articles.
- Improved error handling and local storage management for user preferences.
This commit is contained in:
Nicolo-Salvafiorita
2026-05-07 11:56:14 +02:00
parent 249db76341
commit 54ae86a88a
18 changed files with 548 additions and 63 deletions
@@ -39,6 +39,13 @@ function RegisterPage({ onRegisterSuccess }: RegisterPageProps) {
// ignore parsing errors
}
// Basic email format validation on client
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
if (!emailRegex.test(String(email).toLowerCase())) {
setError('Formato email non valido.')
return
}
try {
await register({
email,