Skip to content

Commit bcfb83c

Browse files
committed
Add comprehensive guides for platform administration, security, user support, and PIPEDA compliance
- Created a new Platform Administration Guide detailing roles, responsibilities, and dashboard features. - Added a Security and Privacy Management guide outlining principles, access control, data protection, and incident response. - Introduced User Support Procedures to streamline support requests, ticket management, and escalation processes. - Documented PIPEDA compliance updates in privacy policy and cookie consent agreement, ensuring adherence to Canadian privacy laws. - Updated the Table of Contents to reflect new documentation structure and added relevant links.
1 parent 13d2b7b commit bcfb83c

26 files changed

+5324
-23
lines changed

docs/assessments/joatu_exchange_system_assessment.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -789,10 +789,10 @@ With the recommended fixes implemented, the system will achieve **PRODUCTION-REA
789789

790790
## Appendix A: Related Documentation
791791

792-
- [RBAC Documentation](./rbac_system_assessment.md) - Pundit authorization patterns
793-
- [Notification System](../notification_system_documentation.md) - Noticed gem configuration
794-
- [i18n/Mobility](../.github/instructions/i18n-mobility.instructions.md) - Translation standards
795-
- [Database Schema](../diagrams/source/joatu_schema.mmd) - ER diagram (if exists)
792+
- [RBAC Documentation](rbac_system_comprehensive_assessment.md) - Pundit authorization patterns
793+
- [Notification System](../developers/systems/notifications_system.md) - Noticed gem configuration
794+
- [i18n/Mobility](../../.github/instructions/i18n-mobility.instructions.md) - Translation standards
795+
- [Database Schema](../diagrams/source/exchange_flow.mmd) - Exchange flow diagram
796796

797797
---
798798

Lines changed: 294 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,294 @@
1+
# Navigation Area Management
2+
3+
This document describes how to reset and reseed navigation areas in the Better Together Community Engine.
4+
5+
## Overview
6+
7+
The NavigationBuilder provides methods to reset and reseed navigation areas without affecting pages. This is useful when you need to update navigation structure or fix navigation issues without losing page content.
8+
9+
## Available Rake Tasks
10+
11+
All tasks are under the `better_together:generate` namespace:
12+
13+
```bash
14+
# List all navigation areas and items
15+
bin/dc-run rails better_together:generate:list_navigation
16+
17+
# Reset all navigation areas (preserves pages)
18+
bin/dc-run rails better_together:generate:reset_navigation
19+
20+
# Reset specific navigation area
21+
bin/dc-run rails better_together:generate:reset_navigation_area[platform-header]
22+
23+
# Full rebuild (DESTRUCTIVE - deletes pages too!)
24+
bin/dc-run rails better_together:generate:navigation_and_pages
25+
```
26+
27+
## Detailed Methods
28+
29+
### 1. Reset All Navigation Areas
30+
31+
**Ruby Console:**
32+
```ruby
33+
BetterTogether::NavigationBuilder.reset_navigation_areas
34+
```
35+
36+
**Rake Task:**
37+
```bash
38+
bin/dc-run rails better_together:generate:reset_navigation
39+
```
40+
41+
**What it does:**
42+
- Deletes all navigation items
43+
- Deletes all navigation areas
44+
- Rebuilds all four navigation areas:
45+
- Platform Header
46+
- Platform Host
47+
- Better Together
48+
- Platform Footer
49+
- **Preserves all pages** (pages are not deleted)
50+
51+
### 2. Reset Specific Navigation Area
52+
53+
**Ruby Console:**
54+
```ruby
55+
BetterTogether::NavigationBuilder.reset_navigation_area('platform-header')
56+
```
57+
58+
**Rake Task:**
59+
```bash
60+
bin/dc-run rails better_together:generate:reset_navigation_area[platform-header]
61+
```
62+
63+
**Available slugs:**
64+
- `platform-header` - Main navigation menu
65+
- `platform-host` - Host admin dropdown menu
66+
- `better-together` - Better Together dropdown
67+
- `platform-footer` - Footer links
68+
69+
**What it does:**
70+
- Deletes navigation items for the specified area
71+
- Deletes the navigation area
72+
- Rebuilds only that specific navigation area
73+
- **Preserves all pages**
74+
75+
### 3. List Navigation Areas
76+
77+
**Rake Task:**
78+
```bash
79+
bin/dc-run rails better_together:generate:list_navigation
80+
```
81+
82+
**What it does:**
83+
- Shows all navigation areas with their details
84+
- Lists all navigation items in each area
85+
- Shows parent-child relationships
86+
- Displays visibility and protection status
87+
88+
**Example output:**
89+
```
90+
Navigation Areas:
91+
================================================================================
92+
93+
Area: Platform Header
94+
Slug: platform-header
95+
Visible: true
96+
Protected: true
97+
Items: 3
98+
Navigation Items:
99+
- About (link)
100+
- Events (link)
101+
- Exchange Hub (link)
102+
...
103+
```
104+
105+
### 4. Full Rebuild (Includes Pages)
106+
107+
**Rake Task:**
108+
```bash
109+
bin/dc-run rails better_together:generate:navigation_and_pages
110+
```
111+
112+
**What it does:**
113+
- Deletes all pages
114+
- Deletes all navigation items
115+
- Deletes all navigation areas
116+
- Rebuilds everything from scratch
117+
- **WARNING:** This deletes all pages including custom content
118+
119+
## Navigation Areas Structure
120+
121+
### Platform Header
122+
- **Purpose:** Main site navigation at top of page
123+
- **Contains:**
124+
- About page link
125+
- Events link (route-based)
126+
- Exchange Hub link (route-based)
127+
128+
### Platform Host
129+
- **Purpose:** Admin/host management dropdown
130+
- **Contains:**
131+
- Dashboard
132+
- Communities
133+
- Navigation Areas
134+
- Pages
135+
- People
136+
- Platforms
137+
- Roles
138+
- Resource Permissions
139+
140+
### Better Together
141+
- **Purpose:** Information about the platform software
142+
- **Contains:**
143+
- What is Better Together?
144+
- About the Community Engine
145+
146+
### Platform Footer
147+
- **Purpose:** Footer links for policies and info
148+
- **Contains:**
149+
- FAQ
150+
- Privacy Policy
151+
- Terms of Service
152+
- Code of Conduct
153+
- Accessibility
154+
- Cookie Policy
155+
- Code Contributor Agreement
156+
- Content Contributor Agreement
157+
- Contact
158+
159+
## Common Use Cases
160+
161+
### Update Navigation After Adding New Pages
162+
163+
If you've added new pages to footer_pages in NavigationBuilder:
164+
165+
```bash
166+
# Reset just the footer area
167+
bin/dc-run rails navigation:reset_area[platform-footer]
168+
```
169+
170+
### Fix Broken Navigation
171+
172+
If navigation items are missing or duplicated:
173+
174+
```bash
175+
# Reset all navigation areas
176+
bin/dc-run rails navigation:reset
177+
```
178+
179+
### Development: Fresh Start
180+
181+
For a completely fresh navigation setup:
182+
183+
```bash
184+
# Full rebuild (careful - deletes pages!)
185+
bin/dc-run rails navigation:rebuild
186+
```
187+
188+
### Check Current Navigation State
189+
190+
```bash
191+
# List all areas and items
192+
bin/dc-run rails navigation:list
193+
```
194+
195+
## Programmatic Usage
196+
197+
### In Seeds or Migrations
198+
199+
```ruby
200+
# Reset all navigation (safe for pages)
201+
BetterTogether::NavigationBuilder.reset_navigation_areas
202+
203+
# Reset specific area
204+
BetterTogether::NavigationBuilder.reset_navigation_area('platform-footer')
205+
206+
# Full rebuild (destructive)
207+
BetterTogether::NavigationBuilder.build(clear: true)
208+
```
209+
210+
### In Rails Console
211+
212+
```ruby
213+
# Reset navigation
214+
BetterTogether::NavigationBuilder.reset_navigation_areas
215+
216+
# Check what areas exist
217+
BetterTogether::NavigationArea.pluck(:name, :slug)
218+
219+
# See items in an area
220+
area = BetterTogether::NavigationArea.find_by(slug: 'platform-footer')
221+
area.navigation_items.pluck(:title, :item_type, :position)
222+
```
223+
224+
## Important Notes
225+
226+
### Protected Records
227+
228+
All navigation areas and items created by the builder are marked as `protected: true`. This means:
229+
- They cannot be deleted through the UI
230+
- They are considered system records
231+
- Manual database edits may be needed to modify protection status
232+
233+
### Localization
234+
235+
All navigation building happens within `I18n.with_locale(:en)`. If you need other locales:
236+
- Pages support multi-locale attributes (title_en, title_es, etc.)
237+
- Navigation items also support multi-locale attributes
238+
- Update the builder methods to include additional locales
239+
240+
### Page Preservation
241+
242+
The `reset_navigation_areas` and `reset_navigation_area` methods preserve pages because:
243+
- Pages may contain user-generated content
244+
- Pages may have been customized
245+
- Navigation can be rebuilt without affecting page content
246+
- Pages are referenced by navigation items but not dependent on them
247+
248+
### Safe Order of Operations
249+
250+
When resetting navigation:
251+
1. Child navigation items are deleted first
252+
2. Parent navigation items are deleted second
253+
3. Navigation areas are deleted last
254+
4. This respects foreign key constraints
255+
256+
## Troubleshooting
257+
258+
### "Navigation area with slug 'X' not found"
259+
260+
The area doesn't exist. Check available slugs:
261+
```ruby
262+
BetterTogether::NavigationArea.pluck(:slug)
263+
```
264+
265+
### Duplicate Navigation Items
266+
267+
Run a reset:
268+
```bash
269+
bin/dc-run rails navigation:reset
270+
```
271+
272+
### Pages Missing After Reset
273+
274+
If you used `navigation:rebuild`, pages were deleted. Restore from backup or reseed:
275+
```bash
276+
bin/dc-run rails db:seed
277+
```
278+
279+
### Permission Errors in UI
280+
281+
Navigation areas and items are protected. To modify through UI:
282+
1. Unprotect in console: `area.update(protected: false)`
283+
2. Make changes in UI
284+
3. Re-protect: `area.update(protected: true)`
285+
286+
## Related Files
287+
288+
- Builder: `app/builders/better_together/navigation_builder.rb`
289+
- Rake tasks: `lib/tasks/navigation.rake`
290+
- Seeds: `db/seeds.rb`
291+
- Models:
292+
- `app/models/better_together/navigation_area.rb`
293+
- `app/models/better_together/navigation_item.rb`
294+
- `app/models/better_together/page.rb`
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Navigation Reset Quick Reference
2+
3+
## Quick Commands
4+
5+
```bash
6+
# List all navigation areas and items
7+
bin/dc-run rails better_together:generate:list_navigation
8+
9+
# Reset all navigation areas (safe - preserves pages)
10+
bin/dc-run rails better_together:generate:reset_navigation
11+
12+
# Reset specific navigation area
13+
bin/dc-run rails better_together:generate:reset_navigation_area[platform-header]
14+
bin/dc-run rails better_together:generate:reset_navigation_area[platform-host]
15+
bin/dc-run rails better_together:generate:reset_navigation_area[better-together]
16+
bin/dc-run rails better_together:generate:reset_navigation_area[platform-footer]
17+
18+
# Full rebuild (DESTRUCTIVE - deletes pages too!)
19+
bin/dc-run rails better_together:generate:navigation_and_pages
20+
```
21+
22+
## Ruby Console
23+
24+
```ruby
25+
# Reset all navigation areas
26+
BetterTogether::NavigationBuilder.reset_navigation_areas
27+
28+
# Reset specific area
29+
BetterTogether::NavigationBuilder.reset_navigation_area('platform-footer')
30+
31+
# Full rebuild
32+
BetterTogether::NavigationBuilder.build(clear: true)
33+
34+
# Manual checks
35+
BetterTogether::NavigationArea.count
36+
BetterTogether::NavigationItem.count
37+
BetterTogether::Page.count
38+
```
39+
40+
## Navigation Area Slugs
41+
42+
- `platform-header` - Top navigation menu
43+
- `platform-host` - Host/admin dropdown
44+
- `better-together` - Software info dropdown
45+
- `platform-footer` - Footer links
46+
47+
## Safety Levels
48+
49+
**Safe** (preserves pages):
50+
- `better_together:generate:reset_navigation`
51+
- `better_together:generate:reset_navigation_area[slug]`
52+
- `better_together:generate:list_navigation`
53+
- `reset_navigation_areas` (Ruby method)
54+
- `reset_navigation_area(slug)` (Ruby method)
55+
56+
⚠️ **Destructive** (deletes pages):
57+
- `better_together:generate:navigation_and_pages`
58+
- `NavigationBuilder.build(clear: true)` (Ruby method)

