How pacodiz02/pi works
Project type and purpose
• This is a repository of service configuration files and static‐site demos.
• The “PRE” and “PRO” directories hold web server configs for pre-production and production.
• The “client-config” directory holds a JSON configuration delivered to clients.
• The “demos” directory contains two example static website builds (“demo1” and “demo2”), each with two variants:
• web-estatico (asset pipeline + SCSS, JS, mail handlers)
• web-html (pure HTML pages)
File structure
• Top-level directories:
• PRE/ (pre-prod web.conf)
• PRO/ (prod web-pdu.conf)
• client-config/ (config.json)
• demos/
• Each demo under demos/ has two variants:
– web-estatico: uses SCSS build, JS libs, mail scripts
– web-html: simple HTML pages
• No dynamic backend or database—purely static content served by web servers.
• Configuration files drive the behavior of the web servers in each environment.
Key insights from README
• It’s a lightweight toolkit: service configuration + static demos.
Main components
a. Configuration Repository
• Holds PRE/web.conf, PRO/web-pdu.conf, client-config/config.json, demos/
b. CI/CD Pipeline (optional)
• Checkout → Validate configs → Build SCSS/JS → Deploy to PRE → Smoke tests → Deploy to PRO
c. Environments
1) PRE-Environment
– Web Server (e.g., Nginx/Apache)
– Loads PRE/web.conf
– Serves demo1 & demo2
2) PRO-Environment
– Web Server
– Loads PRO/web-pdu.conf
– Serves same demos (or a subset) to end users
d. Clients
• Browsers request demo sites and fetch client-config/config.json as needed
e. Static Assets & Build Tools
Relationships & interactions
• Developers push to config repo → triggers CI/CD
• CI/CD deploys configs and static assets to PRE
• After validation, CI/CD propagates to PRO
• End users’ browsers
• GET / (demo home)
• GET /client-config/config.json
• GET CSS/JS assets under /web-estatico
• Optional POST to /mail/contact.php
Architectural patterns & principles
• Environment segregation (PRE vs. PRO)
• Immutable static assets (built once, deployed to both envs)
• Single source of truth for configs in version control
• Clear separation: configuration files vs. demo content
• Config repo vs. build pipeline vs. environments vs. clients