Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Commit 506f597

Browse files
committed
docs: [#28] fix repository structure tree view in copilot instructions
- Update Repository Structure section to match actual filesystem - Add missing root files (.editorconfig, .taplo.toml, .vscode/, etc.) - Remove non-existent files and directories - Correct application/storage structure (remove certbot/, dhparam/) - Add missing scripts (manage-hetzner-dns.sh, shell-utils.sh) - Fix infrastructure docs organization - Update to reflect current project state accurately The tree view now provides accurate navigation guidance for contributors.
1 parent 0e85e50 commit 506f597

File tree

1 file changed

+114
-37
lines changed

1 file changed

+114
-37
lines changed

.github/copilot-instructions.md

Lines changed: 114 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,33 @@
11
# Torrust Tracker Demo - Contributor Guide
22

3+
> **📋 CRITICAL: Keep This Document Updated**
4+
>
5+
> This document is the **primary entry point** for all contributors, AI assistants, and newcomers to the project. It must be kept synchronized with repository changes at all times.
6+
>
7+
> **When making any repository changes, review and update this document if needed.** Check these areas for accuracy:
8+
>
9+
> - **Repository Structure** (`📁 Repository Structure` section): Verify folder structure and descriptions match current state
10+
> - **Available Commands** (`🛠️ Development Workflow` section): Ensure all `make` commands are current and accurate
11+
> - **Architecture Decision Records** (`📁 Repository Structure``Key Components` → ADR table): Add new ADRs to the table
12+
> - **User Guides** (`📁 Repository Structure``Key Components` → User guides table): Add new guides to the table
13+
> - **Testing Commands** (`📋 Conventions and Standards``Testing Requirements`): Verify all test commands work
14+
> - **Development Workflow** (`🛠️ Development Workflow`): Update commands, workflows, and environment requirements
15+
> - **Configuration Examples** (throughout document): Ensure examples reflect current configuration templates
16+
> - **Tool Requirements** (`🚀 Getting Started`): Update dependencies, extensions, and setup requirements
17+
>
18+
> **Validation Checklist**:
19+
>
20+
> - [ ] Run `make help` and verify all documented commands exist
21+
> - [ ] Check `docs/adr/` for new ADRs to include in the table
22+
> - [ ] Check `docs/guides/` for new guides to include in the table
23+
> - [ ] Test key commands mentioned in the development workflow
24+
> - [ ] Verify environment variable names match current template files
25+
> - [ ] Ensure testing layer architecture description is accurate
26+
> - [ ] Update any outdated tool versions or installation instructions
27+
328
## Table of Contents
429

30+
- [📋 Document Maintenance](#-document-maintenance)
531
- [🎯 Project Overview](#-project-overview)
632
- [Current Major Initiative](#current-major-initiative)
733
- [📁 Repository Structure](#-repository-structure)
@@ -21,7 +47,7 @@
2147
- [For AI Assistants](#for-ai-assistants)
2248
- [📖 Additional Resources](#-additional-resources)
2349

24-
## 🎯 Project Overview
50+
## 📋 Document Maintenance
2551

2652
**Torrust Tracker Demo** is the complete production deployment configuration for running a live [Torrust Tracker](https://github.com/torrust/torrust-tracker) instance. This repository provides:
2753

@@ -50,7 +76,7 @@ This project implements a complete twelve-factor app architecture with clear sep
5076
┌─────────────────────────────────────────────────────────────┐
5177
│ Configuration Management │
5278
├─────────────────────────────────────────────────────────────┤
53-
│ • Environment Templates (local.env.tpl, production.env.tpl)
79+
│ • Environment Templates (local.env.tpl, production.env.tpl)│
5480
│ • Configuration Processing (configure-env.sh) │
5581
│ • Template Rendering (.tpl → actual configs) │
5682
└─────────────────────────────────────────────────────────────┘
@@ -86,17 +112,23 @@ This project implements a complete twelve-factor app architecture with clear sep
86112

87113
```text
88114
torrust-tracker-demo/
115+
├── .editorconfig # Editor configuration
89116
├── .github/
90-
│ ├── workflows/ # GitHub Actions CI/CD pipelines
91-
│ ├── prompts/ # AI assistant prompts and templates
117+
│ ├── workflows/ # GitHub Actions CI/CD pipelines
118+
│ ├── prompts/ # AI assistant prompts and templates
92119
│ └── copilot-instructions.md # This contributor guide
120+
├── .gitignore # Global git ignore rules
121+
├── .markdownlint.json # Markdown linting configuration
122+
├── .markdownlint.md # Markdown lint rules documentation
123+
├── .taplo.toml # TOML formatting configuration
124+
├── .vscode/ # VS Code workspace settings
125+
├── .yamllint-ci.yml # YAML linting configuration for CI
126+
├── cspell.json # Spell checking configuration
127+
├── project-words.txt # Project-specific word list
128+
├── repomix-output.xml # Repomix generated project summary
93129
├── docs/
94130
│ ├── adr/ # Architecture Decision Records
95-
│ │ └── 001-makefile-location.md # Makefile location decision
96131
│ ├── guides/ # User and developer guides
97-
│ │ ├── integration-testing-guide.md # Testing guide
98-
│ │ ├── quick-start.md # Fast setup guide
99-
│ │ └── smoke-testing-guide.md # End-to-end testing
100132
│ ├── infrastructure/ # Infrastructure-specific documentation
101133
│ ├── issues/ # Issue documentation and analysis
102134
│ ├── plans/ # Project planning documentation
@@ -105,59 +137,64 @@ torrust-tracker-demo/
105137
│ └── README.md # Cross-cutting documentation index
106138
├── infrastructure/ # Infrastructure as Code
107139
│ ├── terraform/ # OpenTofu/Terraform configurations
108-
│ │ ├── main.tf # VM and infrastructure definition
109-
│ │ └── terraform.tfvars.example # Example configuration
110140
│ ├── cloud-init/ # VM provisioning templates
111-
│ │ ├── user-data.yaml.tpl # Main system configuration
141+
│ │ ├── user-data.yaml.tpl # Main system configuration
112142
│ │ ├── user-data-minimal.yaml.tpl # Debug configuration
113143
│ │ ├── meta-data.yaml # VM metadata
114-
│ │ └── network-config.yaml # Network setup
144+
│ │ └── network-config.yaml # Network setup
115145
│ ├── config/ # Infrastructure configuration templates
116146
│ │ ├── environments/ # Environment-specific configs
117147
│ │ └── templates/ # Configuration templates
118148
│ ├── scripts/ # Infrastructure automation scripts
119-
│ │ ├── deploy-app.sh # Application deployment script
120-
│ │ ├── provision-infrastructure.sh # Infrastructure provisioning
121-
│ │ └── health-check.sh # Health validation script
122149
│ ├── tests/ # Infrastructure validation tests
123150
│ ├── docs/ # Infrastructure documentation
124-
│ │ ├── quick-start.md # Fast setup guide
125-
│ │ ├── local-testing-setup.md # Detailed setup
126-
│ │ ├── infrastructure-overview.md # Architecture overview
151+
│ │ ├── bugs/ # Bug documentation
127152
│ │ ├── refactoring/ # Refactoring documentation
128153
│ │ ├── testing/ # Testing documentation
129154
│ │ ├── third-party/ # Third-party setup guides
130-
│ │ └── bugs/ # Bug documentation
155+
│ │ ├── configuration-architecture.md # Config system docs
156+
│ │ ├── flexible-environment-system.md # Environment system
157+
│ │ ├── infrastructure-overview.md # Architecture overview
158+
│ │ ├── local-testing-setup.md # Detailed setup
159+
│ │ └── quick-start.md # Fast setup guide
131160
│ ├── .gitignore # Infrastructure-specific ignores
132161
│ └── README.md # Infrastructure overview
133162
├── application/ # Application deployment and services
134163
│ ├── config/ # Application configuration
135164
│ │ └── templates/ # Configuration templates
136165
│ ├── share/
137166
│ │ ├── bin/ # Deployment and utility scripts
138-
│ │ ├── container/ # Docker service configurations
139167
│ │ ├── dev/ # Development configs
140168
│ │ └── grafana/ # Grafana dashboards
141169
│ ├── storage/ # Persistent data storage
142-
│ │ ├── certbot/ # SSL certificate storage
143-
│ │ ├── dhparam/ # DH parameters
170+
│ │ ├── compose/ # Docker Compose environment files
144171
│ │ ├── prometheus/ # Prometheus data
145172
│ │ ├── proxy/ # Nginx proxy configs
146173
│ │ └── tracker/ # Tracker data
147174
│ ├── docs/ # Application documentation
148-
│ │ ├── production-setup.md # Production deployment docs
149-
│ │ ├── deployment.md # Deployment procedures
175+
│ │ ├── media/ # Screenshots and diagrams
176+
│ │ ├── backups.md # Backup procedures
177+
│ │ ├── deployment.md # Deployment procedures
150178
│ │ ├── firewall-requirements.md # Application firewall requirements
151-
│ │ ├── useful-commands.md # Operational commands
152-
│ │ └── media/ # Screenshots and diagrams
179+
│ │ ├── production-setup.md # Production deployment docs
180+
│ │ ├── rollbacks.md # Rollback procedures
181+
│ │ └── useful-commands.md # Operational commands
182+
│ ├── tests/ # Application tests
153183
│ ├── compose.yaml # Docker Compose for services
154-
│ ├── .env # Local environment configuration
155184
│ ├── .gitignore # Application-specific ignores
156185
│ └── README.md # Application overview
157186
├── scripts/ # Project-wide utility scripts
158-
│ └── lint.sh # Linting script for all file types
187+
│ ├── lint.sh # Linting script for all file types
188+
│ ├── manage-hetzner-dns.sh # DNS management script
189+
│ └── shell-utils.sh # Common shell utilities
190+
├── tests/ # Project-wide tests
191+
│ ├── test-ci.sh # CI test orchestrator
192+
│ ├── test-e2e.sh # End-to-end integration tests
193+
│ ├── test-unit-project.sh # Project structure tests
194+
│ └── README.md # Testing documentation
195+
├── LICENSE # Project license
159196
├── Makefile # Main automation interface
160-
└── *.md # Project root documentation
197+
└── README.md # Project root documentation
161198
```
162199

163200
### Key Components
@@ -196,6 +233,23 @@ Key design decisions are documented in `docs/adr/`. Contributors should review r
196233
| [ADR-006](../docs/adr/006-ssl-certificate-generation-strategy.md) | SSL Certificate Generation Strategy | Approach for SSL certificate management |
197234
| [ADR-007](../docs/adr/007-two-level-environment-variable-structure.md) | Two-Level Environment Variable Structure | Security-focused separation of infrastructure and container variables |
198235

236+
#### User Guides
237+
238+
Comprehensive deployment, configuration, and testing guides are available in `docs/guides/`. These provide step-by-step instructions for various scenarios:
239+
240+
| Guide | Purpose | Time | Use Case |
241+
| -------------------------------------------------------------------------- | ------------------------------- | ------ | ------------------- |
242+
| [Cloud Deployment Guide](../docs/guides/cloud-deployment-guide.md) | General cloud deployment | 30 min | First deployment |
243+
| [Integration Testing Guide](../docs/guides/integration-testing-guide.md) | Complete infrastructure testing | 15 min | Development |
244+
| [Smoke Testing Guide](../docs/guides/smoke-testing-guide.md) | Quick functionality validation | 5 min | Post-deployment |
245+
| [DNS Setup for Testing](../docs/guides/dns-setup-for-testing.md) | DNS configuration | 10 min | Domain setup |
246+
| [Grafana Setup Guide](../docs/guides/grafana-setup-guide.md) | Monitoring dashboard setup | 20 min | Monitoring |
247+
| [Grafana Subdomain Setup](../docs/guides/grafana-subdomain-setup.md) | Subdomain configuration | 15 min | Advanced monitoring |
248+
| [SSL Testing Guide](../docs/guides/ssl-testing-guide.md) | Certificate testing | 10 min | Security validation |
249+
| [Database Backup Testing](../docs/guides/database-backup-testing-guide.md) | Backup validation procedures | 10 min | Data persistence |
250+
251+
**Provider-Specific Guides**: Cloud provider deployment guides are organized in `docs/guides/providers/` for Hetzner, AWS, and other providers.
252+
199253
## 🛠️ Development Workflow
200254

201255
### Quick Start for Contributors
@@ -208,8 +262,8 @@ cd torrust-tracker-demo
208262
# 2. Install dependencies (Ubuntu/Debian)
209263
make install-deps
210264

211-
# 3. Setup SSH key for VMs
212-
make infra-config-local
265+
# 3. Setup development environment configuration
266+
make infra-config-development PROVIDER=libvirt
213267

214268
# 4. Test twelve-factor deployment workflow locally
215269
make infra-apply # Provision infrastructure (platform setup)
@@ -223,6 +277,26 @@ make test-e2e # Full infrastructure test
223277
make lint # Syntax validation only
224278
```
225279

280+
### Development Convenience Commands
281+
282+
For faster development iteration, use these convenience commands:
283+
284+
```bash
285+
# Complete development setup (first time)
286+
make dev-setup # Install deps + configure development environment
287+
288+
# Full deployment workflow
289+
make dev-deploy # Complete infra-apply + app-deploy workflow
290+
291+
# Quick validation
292+
make dev-test # Syntax + unit tests (no VM required)
293+
294+
# Complete cleanup
295+
make dev-clean # Clean up all resources and temporary files
296+
```
297+
298+
These commands combine multiple steps and use sensible defaults (development environment with libvirt provider).
299+
226300
### Main Commands
227301

228302
#### Twelve-Factor Workflow (Recommended)
@@ -256,10 +330,13 @@ make lint # Syntax validation only
256330

257331
#### Testing and Validation
258332

259-
| Command | Purpose |
260-
| --------------- | --------------------------------- |
261-
| `make test-e2e` | Run complete infrastructure tests |
262-
| `make lint` | Run syntax validation only |
333+
| Command | Purpose |
334+
| -------------------- | ------------------------------------------- |
335+
| `make test-e2e` | Run complete infrastructure tests |
336+
| `make test-ci` | Run project-wide CI tests (global concerns) |
337+
| `make lint` | Run syntax validation only |
338+
| `make infra-test-ci` | Run infrastructure-only CI tests |
339+
| `make app-test-ci` | Run application-only CI tests |
263340

264341
#### Legacy Commands (Deprecated)
265342

@@ -548,7 +625,7 @@ The project implements intelligent sudo cache management to improve the user exp
548625

549626
```bash
550627
make install-deps # Install dependencies
551-
make infra-config-local # Configure SSH access
628+
make infra-config-development PROVIDER=libvirt # Configure development environment
552629
make infra-test-prereq # Verify setup
553630
```
554631

@@ -764,7 +841,7 @@ ssh torrust@<VM_IP> "cd /home/torrust/github/torrust/torrust-tracker-demo/applic
764841
**Pre-commit Testing Requirement**: ALWAYS run the CI test suite before committing any changes:
765842

766843
```bash
767-
make infra-test-ci
844+
make test-ci
768845
```
769846

770847
This command runs all unit tests that don't require a virtual machine, including:

0 commit comments

Comments
 (0)