docs/developers/systems/agreements_system.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ graph TB
8686
```
8787

8888
**Diagram Files:**
89-
- 📊 [Mermaid Source](../diagrams/source/agreements_system_flow.mmd) - Editable source
90-
- 🖼️ [PNG Export](../diagrams/exports/png/agreements_system_flow.png) - High-resolution image
91-
- 🎯 [SVG Export](../diagrams/exports/svg/agreements_system_flow.svg) - Vector graphics
89+
- 📊 [Mermaid Source](../../diagrams/source/agreements_system_flow.mmd) - Editable source
90+
- 🖼️ [PNG Export](../../diagrams/exports/png/agreements_system_flow.png) - High-resolution image
91+
- 🎯 [SVG Export](../../diagrams/exports/svg/agreements_system_flow.svg) - Vector graphics
9292

9393
### Process Flow Explanation
9494

@@ -417,7 +417,7 @@ graph LR
417417
```
418418

419419
**Documentation System Resources:**
420-
- 📊 [Documentation System Flow Diagram](../diagrams/source/documentation_system_flow.mmd) - Complete documentation workflow
420+
- 📊 [Documentation System Flow Diagram](../../diagrams/source/documentation_system_flow.mmd) - Complete documentation workflow
421421
- 📖 [System Documentation Template](../../implementation/templates/system_documentation_template.md) - Standards used for this document
422422
- 📋 [Table of Contents](../../table_of_contents.md) - Complete documentation index
423423

0 commit comments

Comments
 (0)