Refactored version of my original Members Only app with improved structure, better security, and a cleaner UI.
This update focuses on organizing the code base, tightening authentication logic, and improving the overall user experience.
Status: ✅ Completed
Version: 2.0
Tech: PHP, MySQL, Bulma CSS, GUMP, SCSS
Version 2 builds on the original members-only application by introducing clearer routing, stronger access protection, improved validation flow, and upgraded UI styling.
The goal of this refactor was not to rewrite the entire application, but to demonstrate what I learned after building the first version and to bring the structure closer to real-world standards.
- Added a dedicated
index.phpas the public landing page. - Introduced
auth.phpwith arequire_login()function to protect routes (dashboard, profile, edit-user). - Implemented redirects to prevent unauthorized access — users trying to open protected pages are now redirected with an info message.
- Improved profile editing (
edit-user.php):- First name, last name, and email are prefilled from the database.
- Password fields remain empty for security.
- Successful updates redirect back to the profile page with a success message.
- Added global success/info messages (e.g. “profile updated”, “login required”), including automatic fade-out via JavaScript.
- Migrated from plain CSS to SCSS for better organization and maintainability.
- Updated layouts using full viewport height (
100vh) for cleaner page structure. - Improved profile page:
- Removed unused placeholder elements
- Buttons are now stacked vertically
- Added simple icons for better visual clarity
This refactor focuses on:
- strengthening authentication flow
- improving project structure
- enhancing the user experience
- applying cleaner styling practices
- demonstrating growth after the original v1
The core functionality remains the same — v2 simply represents a cleaner, more maintainable, and more secure version of the original project.