Skip to content

rhodevanwyk/Full_Stack_Authentication_System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MacBook #01

Full Stack Authentication System

A full-stack authentication and role management system built with PHP, MySQL, HTML, CSS, and JavaScript. This project demonstrates secure user authentication, session management, database integration, and role-based access control within a traditional LAMP/WAMP development environment.

Features

  • User registration with server-side validation
  • Secure password hashing using password_hash()
  • User authentication with password_verify()
  • Persistent session management using PHP sessions
  • Role-based access control and protected dashboards
  • Separate user and administrator interfaces
  • Structured project architecture for scalability and maintainability
  • MySQL database integration with prepared statements for security

Tech Stack

  • Backend: PHP
  • Database: MySQL / MariaDB
  • Frontend: HTML, CSS, JavaScript
  • Environment: XAMPP, WAMP, or LAMP

Role Management

The system supports two account roles:

  • User – Standard account with access to the user dashboard.
  • Admin – Administrative account with access to the admin dashboard.

For security purposes, administrator accounts cannot be created through the registration form. Admin privileges must be assigned directly within the database by an authorized developer or database administrator.

iPhone 16 Pro

Core Functionality

Registration

Users can create accounts through a registration form. Passwords are never stored in plain text and are securely hashed before being saved to the database.

Authentication

The login system validates user credentials against stored account records and creates secure session variables upon successful authentication.

Authorization

After login, users are automatically redirected based on their assigned role:

  • dashboard.php for standard users
  • admin_dashboard.php for administrators

Session Handling

Protected pages require an active authenticated session, preventing unauthorized access to restricted areas.

Project Structure

  • actions/ – Authentication handlers
  • assets/ – CSS, JavaScript, and image assets
  • database/ – Database connection and schema files
  • includes/ – Shared components and session utilities
  • public/ – Public-facing pages and dashboards

Security Measures

  • Password hashing with PHP's built-in password API
  • Prepared SQL statements to reduce SQL injection risks
  • Session-based authentication
  • Server-side form validation
  • Role-based route protection

Learning Objectives

This project was developed to strengthen practical skills in:

  • PHP backend development
  • MySQL database design and integration
  • Authentication and authorization workflows
  • Session management
  • Secure coding practices
  • Full-stack application architecture

License

This project is provided for educational and portfolio purposes and may be modified or extended as needed.

iPhone 15 Pro

About

Full-stack authentication system built from scratch using PHP, MySQL, HTML & CSS. Features user registration, login/logout, password hashing, session management, role-based access control, and separate User/Admin dashboards. Built without frameworks to strengthen my core web development and authentication fundamentals.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages