sunnah 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of sunnah might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/README.md +207 -0
  2. package/package.json +20 -0
package/README.md ADDED
@@ -0,0 +1,207 @@
1
+ <div align="center">
2
+
3
+ <h1>πŸ“Ώ Sunnah</h1>
4
+
5
+ ![npm version](https://img.shields.io/badge/npm-coming%20soon-orange?style=for-the-badge&logo=npm)
6
+ ![license](https://img.shields.io/badge/license-AGPL--3.0-blue?style=for-the-badge&logo=gnu)
7
+ ![status](https://img.shields.io/badge/status-in%20development-yellow?style=for-the-badge)
8
+ ![GitHub stars](https://img.shields.io/github/stars/SENODROOM/sunnah?style=for-the-badge&logo=github)
9
+
10
+ **πŸ“š One package. Every major Hadith collection. CLI, Node.js, React, Vue β€” all supported.**
11
+
12
+ _Coming soon to npm_
13
+
14
+ </div>
15
+
16
+ ---
17
+
18
+ ## πŸŒ™ What is Sunnah?
19
+
20
+ `sunnah` is an upcoming npm package that gives developers programmatic access to the major hadith collections of Islam β€” in one unified, consistent API. Whether you're building a web app, a mobile app, a CLI tool, or a backend API, `sunnah` will be the single source for all authentic hadith literature.
21
+
22
+ ---
23
+
24
+ ## πŸ“š Planned Hadith Collections
25
+
26
+ | Book | Author | Hadiths | Status |
27
+ | --------------------- | --------------- | ------- | --------------------------------------------------------------------------------- |
28
+ | **Sahih al-Bukhari** | Imam al-Bukhari | 7,277 | βœ… Available ([sahih-al-bukhari](https://www.npmjs.com/package/sahih-al-bukhari)) |
29
+ | **Sahih Muslim** | Imam Muslim | 7,563 | πŸ”œ Coming Soon |
30
+ | **Sunan Abu Dawud** | Abu Dawud | 5,274 | πŸ”œ Coming Soon |
31
+ | **Jami at-Tirmidhi** | Imam Tirmidhi | 3,956 | πŸ”œ Coming Soon |
32
+ | **Sunan an-Nasa'i** | Imam an-Nasa'i | 5,758 | πŸ”œ Coming Soon |
33
+ | **Sunan Ibn Majah** | Ibn Majah | 4,341 | πŸ”œ Coming Soon |
34
+ | **Muwatta Malik** | Imam Malik | 1,832 | πŸ”œ Coming Soon |
35
+ | **Musnad Ahmad** | Imam Ahmad | 27,000+ | πŸ”œ Coming Soon |
36
+ | **Riyad as-Salihin** | Imam an-Nawawi | 1,896 | πŸ”œ Coming Soon |
37
+ | **Al-Adab Al-Mufrad** | Imam al-Bukhari | 1,322 | πŸ”œ Coming Soon |
38
+
39
+ ---
40
+
41
+ ## πŸš€ Planned API
42
+
43
+ ### Install a specific book
44
+
45
+ ```bash
46
+ # Install the full package
47
+ npm install sunnah
48
+
49
+ # Or install globally for CLI access
50
+ npm install -g sunnah
51
+ ```
52
+
53
+ ### CLI β€” download and browse any book
54
+
55
+ ```bash
56
+ # Download a hadith book
57
+ sunnah download bukhari
58
+ sunnah download muslim
59
+ sunnah download tirmidhi
60
+
61
+ # Browse hadiths
62
+ sunnah bukhari 1
63
+ sunnah muslim 2345 --arabic
64
+ sunnah tirmidhi 23 34 --both
65
+
66
+ # List all available books
67
+ sunnah list
68
+
69
+ # Show help
70
+ sunnah --help
71
+ ```
72
+
73
+ ### Node.js
74
+
75
+ ```javascript
76
+ import { bukhari, muslim, tirmidhi } from "sunnah";
77
+
78
+ // Each book has the same consistent API
79
+ console.log(bukhari.get(1));
80
+ console.log(muslim.search("prayer"));
81
+ console.log(tirmidhi.getRandom());
82
+ console.log(tirmidhi.getByChapter(3));
83
+
84
+ // Or import all books at once
85
+ import sunnah from "sunnah";
86
+ sunnah.bukhari.get(1);
87
+ sunnah.muslim.get(1);
88
+ ```
89
+
90
+ ### React β€” one command setup
91
+
92
+ ```bash
93
+ # Inside your React project
94
+ sunnah --react
95
+ ```
96
+
97
+ Generates hooks for every book:
98
+
99
+ ```jsx
100
+ import { useBukhari, useMuslim, useTirmidhi } from "../hooks/useSunnah";
101
+
102
+ function HadithComponent() {
103
+ const bukhari = useBukhari();
104
+ const muslim = useMuslim();
105
+
106
+ if (!bukhari || !muslim) return <p>Loading...</p>;
107
+
108
+ return (
109
+ <div>
110
+ <p>{bukhari.getRandom().english.text}</p>
111
+ <p>{muslim.getRandom().english.text}</p>
112
+ </div>
113
+ );
114
+ }
115
+ ```
116
+
117
+ ---
118
+
119
+ ## πŸ”§ Planned Features
120
+
121
+ - πŸ“¦ **One package** β€” all major hadith collections in a single install
122
+ - ⚑ **Tiny install** β€” data loads from CDN, not bundled into your app
123
+ - 🌐 **Bilingual** β€” Arabic text + English translation for every collection
124
+ - πŸ” **Unified search** β€” search across a single book or all books at once
125
+ - πŸ–₯️ **CLI** β€” read any hadith from your terminal
126
+ - βš›οΈ **React/Vue hooks** β€” auto-generated with one command
127
+ - πŸ“˜ **TypeScript** β€” full type definitions
128
+ - πŸ”§ **Zero dependencies** β€” no external packages required
129
+ - 🌍 **Universal** β€” Node.js CJS, Node.js ESM, React, Vue, Vite, webpack
130
+
131
+ ---
132
+
133
+ ## πŸ—ΊοΈ Roadmap
134
+
135
+ - [x] **v1.0** β€” Sahih al-Bukhari released as standalone package
136
+ - [ ] **v2.0** β€” Sahih Muslim added
137
+ - [ ] **v2.5** β€” Abu Dawud, Tirmidhi, Nasa'i, Ibn Majah added (the Six Books)
138
+ - [ ] **v3.0** β€” Muwatta Malik, Musnad Ahmad, Riyad as-Salihin added
139
+ - [ ] **v4.0** β€” Cross-book search, shared narrator index, topic tagging
140
+ - [ ] **v5.0** β€” Full sunnah.com-style grading and chain of narration data
141
+
142
+ ---
143
+
144
+ ## πŸ“¦ Current Package
145
+
146
+ If you need Sahih al-Bukhari right now, it is already available as a standalone package:
147
+
148
+ ```bash
149
+ npm install sahih-al-bukhari
150
+ npm install -g sahih-al-bukhari
151
+ ```
152
+
153
+ [![sahih-al-bukhari on npm](https://img.shields.io/npm/v/sahih-al-bukhari?style=for-the-badge&logo=npm&label=sahih-al-bukhari)](https://www.npmjs.com/package/sahih-al-bukhari)
154
+
155
+ Full documentation β†’ [sahih-al-bukhari README](https://github.com/SENODROOM/sahih-al-bukhari)
156
+
157
+ ---
158
+
159
+ ## πŸ”” Stay Updated
160
+
161
+ Watch this repository to get notified when `sunnah` launches on npm.
162
+
163
+ [![GitHub stars](https://img.shields.io/github/stars/SENODROOM/sunnah?style=for-the-badge&logo=github)](https://github.com/SENODROOM/sunnah)
164
+ [![GitHub watchers](https://img.shields.io/github/watchers/SENODROOM/sunnah?style=for-the-badge&logo=github)](https://github.com/SENODROOM/sunnah)
165
+
166
+ ---
167
+
168
+ ## 🀝 Contributing
169
+
170
+ Want to help build this? Contributions are very welcome.
171
+
172
+ - πŸ“– **Data** β€” Help format and verify hadith collections
173
+ - πŸ’» **Code** β€” Build the package infrastructure
174
+ - πŸ“š **Docs** β€” Write documentation and examples
175
+ - πŸ› **Issues** β€” Report bugs or suggest features
176
+
177
+ 1. Fork the repository
178
+ 2. Create a branch: `git checkout -b feature/muslim-collection`
179
+ 3. Commit: `git commit -m 'Add Sahih Muslim data'`
180
+ 4. Push and open a Pull Request
181
+
182
+ ---
183
+
184
+ ## πŸ“„ License
185
+
186
+ Licensed under the **GNU Affero General Public License v3.0 (AGPL-3.0)** β€” see [LICENSE](LICENSE) for details.
187
+
188
+ ---
189
+
190
+ ## πŸ™ Acknowledgments
191
+
192
+ - **πŸ“– Sources** β€” The authentic hadith collections of Islam
193
+ - **πŸ‘¨β€πŸ« Scholars** β€” Translators and Islamic scholars whose work makes this possible
194
+ - **πŸ’š Community** β€” The Muslim developer community worldwide
195
+
196
+ ---
197
+
198
+ <div align="center">
199
+
200
+ **Made with ❀️ for the Muslim community | Seeking knowledge together**
201
+
202
+ [πŸš€ Current Package](https://www.npmjs.com/package/sahih-al-bukhari) β€’
203
+ [πŸ“‹ Roadmap](#️-roadmap) β€’
204
+ [🀝 Contribute](#-contributing) β€’
205
+ [πŸ”” Watch for Updates](https://github.com/SENODROOM/sunnah)
206
+
207
+ </div>
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "sunnah",
3
+ "version": "1.0.0",
4
+ "description": "One package. Every major Hadith collection. CLI, Node.js, React, Vue β€” all supported",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/SENODROOM/sunnah.git"
12
+ },
13
+ "keywords": [],
14
+ "author": "",
15
+ "license": "ISC",
16
+ "bugs": {
17
+ "url": "https://github.com/SENODROOM/sunnah/issues"
18
+ },
19
+ "homepage": "https://github.com/SENODROOM/sunnah#readme"
20
+ }