-
Notifications
You must be signed in to change notification settings - Fork 0
(FEAT #4) Login + Register + Forgot password #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
- Remove nginx and use standard ports for Coolify deployment - Optimize Angular frontend for production deployment - Fix Coolify deployment 503 errors - configure for production domains - Fix deployment health issues and add health check endpoint - Remove nginx service and configuration files completely - Fix port conflicts in Dockerfiles for Coolify deployment - Remove external PostgreSQL port to fix deployment conflicts - Change frontend external port to 4000 to avoid conflicts - Fix PostgreSQL health check to work with environment variables - Remove health check dependency and add random credential generation - Revert health check dependency changes - Add default values for environment variables - Force rebuild to clear cached build artifacts - Change backend external port from 8001 to 8080 - Change backend port to 9001 to avoid conflicts - Fix README port references 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Created forgot-password page with email recovery form - Semantic HTML with proper ARIA labels and accessibility - Success banner for email sent confirmation - Responsive design matching login page - Back to login navigation - Created register page with comprehensive validation - Form fields: name, email, password, confirmPassword, acceptTerms - Custom passwordStrengthValidator (8+ chars, uppercase, lowercase, numbers) - Custom passwordMatchValidator at form level - Password visibility toggles for both password fields - Custom checkbox styling with proper alignment - Security: never sends confirmPassword or acceptTerms to backend - Added routing for /forgot-password and /register routes - Updated login page with routerLink navigation to new pages - Fixed base href from "." to "/" for proper Angular routing - Fixed CSS specificity issue: changed "fieldset span" to "fieldset .input-wrapper span" to prevent absolute positioning from affecting checkbox label text - Updated responsive design for mobile (768px breakpoint) - All pages use Angular signals for state management - Full form validation with CustomValidators 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Added industry-standard features for small open-source team: - HTTP Interceptor for centralized API handling - Auto-detects API URL (api.refupet.org prod, localhost dev) - Consistent error handling with user-friendly Spanish messages - Development logging for debugging - Ready for JWT token authentication - TypeScript Type Safety - Created core/models with User, LoginRequest, RegisterRequest interfaces - ApiResponse<T> and PaginatedResponse<T> for API contracts - Proper typing throughout codebase (no 'any' types) - Code Quality Improvements - Fixed all ESLint errors (11 issues resolved) - Component naming convention: ForgotPasswordComponent, RegisterComponent - Removed unused imports and console.log statements - Proper User interface with all required fields - Developer Documentation - Updated front/README.md with project structure - Development guidelines and best practices - API configuration for Coolify deployment - Form validation examples - Bug Fixes - Fixed login button spinner CSS (was affecting text span) - Fixed CSS specificity for checkbox labels - Fixed component exports in app.routes.ts All changes focused on maintainability for small team collaboration. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request implements the core authentication features for the PetSync application including login, registration, and forgot password functionality. The implementation includes comprehensive form validation, responsive UI design, and proper routing configuration.
- Implements complete authentication system with login, register, and forgot password pages
- Adds type-safe API interfaces and interceptors for backend communication
- Updates project configuration for production deployment with Docker and proper environment handling
Reviewed Changes
Copilot reviewed 31 out of 32 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| front/src/app/pages/register/register.ts | New registration component with form validation and password strength checking |
| front/src/app/pages/forgot-password/forgot-password.ts | New password recovery component with email validation |
| front/src/app/pages/login/login.component.ts | Enhanced login component with navigation methods |
| front/src/app/core/models/user.interface.ts | Type definitions for user authentication and API contracts |
| front/src/app/core/interceptors/api-interceptor.ts | HTTP interceptor for API communication and error handling |
| front/src/app/app.routes.ts | Updated routing configuration for new authentication pages |
| docker-compose.yml | Production-ready Docker configuration |
| README.md | Comprehensive project documentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| const apiUrl = (window as unknown as { __env?: { apiUrl?: string } }).__env?.apiUrl || | ||
| (window.location.hostname.includes('refupet.org') | ||
| ? 'https://api.refupet.org' | ||
| : 'http://localhost:9001/api'); |
Copilot
AI
Sep 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded domain check for 'refupet.org' makes the code less portable. Consider using environment variables or a configuration service instead of hardcoding production domains.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Replace hardcoded domain checks with environment-agnostic configuration: - Add centralized environment.config.ts with smart detection - Support runtime configuration via window.__env - Auto-detect production (HTTPS) vs development (localhost) - Remove hardcoded 'refupet.org' domain dependency - Add env.template.js and env.example.js for deployments - Update README with comprehensive deployment guide Benefits: - Single build works for all environments - No rebuild needed when changing API URL - Configuration changes at deployment time - More portable and flexible across platforms 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 35 out of 36 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 35 out of 36 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
IgnacioLD
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing i want to review is the DB thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For backend team, I think we shouldn't upload DB files.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Add clean .env.example template - Document that simple static values should be used - No shell commands or random suffixes needed - Reference for fixing Coolify deployment issue 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Remove hardcoded port mappings from docker-compose.yml to prevent "port already allocated" errors in Coolify multi-deployment scenarios. Changes: - Replace 'ports' with 'expose' in docker-compose.yml for Coolify - Add docker-compose.local.yml with port mappings for local development - Update Makefile with separate commands for local vs production - Update README with deployment documentation Benefits: - Coolify automatically allocates ports (no conflicts) - PR deployments work alongside production - Local development keeps familiar port mappings (4000, 9001, 5432) - Single docker-compose.yml works for all cloud deployments Local: make up (uses docker-compose.local.yml overlay) Production: make up-prod (Coolify auto-allocates ports) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Change allowedHosts to include both 'refupet.org' and '.refupet.org' to support Coolify's dynamic subdomain generation (*.refupet.org). This fixes 'Blocked request' errors for PR deployments like 12.refupet.org while maintaining domain restrictions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
92457ba to
9d30331
Compare
|
Plese, resolve conflicts @IgnacioLD |
testing PR link https://12.refupet.org/