12 KiB
🏨 Hotel Pi - Complete Project Index
📚 Documentation Structure
Start here based on your role:
👨💼 Project Manager / Stakeholder
- README.md - Project overview
- COMPLETION.md - What's been delivered
- QUICK_REFERENCE.md - Key concepts
👨💻 Developer (Getting Started)
- GETTING_STARTED.md - 5-minute setup
- frontend/README.md - Frontend development
- control-service/README.md - Control service development
- ARCHITECTURE.md - How it all works together
🏗️ DevOps / System Administrator
- DEPLOYMENT.md - Raspberry Pi deployment
- docker-compose.yml - Services configuration
- .env.example - Configuration options
- scripts/ - Automation & operations
🗄️ CMS / Content Manager
- directus/README.md - CMS setup
- API.md - Data structure (Restaurants/Attractions collections)
- GETTING_STARTED.md#directus-cms-setup - Step-by-step CMS guide
📚 API / Integration Developer
- API.md - Complete API reference
- control-service/README.md#websocket-protocol - WebSocket protocol
- frontend/README.md#api-integration - Frontend API usage
🗂️ File Organization
Root Level
Hotel_Pi/
├── 📖 Documentation
│ ├── README.md ← Start here
│ ├── GETTING_STARTED.md ← Quick setup guide
│ ├── DEPLOYMENT.md ← Production deployment
│ ├── ARCHITECTURE.md ← Technical design
│ ├── API.md ← API reference
│ ├── QUICK_REFERENCE.md ← Cheat sheet
│ ├── COMPLETION.md ← What was delivered
│ └── INDEX.md ← This file
│
├── 🎨 Frontend Application
│ ├── frontend/
│ │ ├── src/
│ │ │ ├── App.svelte ← Root component
│ │ │ ├── main.js ← Entry point
│ │ │ ├── components/ ← UI components
│ │ │ │ ├── IdleScreen.svelte
│ │ │ │ ├── HomeScreen.svelte
│ │ │ │ ├── RestaurantsPage.svelte
│ │ │ │ ├── AttractionsPage.svelte
│ │ │ │ └── Clock.svelte
│ │ │ └── lib/ ← Utilities
│ │ │ ├── store.js ← State management
│ │ │ ├── api.js ← API client
│ │ │ ├── websocket.js ← WebSocket client
│ │ │ └── qrcode.js ← QR generation
│ │ ├── index.html ← HTML template
│ │ ├── vite.config.js ← Build config
│ │ ├── package.json ← Dependencies
│ │ ├── README.md ← Frontend guide
│ │ └── Dockerfile ← Container image
│
├── 🎮 Control Service
│ ├── control-service/
│ │ ├── src/
│ │ │ ├── server.js ← Main server
│ │ │ ├── cec-handler.js ← CEC input
│ │ │ └── commands.js ← System control
│ │ ├── package.json ← Dependencies
│ │ ├── README.md ← Service guide
│ │ ├── Dockerfile ← Container image
│ │ └── .eslintrc.json ← Linting config
│
├── 🗄️ CMS Configuration
│ ├── directus/
│ │ ├── schema.js ← Schema definitions
│ │ ├── seed-data.sql ← Sample data
│ │ └── README.md ← CMS guide
│
├── 🐳 Docker Orchestration
│ ├── docker-compose.yml ← Main composition
│ ├── docker-compose.dev.yml ← Dev overrides
│
├── 🚀 Automation Scripts
│ ├── scripts/
│ │ ├── launch-kiosk.sh ← Start kiosk
│ │ ├── launch-plex.sh ← Launch Plex
│ │ ├── return-to-kiosk.sh ← Back to kiosk
│ │ ├── init-system.sh ← Pi setup
│ │ ├── rebuild.sh ← Docker rebuild
│ │ ├── stop.sh ← Stop services
│ │ ├── logs.sh ← View logs
│ │ └── control.sh ← Control CLI
│
├── ⚙️ Configuration
│ ├── .env.example ← Config template
│ ├── .gitignore ← Git ignore rules
│ └── package.json ← Root scripts
🎯 Key Components
Frontend (frontend/)
Framework: Vite + Svelte Purpose: Kiosk UI Key Files:
App.svelte- Main router and state managementsrc/components/*.svelte- Page componentssrc/lib/*.js- Utilities and integrations Ports: 5173 (dev), 3000+ (prod)
Control Service (control-service/)
Framework: Node.js Purpose: Remote control + system commands Key Files:
src/server.js- WebSocket serversrc/cec-handler.js- HDMI-CEC inputsrc/commands.js- System command execution Ports: 3001
Directus CMS (directus/)
Framework: Directus Purpose: Content management Key Files:
schema.js- Collection definitionsseed-data.sql- Sample data Ports: 8055 Database: PostgreSQL (port 5432)
🔄 Quick Navigation
I want to...
Start developing immediately → GETTING_STARTED.md
Deploy to Raspberry Pi → DEPLOYMENT.md
Understand the architecture → ARCHITECTURE.md
Learn the API → API.md
Find a specific command → QUICK_REFERENCE.md
Develop the frontend → frontend/README.md
Develop the control service → control-service/README.md
Set up the CMS → directus/README.md
Troubleshoot an issue → QUICK_REFERENCE.md#troubleshooting-cheat-sheet
Configure the system → .env.example
📊 Project Statistics
| Metric | Value |
|---|---|
| Total Files | 50+ |
| Lines of Code | ~4,000 |
| Documentation Pages | 8 |
| Frontend Components | 6 |
| Service Modules | 3 |
| Docker Services | 4 |
| Automation Scripts | 8 |
| Configuration Options | 15+ |
🚀 Deployment Quick Links
Development Environment
docker-compose up -d
# Frontend: http://localhost:5173
# Directus: http://localhost:8055
# Control: ws://localhost:3001
Production (Raspberry Pi)
./scripts/init-system.sh
docker-compose up -d
./scripts/launch-kiosk.sh
View Logs
./scripts/logs.sh all # All services
./scripts/logs.sh frontend # Frontend only
./scripts/logs.sh control # Control service
📚 Documentation Map
Start
↓
README.md (Project Overview)
├─→ GETTING_STARTED.md (Setup)
│ ├─→ frontend/README.md (UI Development)
│ ├─→ control-service/README.md (Control Development)
│ └─→ directus/README.md (CMS Setup)
│
├─→ DEPLOYMENT.md (Production)
│ └─→ scripts/ (Automation)
│
├─→ ARCHITECTURE.md (Design)
│ └─→ API.md (Integration)
│
└─→ QUICK_REFERENCE.md (Cheat Sheet)
└─→ COMPLETION.md (What's Done)
🎓 Learning Path by Role
Full Stack Developer
- README.md (5 min)
- GETTING_STARTED.md (10 min)
- ARCHITECTURE.md (20 min)
- frontend/README.md (15 min)
- control-service/README.md (15 min)
- Start coding!
Frontend Developer
- GETTING_STARTED.md (10 min)
- frontend/README.md (30 min)
- API.md - Frontend section (10 min)
- Start in
frontend/src/
Backend Developer
- GETTING_STARTED.md (10 min)
- control-service/README.md (30 min)
- API.md - WebSocket section (10 min)
- Start in
control-service/src/
DevOps Engineer
- DEPLOYMENT.md (30 min)
- docker-compose.yml (10 min)
- .env.example (5 min)
- scripts/ (10 min)
- Monitor with health checks
Project Manager
- README.md (5 min)
- COMPLETION.md (5 min)
- ARCHITECTURE.md (15 min)
- Understand the tech stack
✅ Verification Checklist
Ensure you have everything:
- All 50+ files present
frontend/directory with componentscontrol-service/directory with modulesdirectus/configurationscripts/automation scriptsdocker-compose.ymlfile- Documentation (all 8 .md files)
.env.exampleconfiguration.gitignorefile- Root
package.json
🔗 External Resources
Technologies Used
Tools
📞 Support Resources
Common Issues → Solutions
See QUICK_REFERENCE.md#troubleshooting-cheat-sheet
How-To Guides
- Add new restaurant? → See GETTING_STARTED.md
- Deploy to Pi? → See DEPLOYMENT.md
- Test WebSocket? → See QUICK_REFERENCE.md
- View logs? → See QUICK_REFERENCE.md
Debugging Help
- Check logs:
./scripts/logs.sh all - Health check:
curl http://localhost:3001/health - Test API:
curl http://localhost:8055/items/restaurants - Review docs relevant to your issue
🎉 You're Ready!
Everything is documented, organized, and ready to go.
Next Steps:
- Clone/navigate to repository
- Read GETTING_STARTED.md
- Choose your path:
- Development? →
docker-compose up -d - Deployment? → See DEPLOYMENT.md
- Development? →
- Start coding!
📝 Document Versions
| Document | Purpose | Last Updated | Status |
|---|---|---|---|
| README.md | Overview | March 2024 | ✅ Complete |
| GETTING_STARTED.md | Setup Guide | March 2024 | ✅ Complete |
| DEPLOYMENT.md | Production Guide | March 2024 | ✅ Complete |
| ARCHITECTURE.md | Technical Design | March 2024 | ✅ Complete |
| API.md | API Reference | March 2024 | ✅ Complete |
| QUICK_REFERENCE.md | Cheat Sheet | March 2024 | ✅ Complete |
| COMPLETION.md | Project Summary | March 2024 | ✅ Complete |
| INDEX.md | This File | March 2024 | ✅ Complete |
Version 1.0.0 | Status: Production Ready | Last Updated: March 2024