Skip to content

Production-ready authentication framework that saves you weeks of development. Features enterprise-grade security: 2FA/TOTP, LDAP integration, intelligent rate limiting, session fingerprinting, brute-force protection, security analytics dashboard, comprehensive audit logging, and granular role-based access control.

License

Notifications You must be signed in to change notification settings

madcoda9000/SecStore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” SecStore

Secure authentication boilerplate for PHP web applications

Tests PHP Version License codecov Last Commit Maintained

Production-ready authentication framework that saves you weeks of development. Features enterprise-grade security: 2FA/TOTP, LDAP integration, intelligent rate limiting, session fingerprinting, brute-force protection, security analytics dashboard, comprehensive audit logging, and granular role-based access control. Start building features, not infrastructure.

πŸ“š Documentation β€’ πŸ§‘β€πŸ’» Developer Documentation β€’ πŸ› Bug Reports β€’ πŸ’¬ Discussions


✨ Why SecStore?

πŸ›‘οΈ Security first

  • Zero-Trust architecture with session fingerprinting
  • 2FA support (TOTP) with QR code setup and backup codes
  • Advanced rate limiting with intelligent scopes
  • IP-Whitelisting with admin interface
  • Security dashboard Login Ananlytics, Security Events,

⚑ Developer Experience

  • One-click installation with automatic setup script
  • PSR-12 compliant with code quality tools
  • GitHub Hooks with automatic CHANGELOG.md update
  • Modern PHP 8.3+ with type declarations
  • Latte templates for clean, secure views

🌐 Enterprise-Ready

  • LDAP integration for corporate environments
  • Azure / Entra ID SSO
  • Granular role management (RBAC)
  • Comprehensive audit logging of all actions
  • Multi-language support (DE/EN)
  • DSGVO Compliant Art. 15, Art. 17

🎨 Modern UI/UX

  • Bootstrap 5 design
  • Dark/Light mode with user preferences
  • Mobile first



πŸš€ Quick Start

🐳 Docker Installation (Recommended)

The easiest way to run SecStore - Production-ready in under 60 seconds:

# Clone repository
git clone https://github.com/madcoda9000/SecStore.git
cd SecStore

# Configure environment (optional - adjust database passwords)
cp .env.example .env

# Start containers
docker-compose up -d

# Open browser
http://localhost:8000

πŸŽ‰ Done! Follow the web-based setup wizard to configure your database and admin account.

What you get:

  • βœ… PHP 8.3 with all required extensions
  • βœ… MySQL 8.0 database
  • βœ… phpMyAdmin for database management
  • βœ… Persistent storage for config, cache, and logs
  • βœ… Automatic setup with one command

Full Docker documentation: πŸ“– README_DOCKER.md


βš™οΈ Manual Installation (Alternative)

For custom environments or when Docker is not available:

# Clone repository
git clone https://github.com/madcoda9000/SecStore.git
cd SecStore

# Run automatic setup script
chmod +x secstore_setup.sh && ./secstore_setup.sh

# Configure application
cp config.php_TEMPLATE config.php
# -> Edit config.php with your database credentials

# Start development server
php -S localhost:8000 -t public

πŸŽ‰ Done! SecStore is running at http://localhost:8000

Default Login: super.admin / Test1000! (⚠️ Change password immediately!)

For detailed manual installation: πŸ“– INSTALL.md


πŸ§‘β€πŸ’» Extend SecStore

SecStore is designed as a boilerplate for building custom web applications with modern security features built-in.

Developer Documentation

Learn to extend SecStore with custom pages, controllers, and features
Complete step-by-step guide with practical examples

What you'll learn:

  • πŸ”§ Development environment setup
  • πŸ“„ Creating Latte templates and controllers
  • πŸ›£οΈ Adding routes and navigation
  • πŸ’Ύ JavaScript integration (CSP-compliant)
  • 🌍 Multilingual support implementation

🌟 Feature Highlights

πŸ” Authentication & Security
  • βœ… Multi-Factor Authentication (MFA/2FA) with TOTP standard
  • βœ… LDAP integration for enterprise connectivity
  • βœ… Azure / Entra ID SSO for enterprise connectivity
  • βœ… Session security with fingerprinting and auto-regeneration
  • βœ… Brute-force protection with intelligent blocking mechanisms
  • βœ… Password security with BCRYPT hashing (60 characters)
  • βœ… CSRF protection for all forms
  • βœ… Content Security Policy (CSP) against XSS attacks
⚑ Rate Limiting & DOS Protection
  • βœ… Granular rate limiting with scope-based limits
  • βœ… Real-time statistics and violation tracking
  • βœ… Intelligent throttling based on action sensitivity
  • βœ… Admin whitelist functions
  • βœ… Automatic cleanup and block management
πŸ‘₯ User Management
  • βœ… Role-based access control (RBAC)
  • βœ… Flexible user management with admin interface
  • βœ… Bulk actions (Enforce and Unenforce 2fa, delete, Enable and Disable)
  • βœ… Self-service profile management
  • βœ… Password reset via email (can be enabled/disbaled)
  • βœ… Registration system (can be enabled/disabled)
  • βœ… 2FA enforcement per user by admins
πŸ“Š Monitoring & Logging
  • βœ… Security dashboard with Login Analytics (Heatmap, Hourly, Weekly, Pattern detection)
  • βœ… Comprehensive logging (Audit, Security, System, Mail, DB)
  • βœ… Log categories with granular configuration
  • βœ… Violation tracking and threat intelligence
  • βœ… Performance metrics and system health
🎨 User Experience
  • βœ… Dark/Light theme with automatic detection
  • βœ… Multi-language (German/English)
  • βœ… Intuitive admin interface
  • βœ… Mobile first every page is mobile optimized

πŸ“± Screenshots

πŸ”‘ Login & Authentication

Modern Login Interface

πŸ‘€ User Dashboard & Profile

User Profile Management
πŸ–ΌοΈ Show more screenshots
Admin Area Security Dashboard
User Management Security Dashboard
Rate Limiting Audit Logs
Rate Limiting Stats Audit Logging
Settings Registration
System Settings User Registration

πŸ—οΈ Technology Stack

Backend PHP Flight PHP
Frontend Bootstrap Latte
Database MySQL MariaDB
Security 2FA LDAP CSRF
Tools Composer PHPMailer

πŸ”§ System Requirements

🐳 Using Docker? Skip these requirements! Docker handles everything automatically.
See README_DOCKER.md for Docker installation.

For manual installation:

Component Minimum Recommended
PHP 8.3+ 8.3+ (latest)
MySQL/MariaDB 8.0+ / 10.4+ 8.0+ / 10.6+
Webserver Apache 2.4 / Nginx 1.18 Apache 2.4+ / Nginx 1.20+
RAM 512 MB 1 GB+
Storage 100 MB 500 MB+

πŸ“‚ Project Architecture

SecStore follows a Model-View-Controller (MVC) architecture with additional middleware and utility layers for enhanced security.

SecStore/
β”œβ”€β”€ πŸ“ app/                    # Core Application
β”‚   β”œβ”€β”€ Controllers/           # MVC Controllers
β”‚   β”œβ”€β”€ Models/               # Data Models (Paris ORM)
β”‚   β”œβ”€β”€ Utils/                # Helper Classes (Session, Log, Security, etc.)
β”‚   β”œβ”€β”€ Middleware/           # Request Middleware (CSRF, Auth, Rate Limiting)
β”‚   β”œβ”€β”€ views/                # Latte Templates
β”‚   └── lang/                 # Translations (DE/EN)
β”œβ”€β”€ πŸ“ public/                # Web Root (Entry Point)
β”‚   β”œβ”€β”€ index.php            # Application Bootstrap
β”‚   β”œβ”€β”€ css/                  # Stylesheets
β”‚   └── js/                   # JavaScript Files
β”œβ”€β”€ πŸ“ Documentation/         # Project Documentation
β”‚   β”œβ”€β”€ ARCHITECTURE.md      # Complete architecture documentation
β”‚   β”œβ”€β”€ INSTALL.md           # Installation Guide
β”‚   β”œβ”€β”€ DEVDOC.md            # Developer Guide
β”‚   β”œβ”€β”€ SECURITY.md          # Security Policy
β”‚   └── CHANGELOG.md         # Version History
β”œβ”€β”€ πŸ“ database/              # Database Schema Files
β”œβ”€β”€ πŸ“ tests/                 # PHPUnit Tests (Unit & Integration)
β”œβ”€β”€ πŸ“ cache/                 # Template Cache
β”œβ”€β”€ config.php               # Main Configuration
└── composer.json            # Dependencies

