Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏠 Horphakdee (Good Dormitory)

An online dormitory management system for dormitory owners and tenants. It covers room management, tenant management, billing (water and electricity), invoices, repair requests, chat, and notifications — a purely frontend web application (no backend server) storing virtual data in the browser's localStorage.

🔗 Demo: https://minlada-9.github.io/horphakdee/


✨ Main Features

For Dormitory Owners (Admin)

  • Dormitory Overview (Dashboard)
  • Room Management (Status: Vacant / Occupied / Under Renovation)
  • Tenant Information Management
  • Water and Electricity Bill Generation with Usage-Based Calculation
  • Invoice Management, Payment Status Check (Paid / Pending Payment / Overdue / Pending Receipt Verification)
  • Repair Requests from Tenants - Update repair status
  • Monthly income and expense summary
  • Chat with tenants
  • Notification system (bill notifications, repair requests, etc.)
  • Set up account and PromptPay information for receiving payments

For Tenants

  • View room information and bills
  • View payment status and pay via QR PromptPay
  • Report repairs with attached photos
  • Chat with the dorm manager
  • Receive notifications
  • Edit personal information

Account System

  • Separate role login: Landlord / Tenant
  • Register as a landlord (Registeadmin.html) and a tenant (register.html)
  • Manage sessions with sessionStorage

🛠️ Technologies Used

  • HTML / CSS / JavaScript (Vanilla JS) — No framework or build tool
  • localStorage — Simulates a client-side database (via the DB object)
  • sessionStorage — Manages login sessions (Via the Auth object)
  • PromptPay QR (EMV QR Code) — Generates a QR code payload according to the EMVCo standard (calculates CRC16/CCITT-FALSE manually, without relying on external libraries).

This project has no backend server — all data (rooms, tenants, bills, chats, etc.) is replicated and stored in... localStorage of each user's browser


📁 Project Structure

horphakdee/
├── index.html # Login page (Landlord/Tenant)
├── Registeadmin.html # Landlord registration
├── register.html # Tenant registration
├── css/
│ └── style.css
├── js/
│ ├── db.js # Simulated data layer (localStorage) — Rooms, Tenants, Bills, Repair Requests, Chat, etc.
│ ├── auth.js # Manage user sessions (login / logout / requireRole)
│ ├── promptpay.js # Create PromptPay QR payload
│ ├── admin-common.js # Top bar and shared menu of the admin page
│ └── tenant-common.js # Top bar and shared menu of the tenant page
├── admin/
│ ├── dashboard.html
│ ├── rooms.html
│ ├── tenants.html
│ ├── billing.html
│ ├── invoices.html
│ ├── maintenance.html
│ ├── summary.html
│ ├── chat.html
│ ├── notifications.html
│ └── settings.html
└── tenant/
├── dashboard.html
├── bills.html
├── maintenance.html
├── chat.html
├── notifications.html
└── profile.html

⚙️ Installation and Usage Instructions

This project is a completely static website. No npm install or npm start is required. Simply open the file in your browser or run it on a local server for immediate use.

1. Clone the Project

git clone https://github.com/minlada-9/horphakdee.git
cd horphakdee

2. Launch

Method 1 — Open the file directly Open index.html directly in your browser.

Method 2 — Run on a local server (recommended to ensure correct CSS/JS paths)

npx serve .

Or, if you have Python:

python3 -m http.server 5500

Then open your browser and go to... http://localhost:5500

All data will be automatically generated (seed data) the first time it's opened and stored in your browser's localStorage.


🔑 Demo Accounts

Role Username Password
Landlord admin admin123
Tenant nida 1234
Tenant kritsada 1234
Tenant araya 1234
Tenant pongsak 1234

📌 Note

  • Data is stored locally only in the browser being used — if opened from a different machine/browser or if localStorage is cleared, the old data will not be visible.
  • There is a button on the admin page. "Reset sample data" (⟲) to clear data and return to default settings.
  • This PromptPay QR code is generated from an EMVCo standard payload, but it is a simulation for demonstration purposes only and is not connected to a real payment system.

📄 License

MIT License

About

Online dormitory management system for landlords and tenants — manage rooms, utility bills, and invoices.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages