Skip to content

Refactored authentication system with sessions, GUMP validation, profile management, and improved security and structure.

License

Notifications You must be signed in to change notification settings

Jay14512/members-only-v2-refactored

Repository files navigation

Members Only (v2 – Refactored)

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


📌 Overview

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.


✨ Technical Improvements

  • Added a dedicated index.php as the public landing page.
  • Introduced auth.php with a require_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.

🎨 UI & Styling Improvements

  • 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

🧠 Purpose of This Version

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.

About

Refactored authentication system with sessions, GUMP validation, profile management, and improved security and structure.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published