πŸ—οΈ Architecture Highlights

  • MVC Pattern - Clean separation of concerns
  • Middleware Stack - Rate Limiting β†’ CSRF β†’ Authentication β†’ Authorization
  • Security-First - Session fingerprinting, CSRF tokens, input validation
  • Extensible - Easy to add custom controllers, models, and utilities
  • CSP-Compliant - No inline scripts or styles

πŸ“– For complete architecture details, request lifecycle, and extension guide:
πŸ‘‰ ARCHITECTURE.md


πŸ› οΈ Development

SecStore is designed as a boilerplate for building custom web applications with modern security features built-in.

Quick Start

# Install dependencies with dev tools
composer install

# Install Git hooks for code quality
./setup-hooks.sh

# Start development server
php -S localhost:8000 -t public

πŸ“– Complete Developer Guide

Everything you need to extend SecStore:

πŸ‘‰ DEVDOC.md - Complete step-by-step developer documentation

What's inside:

  • πŸ”§ Development environment setup & tools
  • πŸ“„ Creating custom pages, controllers, and models
  • πŸ›£οΈ Adding routes and navigation
  • πŸ’Ύ CSP-compliant JavaScript integration
  • 🌍 Multilingual support implementation
  • πŸ§ͺ Testing strategies and best practices
  • πŸ“š Code quality guidelines and Git workflow

Contributing

We welcome contributions! πŸŽ‰

  1. Fork the repository
  2. Create a feature branch
  3. Follow the guidelines in DEVDOC.md
  4. Open a Pull Request

Coding Standards:

  • βœ… PSR-12 compliant PHP code
  • βœ… Conventional Commits (use ./quick-commit.sh)
  • βœ… Tests for new features
  • βœ… Update documentation

πŸ“– Documentation

Document Description
πŸ—οΈ ARCHITECTURE.md Complete technical architecture and request lifecycle
πŸ“– INSTALL.md Complete manual installation and setup guide
🐳 README_DOCKER.md Docker installation guide (recommended)
πŸ“˜ HANDBOOK.md Complete Handbook for Users & Adminstrators
πŸ§‘β€πŸ’» DEVDOC.md Developer guide for extending SecStore
πŸ§ͺ TESTING.md Testing strategy and pragmatic approach
πŸ”’ SECURITY.md Security policies and vulnerability reporting
πŸ“ CHANGELOG.md Version history and release notes
πŸ” GIT_HOOKS.md Git hooks setup and usage guide

🀝 Community & Support

πŸ’¬ Get Help

GitHub Issues GitHub Discussions Email Support

❓ Frequently Asked Questions

Can SecStore be used in production?

Yes! SecStore was built for production environments and implements modern security standards. See SECURITY.md for details.

Does SecStore support Single Sign-On (SSO)?

Through LDAP integration, you can connect SecStore to existing SSO solutions. Native SAML/OAuth2 support is planned.

How can I contribute to the project?

We welcome issues, pull requests, documentation, and feature suggestions! See our contributing guidelines above.


πŸ“Š Project Stats

GitHub stars GitHub forks GitHub watchers

GitHub repo size Lines of code GitHub commit activity


⭐ Give us a Star!

If you like SecStore, give us a ⭐ on GitHub! This motivates us to continue working on the project.

πŸ™ Thank you for your interest in SecStore!

Built with ❀️ for the open-source community


⬆️ Back to top

About

Production-ready authentication framework that saves you weeks of development. Features enterprise-grade security: 2FA/TOTP, LDAP integration, intelligent rate limiting, session fingerprinting, brute-force protection, security analytics dashboard, comprehensive audit logging, and granular role-based access control.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published