Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/IvBanzaga/Refugio/llms.txt

Use this file to discover all available pages before exploring further.

Welcome to Refugio

Refugio is a complete web-based reservation management system specifically designed for mountain refuges and hostels. It streamlines bed management, user reservations, and administrative tasks with a modern, intuitive interface.

What is Refugio?

Refugio is a PHP-based SaaS application that provides mountain refuge administrators with powerful tools to manage bed reservations, while giving members an easy-to-use interface to check availability and make bookings in real-time.
Refugio supports both PostgreSQL and MySQL databases, giving you flexibility in your infrastructure choices.

Who is Refugio For?

This system is ideal for:
  • Mountain Refuges that need to manage bed reservations efficiently
  • Climbing Clubs with their own mountain huts
  • Hostels requiring a simple yet powerful reservation system
  • Organizations managing shared spaces with a membership system

Key Features

For Administrators

User Management

Complete CRUD operations for managing club members and their profiles

Reservation Approval

Review and approve/reject pending reservations with a streamlined workflow

Room Management

Control rooms and beds with real-time occupancy status tracking

Dashboard Analytics

View statistics and metrics about bookings, occupancy, and member activity

For Members

Interactive Calendar

Visual availability calendar showing available beds in real-time

Easy Booking

Simple reservation form with dynamic bed selection

Companion Management

Add companions (members and non-members) to your reservations

My Reservations

View and manage your pending and confirmed bookings

Technology Stack

CategoryTechnologyVersion
BackendPHP7.4+
Database (Primary)PostgreSQL12+
Database (Alternative)MySQL5.7+
FrontendHTML5 + CSS3-
CSS FrameworkBootstrap5.3.2
IconsBootstrap Icons1.11.1
JavaScriptVanilla JSES6+
SecurityPDO + password_hash-

Architecture Overview

Refugio follows a three-tier architecture:
┌─────────────────────────────────────┐
│      PRESENTATION LAYER             │
│  (viewAdmin.php, viewSocio.php)     │
└─────────────────────────────────────┘

┌─────────────────────────────────────┐
│      BUSINESS LOGIC LAYER           │
│      (functions.php)                │
└─────────────────────────────────────┘

┌─────────────────────────────────────┐
│      DATA ACCESS LAYER              │
│      (conexion.php + PDO)           │
└─────────────────────────────────────┘

┌─────────────────────────────────────┐
│      DATABASE                       │
│      (PostgreSQL / MySQL)           │
└─────────────────────────────────────┘

Database Schema

The system uses 5 core tables:
  • usuarios - User accounts with roles (admin/user)
  • habitaciones - Room definitions with capacity
  • camas - Individual bed records with occupancy status
  • reservas - Reservation records with approval workflow
  • acompanantes - Companion information for multi-bed bookings

Security Features

Refugio implements multiple security layers:
Bcrypt password hashing with password_hash()
PDO prepared statements to prevent SQL injection
Input sanitization with htmlspecialchars()
XSS protection on all user inputs
Session ID regeneration to prevent session fixation
HttpOnly cookies for enhanced security
Role-based access control (RBAC)
Secure logout mechanism
For production deployment, ensure you enable HTTPS, implement CSRF tokens, and configure rate limiting.

Project Statistics

  • PHP Files: 10+
  • Functions: 30+
  • Lines of Code: ~3,500
  • Database Tables: 5
  • Default Rooms: 4
  • Total Bed Capacity: 26 beds
  • Reservation States: 3 (pending, approved, cancelled)

Default User Accounts

The system comes with test accounts for immediate evaluation:
RoleEmailPasswordMember #
Adminadmin@hostel.comadmin123A001
Useruser1@mail.comuser123U001
Useruser2@mail.comuser123U002
Change these default passwords immediately after installation, especially before production deployment!

Next Steps

Quick Start

Get Refugio running in minutes with our quick start guide

Installation Guide

Detailed installation instructions for production deployment

Support

For questions, issues, or contributions, please refer to the project documentation or contact the development team.
Ready to manage your mountain refuge efficiently? Let’s get started! 🏔️

Build docs developers (and LLMs) love