Skip to content

Commit 0c00486

Browse files
refactor(docs): apply self-documenting principle across all documentation
- **Simplified CONTRIBUTING.md** (21447 lines): Two clear pathways - GitHub issue or PR - **Simplified API_REFERENCE.md** (30060 lines): Points to index.d.ts and index.js instead of duplicating - **Simplified ARCHITECTURE.md** (325110 lines): Points to scripts/*.js for implementation details - **Simplified PRAYER_ORGANIZATION.md** (12060 lines): Points to prayer-schema.json and lib/prayer-index.json - **Simplified USAGE_EXAMPLES.md** (516150 lines): Concise patterns with interactive exploration tips - **Simplified INDEX.md** (13055 lines): Table format with clear user journeys - **Updated README.md**: Reorganized docs section into 'For Users', 'For Contributors', 'Reference Files' - **Deleted SCHEMA.md**: Redundant with prayer-schema.json and ARCHITECTURE.md - **Deleted TESTING.md**: Test details belong in scripts/test.js (self-documenting) **Philosophy**: Code IS documentation. Docs should point to authoritative sources rather than duplicate information that can become stale. Reduces maintenance burden while improving accuracy.
1 parent fdea86c commit 0c00486

File tree

9 files changed

+338
-1613
lines changed

9 files changed

+338
-1613
lines changed

CONTRIBUTING.md

Lines changed: 20 additions & 197 deletions
Original file line numberDiff line numberDiff line change
@@ -2,212 +2,35 @@
22

33
Thank you for your interest in contributing to the Catholic Prayer Collection! This project aims to provide accurate, respectful, and comprehensive traditional Catholic prayers in multiple languages.
44

5-
## 🙏 Sacred Content Guidelines
5+
## Two Ways to Contribute
66

7-
Before contributing, please remember that these are sacred prayers from the Catholic tradition. All contributions should:
7+
### Option 1: Request a Prayer (Easiest)
88

9-
- **Respect the sacred nature** of the content
10-
- **Maintain liturgical accuracy** when possible
11-
- **Use traditional, widely-accepted translations**
12-
- **Preserve the theological integrity** of the prayers
13-
- **Follow established Catholic terminology**
9+
**[Open a GitHub Issue](https://github.com/codexcommunion/prayer-collection/issues/new)** to request a new prayer be added to the collection.
1410

15-
## 📋 How to Contribute
11+
Please include:
12+
- Prayer name
13+
- Source or reference (prayer book, liturgical text, etc.)
14+
- Why it should be included (traditional usage, liturgical significance, etc.)
1615

17-
### 1. Prayer Requests
18-
Use the "New Prayer Request" issue template to suggest prayers for addition to the collection.
16+
We'll review the request and add it to the collection if appropriate.
1917

20-
**What we're looking for:**
21-
- Traditional Catholic prayers in common use
22-
- Prayers with established liturgical or devotional significance
23-
- Prayers that are in the public domain
24-
- Prayers with reliable historical documentation
18+
### Option 2: Submit a Pull Request (Advanced)
2519

26-
**What we're not looking for:**
27-
- Modern compositions without traditional usage
28-
- Prayers from non-Catholic traditions
29-
- Copyrighted materials
30-
- Experimental or unofficial prayer texts
20+
If you're comfortable with Git and JSON, you can contribute directly:
3121

32-
### 2. Translation Contributions
33-
Use the "Translation Request" issue template to suggest translation improvements.
22+
1. **Fork** this repository
23+
2. **Clone** your fork locally
24+
3. **Create a new prayer JSON file** in `prayers/` directory
25+
4. **Run validation**: `npm run validate`
26+
5. **Commit** your changes
27+
6. **Push** to your fork
28+
7. **Open a Pull Request**
3429

35-
**Translation Standards:**
36-
- Use liturgically approved translations when available
37-
- Maintain consistency with Catholic terminology
38-
- Preserve the prayer's theological meaning
39-
- Include source references where possible
30+
**Need help with the JSON structure?** See the [docs/](docs/) directory for details on how to properly structure prayer JSON files, or look at existing files in `prayers/` for examples (e.g., `prayers/our-father.json`).
4031

41-
### 3. Bug Reports
42-
Use the "Bug Report" issue template for:
43-
- JSON format errors
44-
- API functionality issues
45-
- Documentation problems
46-
- Build or packaging issues
32+
## License
4733

48-
## 🔧 Development Setup
34+
By contributing, you agree that your contributions will be licensed under the CodexCommunion Digital Code License (CCCL) v1.0. **See [LICENSE](LICENSE) for details.**
4935

50-
### Prerequisites
51-
- Node.js 12.0.0 or higher
52-
- Git
5336

54-
### Setup
55-
```bash
56-
git clone https://github.com/codexcommunion/prayer-collection.git
57-
cd prayer-collection
58-
npm install
59-
```
60-
61-
### Development Commands
62-
```bash
63-
# Build the project
64-
npm run build
65-
66-
# Validate all prayer files
67-
npm run validate
68-
69-
# Run tests
70-
npm test
71-
72-
# Run all checks (used before publishing)
73-
npm run prepublishOnly
74-
```
75-
76-
## 📁 Project Structure
77-
78-
```
79-
prayer-collection/
80-
├── prayers/
81-
│ ├── core/ # Fundamental prayers
82-
│ ├── creeds/ # Statements of faith
83-
│ ├── marian/ # Prayers to Mary
84-
│ ├── saints/ # Prayers to saints
85-
│ └── ... # Other categories
86-
├── scripts/ # Build and validation scripts
87-
├── index.js # Main API entry point
88-
├── index.d.ts # TypeScript definitions
89-
└── README.md # Documentation
90-
```
91-
92-
## 📝 Adding a New Prayer
93-
94-
### 1. Create the JSON file
95-
Place the file in the appropriate category directory:
96-
```
97-
prayers/[category]/[prayer-id].json
98-
```
99-
100-
### 2. JSON Structure
101-
```json
102-
{
103-
"metadata": {
104-
"id": "prayer-id",
105-
"title": "Prayer Title",
106-
"category": "category-name",
107-
"type": "devotional|liturgical|scriptural",
108-
"description": "Brief description",
109-
"origin": "Historical origin",
110-
"origin_date": "Date in ISO format",
111-
"usage": "When/how it's used",
112-
"feast_days": ["associated-feasts"],
113-
"devotions": ["associated-devotions"],
114-
"created_date": "2025-07-14",
115-
"last_modified": "2025-07-14"
116-
},
117-
"translations": {
118-
"la": {
119-
"language": "Latin",
120-
"text": "Latin text",
121-
"notes": "Optional notes"
122-
},
123-
"en": {
124-
"language": "English",
125-
"text": "English text",
126-
"notes": "Optional notes"
127-
}
128-
// ... other languages
129-
}
130-
}
131-
```
132-
133-
### 3. Naming Conventions
134-
- **File names**: Use kebab-case (e.g., `our-father.json`)
135-
- **IDs**: Match the filename without extension
136-
- **Categories**: Use existing category names
137-
138-
### 4. Required Fields
139-
- `metadata.id`, `metadata.title`, `metadata.category`
140-
- `translations.la` (Latin text)
141-
- `translations.en` (English text)
142-
143-
### 5. Date Formats
144-
Use ISO 8601 format for `origin_date`:
145-
- Ranges: `"1200/1300"`
146-
- Approximate: `"~1200"`
147-
- Exact: `"1886"`
148-
149-
## 🔍 Validation
150-
151-
All prayers must pass validation:
152-
153-
```bash
154-
npm run validate
155-
```
156-
157-
This checks:
158-
- JSON syntax
159-
- Required fields
160-
- ID/filename consistency
161-
- Category consistency
162-
- Date format validity
163-
164-
## 🧪 Testing
165-
166-
Run tests to ensure the API works correctly:
167-
168-
```bash
169-
npm test
170-
```
171-
172-
## 📦 Pull Request Process
173-
174-
1. **Fork** the repository
175-
2. **Create a feature branch** (`git checkout -b feature/prayer-name`)
176-
3. **Add your prayer** following the guidelines above
177-
4. **Run validation** (`npm run validate`)
178-
5. **Run tests** (`npm test`)
179-
6. **Commit your changes** with a clear message
180-
7. **Push to your fork** (`git push origin feature/prayer-name`)
181-
8. **Create a Pull Request**
182-
183-
### PR Requirements
184-
- All validation checks must pass
185-
- Include a clear description of what was added/changed
186-
- Reference any related issues
187-
- For prayer additions, include source/reference information
188-
189-
## 🎖️ Recognition
190-
191-
Contributors will be acknowledged in:
192-
- Git commit history
193-
- Release notes for significant contributions
194-
- Special recognition for substantial prayer additions or improvements
195-
196-
## 📞 Questions?
197-
198-
- **General questions**: Open a GitHub Discussion
199-
- **Bug reports**: Use the Bug Report issue template
200-
- **Prayer requests**: Use the Prayer Request issue template
201-
- **Translation help**: Use the Translation Request issue template
202-
203-
## 📜 License
204-
205-
By contributing, you agree that your contributions will be licensed under the CodexCommunion Digital Code License (CCCL) v1.0. Note that while the code and data structures are CCCL licensed, the prayer content itself consists of traditional Catholic prayers that are in the public domain.
206-
207-
## 🙏 Thank You
208-
209-
Thank you for helping preserve and share these sacred prayers with the world. Your contributions help make Catholic prayer resources more accessible to developers and the faithful worldwide.
210-
211-
---
212-
213-
*"Pray for us sinners, now and at the hour of our death. Amen."*

README.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,21 @@ const text: string | null = getPrayerText('hail-mary', 'la' as LanguageCode);
5858

5959
## Documentation
6060

61-
### 📚 Core Documentation
62-
63-
- **[Prayer Organization](docs/PRAYER_ORGANIZATION.md)** - Classification system, categories, labels, and importance levels
64-
- **[Data Structure](docs/DATA_STRUCTURE.md)** - Complete JSON schema, metadata fields, and content structure
65-
- **[API Reference](docs/API_REFERENCE.md)** - Complete API documentation with all functions and TypeScript types
66-
- **[Usage Examples](docs/USAGE_EXAMPLES.md)** - Code examples for Node.js, TypeScript, React, and Vue.js
67-
- **[Architecture](docs/ARCHITECTURE.md)** - Implementation details, build system, and performance optimization
68-
69-
### 🛠️ Additional Resources
70-
71-
- **[JSON Schema](SCHEMA.md)** - Formal JSON Schema for validation and IDE support
72-
- **[Contributing Guide](CONTRIBUTING.md)** - Guidelines for contributing to the project
73-
- **[Testing Guide](TESTING.md)** - Information about running tests and validation
74-
- **[Pending Prayers](pending_prayers.md)** - Upcoming prayers planned for future releases
61+
### For Users
62+
- **[API Reference](docs/API_REFERENCE.md)** → Points to [index.d.ts](index.d.ts) for complete API
63+
- **[Usage Examples](docs/USAGE_EXAMPLES.md)** → Quick-start code for Node.js, React, Vue
64+
- **[Prayer Organization](docs/PRAYER_ORGANIZATION.md)** → Classification system overview
65+
66+
### For Contributors
67+
- **[Contributing Guide](CONTRIBUTING.md)** → GitHub issue or PR workflow
68+
- **[Data Structure](docs/DATA_STRUCTURE.md)** → JSON prayer format
69+
- **[Architecture](docs/ARCHITECTURE.md)** → Build system and validation
70+
71+
### Reference Files (Self-Documenting)
72+
- **[index.d.ts](index.d.ts)** → TypeScript types and JSDoc for all functions
73+
- **[prayer-schema.json](prayer-schema.json)** → JSON Schema for validation and IDE autocomplete
74+
- **[lib/prayer-index.json](lib/prayer-index.json)** → Auto-generated list of all prayers
75+
- **[scripts/](scripts/)** → Build and validation implementation
7576

7677
## Key Concepts
7778

@@ -134,8 +135,6 @@ npm run test:browser # Test browser compatibility
134135

135136
VS Code users get automatic validation and auto-completion! The workspace is configured to use `prayer-schema.json` for all prayer files.
136137

137-
See [SCHEMA.md](SCHEMA.md) for details on JSON Schema validation.
138-
139138
### Adding New Prayers
140139

141140
1. Create JSON file in `prayers/` directory (filename must match prayer ID)
@@ -196,6 +195,3 @@ This license permits free use, modification, and distribution for any lawful pur
196195

197196
Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
198197

199-
---
200-
201-
**CodexCommunion** - Building tools for Catholic faith and tradition

0 commit comments

Comments
 (0)