How 0xjacky/nginx-ui works
Main Components
• Frontend: Represent the “app” directory that houses the Vue 3 application. This component is responsible for the user interface and interacts with the backend through RESTful APIs.
• Backend API: This is implemented in Go, as seen in the “api” and “internal” directories. It contains modules for authentication, certificate management, cluster management, system settings, logging (Nginx logs), notification, and more.
• External / Third-Party Services: Highlight integrations such as:
– Let's Encrypt / ACME for certificate management,
– ChatGPT integration for the assistant,
– External notification services (like Telegram, Dingding, Lark, etc.),
– Possibly DNS providers for auto certificate renewals.
• Infrastructure & Deployment: Include components such as Docker containers (Dockerfile, docker-compose for demo and deployment), systemd services, and configuration scripts that have their dedicated directories.
• Auxiliary Tools: These include CLI commands under “cmd”, build scripts (go generate, makefile references) and devcontainer files for development environment automation.
Relationships and Interactions
• ORM’s connection from the backend to the Database.
• Flows from the backend to external services (e.g., certificate authority for auto-renewal or notifications).
• The Nginx reverse proxy configuration is also a key integration point – you might show Nginx UI sitting behind or within a proxy setup.
Architectural Patterns / Design Principles
• Separation of concerns: Clear separation between frontend and backend layers.
• Modular design: The backend’s code is decomposed into multiple specialized modules (e.g., configurations, certificates, analytics, notifications, system, user management).
• API-driven architecture: All major functionalities are exposed as RESTful endpoints.
• Containerization and deployment scripting: Dockerfiles, devcontainer settings, and installation scripts are used to create reproducible environments.
• Single executable: The final delivery is a compiled binary that encapsulates the whole backend stack.
Relevant Technologies
• Frontend: Vue 3, Vite, TypeScript, and Ant Design Vue
• Backend: Go, Gin Web Framework, GORM, and various internal helper packages
• External Tools/Integrations: lego for ACME/Let’s Encrypt, various DNS providers, and ChatGPT integration.
• Infrastructure: Docker, Docker Compose, systemd, and Nginx (reverse proxy and log management)