axiodb 2.10.26 → 2.10.27

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.
Files changed (37) hide show
  1. package/package.json +1 -1
  2. package/Document/eslint.config.js +0 -28
  3. package/Document/index.html +0 -31
  4. package/Document/package-lock.json +0 -4254
  5. package/Document/package.json +0 -35
  6. package/Document/postcss.config.js +0 -6
  7. package/Document/public/AXioDB.png +0 -0
  8. package/Document/src/App.tsx +0 -39
  9. package/Document/src/Assets/AXioDB.png +0 -0
  10. package/Document/src/components/content/AdvancedFeatures.tsx +0 -318
  11. package/Document/src/components/content/ApiReference.tsx +0 -319
  12. package/Document/src/components/content/Community.tsx +0 -203
  13. package/Document/src/components/content/Comparison.tsx +0 -227
  14. package/Document/src/components/content/CreateCollection.tsx +0 -59
  15. package/Document/src/components/content/CreateDatabase.tsx +0 -57
  16. package/Document/src/components/content/Features.tsx +0 -263
  17. package/Document/src/components/content/Installation.tsx +0 -67
  18. package/Document/src/components/content/Introduction.tsx +0 -107
  19. package/Document/src/components/content/MaintainersZone.tsx +0 -142
  20. package/Document/src/components/content/PainPoints.tsx +0 -126
  21. package/Document/src/components/content/Security.tsx +0 -137
  22. package/Document/src/components/content/Usage.tsx +0 -247
  23. package/Document/src/components/layout/Header.tsx +0 -154
  24. package/Document/src/components/layout/Layout.tsx +0 -91
  25. package/Document/src/components/layout/Sidebar.tsx +0 -185
  26. package/Document/src/components/ui/Button.tsx +0 -45
  27. package/Document/src/components/ui/CodeBlock.tsx +0 -41
  28. package/Document/src/context/ThemeContext.tsx +0 -71
  29. package/Document/src/hooks/useTheme.tsx +0 -12
  30. package/Document/src/index.css +0 -3
  31. package/Document/src/main.tsx +0 -10
  32. package/Document/src/styles/global.css +0 -18
  33. package/Document/src/vite-env.d.ts +0 -1
  34. package/Document/tailwind.config.js +0 -9
  35. package/Document/tsconfig.app.json +0 -24
  36. package/Document/tsconfig.node.json +0 -22
  37. package/Document/vite.config.ts +0 -40
@@ -1,319 +0,0 @@
1
- import React, { useState } from "react";
2
- import { BookOpen, ChevronDown, ChevronRight } from "lucide-react";
3
-
4
- interface ApiSection {
5
- title: string;
6
- methods: ApiMethod[];
7
- }
8
-
9
- interface ApiMethod {
10
- name: string;
11
- signature: string;
12
- description: string;
13
- example?: string;
14
- returns: string;
15
- }
16
-
17
- const ApiReference: React.FC = () => {
18
- const [expandedSections, setExpandedSections] = useState<string[]>([]);
19
- const [expandedMethods, setExpandedMethods] = useState<string[]>([]);
20
-
21
- const toggleSection = (section: string) => {
22
- setExpandedSections((prev) =>
23
- prev.includes(section)
24
- ? prev.filter((s) => s !== section)
25
- : [...prev, section],
26
- );
27
- };
28
-
29
- const toggleMethod = (method: string) => {
30
- setExpandedMethods((prev) =>
31
- prev.includes(method)
32
- ? prev.filter((m) => m !== method)
33
- : [...prev, method],
34
- );
35
- };
36
-
37
- const apiSections: ApiSection[] = [
38
- {
39
- title: "AxioDB",
40
- methods: [
41
- {
42
- name: "createDB",
43
- signature: "createDB(dbName: string): Promise<Database>",
44
- description: "Creates a new database with the specified name.",
45
- example: "const db1 = await db.createDB('myDatabase');",
46
- returns:
47
- "Promise<Database>: A promise that resolves to a Database instance.",
48
- },
49
- {
50
- name: "deleteDatabase",
51
- signature:
52
- "deleteDatabase(dbName: string): Promise<SuccessInterface | ErrorInterface>",
53
- description: "Deletes an existing database by name.",
54
- example: "const result = await db.deleteDatabase('myDatabase');",
55
- returns:
56
- "Promise<SuccessInterface | ErrorInterface>: A promise that resolves to a success or error object.",
57
- },
58
- ],
59
- },
60
- {
61
- title: "Database",
62
- methods: [
63
- {
64
- name: "createCollection",
65
- signature:
66
- "createCollection(name: string, schema: object, crypto?: boolean, key?: string): Promise<Collection>",
67
- description:
68
- "Creates a new collection with an optional schema and encryption.",
69
- example:
70
- "const collection = await db1.createCollection('users', userSchema, true, 'secretKey');",
71
- returns:
72
- "Promise<Collection>: A promise that resolves to a Collection instance.",
73
- },
74
- {
75
- name: "deleteCollection",
76
- signature:
77
- "deleteCollection(name: string): Promise<SuccessInterface | ErrorInterface>",
78
- description: "Deletes an existing collection by name.",
79
- example: "const result = await db1.deleteCollection('users');",
80
- returns:
81
- "Promise<SuccessInterface | ErrorInterface>: A promise that resolves to a success or error object.",
82
- },
83
- {
84
- name: "getCollectionInfo",
85
- signature: "getCollectionInfo(): Promise<SuccessInterface>",
86
- description:
87
- "Retrieves information about all collections in the database.",
88
- example: "const info = await db1.getCollectionInfo();",
89
- returns:
90
- "Promise<SuccessInterface>: A promise that resolves to a success object with collection information.",
91
- },
92
- ],
93
- },
94
- {
95
- title: "Collection",
96
- methods: [
97
- {
98
- name: "insert",
99
- signature:
100
- "insert(data: object): Promise<SuccessInterface | ErrorInterface>",
101
- description: "Inserts a document into the collection.",
102
- example:
103
- "const result = await collection.insert({ name: 'John', age: 30 });",
104
- returns:
105
- "Promise<SuccessInterface | ErrorInterface>: A promise that resolves to a success or error object.",
106
- },
107
- {
108
- name: "query",
109
- signature: "query(query: object): Reader",
110
- description: "Initiates a query operation on the collection.",
111
- example: "const query = collection.query({ age: { $gt: 25 } });",
112
- returns: "Reader: A Reader instance for chaining query operations.",
113
- },
114
- {
115
- name: "update",
116
- signature: "update(query: object): Updater",
117
- description: "Initiates an update operation on the collection.",
118
- example: "const updater = collection.update({ name: 'John' });",
119
- returns:
120
- "Updater: An Updater instance for chaining update operations.",
121
- },
122
- {
123
- name: "delete",
124
- signature: "delete(query: object): Deleter",
125
- description: "Initiates a delete operation on the collection.",
126
- example: "const deleter = collection.delete({ age: { $lt: 18 } });",
127
- returns:
128
- "Deleter: A Deleter instance for chaining delete operations.",
129
- },
130
- {
131
- name: "aggregate",
132
- signature: "aggregate(pipeline: object[]): Aggregation",
133
- description: "Initiates an aggregation operation on the collection.",
134
- example:
135
- "const agg = collection.aggregate([{ $match: { age: { $gt: 25 } } }]);",
136
- returns:
137
- "Aggregation: An Aggregation instance for chaining aggregation operations.",
138
- },
139
- ],
140
- },
141
- {
142
- title: "Reader",
143
- methods: [
144
- {
145
- name: "Limit",
146
- signature: "Limit(limit: number): Reader",
147
- description: "Sets a limit on the number of documents to return.",
148
- example: "const query = collection.query({}).Limit(10);",
149
- returns: "Reader: The Reader instance for chaining.",
150
- },
151
- {
152
- name: "Skip",
153
- signature: "Skip(skip: number): Reader",
154
- description: "Sets the number of documents to skip.",
155
- example: "const query = collection.query({}).Skip(10);",
156
- returns: "Reader: The Reader instance for chaining.",
157
- },
158
- {
159
- name: "Sort",
160
- signature: "Sort(sort: object): Reader",
161
- description: "Sets the sort order for the query results.",
162
- example: "const query = collection.query({}).Sort({ age: -1 });",
163
- returns: "Reader: The Reader instance for chaining.",
164
- },
165
- {
166
- name: "setCount",
167
- signature: "setCount(count: boolean): Reader",
168
- description: "Sets whether to return the count of documents.",
169
- example: "const query = collection.query({}).setCount(true);",
170
- returns: "Reader: The Reader instance for chaining.",
171
- },
172
- {
173
- name: "setProject",
174
- signature: "setProject(project: object): Reader",
175
- description: "Sets the projection for the query results.",
176
- example:
177
- "const query = collection.query({}).setProject({ name: 1, age: 1 });",
178
- returns: "Reader: The Reader instance for chaining.",
179
- },
180
- {
181
- name: "exec",
182
- signature: "exec(): Promise<SuccessInterface | ErrorInterface>",
183
- description: "Executes the query and returns the results.",
184
- example: "const results = await collection.query({}).exec();",
185
- returns:
186
- "Promise<SuccessInterface | ErrorInterface>: A promise that resolves to a success or error object.",
187
- },
188
- ],
189
- },
190
- ];
191
-
192
- return (
193
- <section id="api-reference" className="pt-12 scroll-mt-20">
194
- <h2 className="text-3xl font-bold mb-6 flex items-center gap-2">
195
- <BookOpen className="h-8 w-8 text-blue-500" />
196
- API Reference
197
- </h2>
198
-
199
- <p className="text-gray-700 dark:text-gray-300 mb-6">
200
- This comprehensive API reference documents all the classes, methods, and
201
- interfaces available in AxioDB.
202
- </p>
203
-
204
- <div className="space-y-6">
205
- {apiSections.map((section) => (
206
- <div
207
- key={section.title}
208
- className="bg-white dark:bg-gray-800 rounded-lg shadow-md border border-gray-100 dark:border-gray-700 overflow-hidden"
209
- >
210
- <button
211
- className="flex items-center justify-between w-full p-4 text-left bg-gray-50 dark:bg-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600"
212
- onClick={() => toggleSection(section.title)}
213
- >
214
- <h3 className="text-xl font-semibold text-gray-900 dark:text-white">
215
- {section.title}
216
- </h3>
217
- {expandedSections.includes(section.title) ? (
218
- <ChevronDown size={20} className="text-gray-500" />
219
- ) : (
220
- <ChevronRight size={20} className="text-gray-500" />
221
- )}
222
- </button>
223
-
224
- {expandedSections.includes(section.title) && (
225
- <div className="divide-y divide-gray-100 dark:divide-gray-700">
226
- {section.methods.map((method) => (
227
- <div key={`${section.title}-${method.name}`} className="p-4">
228
- <button
229
- className="flex items-center justify-between w-full text-left mb-2"
230
- onClick={() =>
231
- toggleMethod(`${section.title}-${method.name}`)
232
- }
233
- >
234
- <div className="flex items-center">
235
- <span className="font-mono text-blue-600 dark:text-blue-400 font-medium">
236
- {method.name}
237
- </span>
238
- </div>
239
- {expandedMethods.includes(
240
- `${section.title}-${method.name}`,
241
- ) ? (
242
- <ChevronDown size={16} className="text-gray-500" />
243
- ) : (
244
- <ChevronRight size={16} className="text-gray-500" />
245
- )}
246
- </button>
247
-
248
- <div
249
- className={`overflow-hidden transition-all duration-300 ${
250
- expandedMethods.includes(
251
- `${section.title}-${method.name}`,
252
- )
253
- ? "max-h-[500px]"
254
- : "max-h-0"
255
- }`}
256
- >
257
- <div className="pt-2 space-y-3">
258
- <div>
259
- <h4 className="text-sm font-semibold text-gray-500 dark:text-gray-400 mb-1">
260
- Signature
261
- </h4>
262
- <pre className="bg-gray-100 dark:bg-gray-900 p-2 rounded-md overflow-x-auto">
263
- <code className="text-sm font-mono">
264
- {method.signature}
265
- </code>
266
- </pre>
267
- </div>
268
-
269
- <div>
270
- <h4 className="text-sm font-semibold text-gray-500 dark:text-gray-400 mb-1">
271
- Description
272
- </h4>
273
- <p className="text-gray-700 dark:text-gray-300">
274
- {method.description}
275
- </p>
276
- </div>
277
-
278
- {method.example && (
279
- <div>
280
- <h4 className="text-sm font-semibold text-gray-500 dark:text-gray-400 mb-1">
281
- Example
282
- </h4>
283
- <pre className="bg-gray-100 dark:bg-gray-900 p-2 rounded-md overflow-x-auto">
284
- <code className="text-sm font-mono">
285
- {method.example}
286
- </code>
287
- </pre>
288
- </div>
289
- )}
290
-
291
- <div>
292
- <h4 className="text-sm font-semibold text-gray-500 dark:text-gray-400 mb-1">
293
- Returns
294
- </h4>
295
- <p className="text-gray-700 dark:text-gray-300">
296
- {method.returns}
297
- </p>
298
- </div>
299
- </div>
300
- </div>
301
- </div>
302
- ))}
303
- </div>
304
- )}
305
- </div>
306
- ))}
307
- </div>
308
-
309
- <div className="mt-8 bg-blue-50 dark:bg-blue-900/20 rounded-lg p-4">
310
- <p className="text-gray-700 dark:text-gray-300">
311
- This API reference is continuously updated. For the most up-to-date
312
- information, refer to the official AxioDB documentation.
313
- </p>
314
- </div>
315
- </section>
316
- );
317
- };
318
-
319
- export default ApiReference;
@@ -1,203 +0,0 @@
1
- import React from "react";
2
- import { Users, GitPullRequest, Scale } from "lucide-react";
3
-
4
- const Community: React.FC = () => {
5
- return (
6
- <div>
7
- <section id="contributing" className="pt-12 scroll-mt-20">
8
- <h2 className="text-3xl font-bold mb-6 flex items-center gap-2">
9
- <GitPullRequest className="h-8 w-8 text-blue-500" />
10
- Contributing
11
- </h2>
12
-
13
- <p className="text-gray-700 dark:text-gray-300 mb-6">
14
- We welcome contributions from the community! Whether it's code
15
- improvements, documentation updates, bug reports, or feature
16
- suggestions, your input helps make AxioDB better.
17
- </p>
18
-
19
- <div className="bg-white dark:bg-gray-800 rounded-lg p-6 shadow-md border border-gray-100 dark:border-gray-700 mb-8">
20
- <h3 className="text-xl font-semibold mb-4">How to Contribute</h3>
21
-
22
- <div className="space-y-4">
23
- <div>
24
- <h4 className="font-semibold text-gray-900 dark:text-white mb-2">
25
- 1. Fork the Repository
26
- </h4>
27
- <p className="text-gray-700 dark:text-gray-300">
28
- Start by forking the repository on GitHub to your own account.
29
- </p>
30
- </div>
31
-
32
- <div>
33
- <h4 className="font-semibold text-gray-900 dark:text-white mb-2">
34
- 2. Create a Branch
35
- </h4>
36
- <p className="text-gray-700 dark:text-gray-300">
37
- Create a branch for your contribution with a descriptive name
38
- related to the changes you're making.
39
- </p>
40
- </div>
41
-
42
- <div>
43
- <h4 className="font-semibold text-gray-900 dark:text-white mb-2">
44
- 3. Make Your Changes
45
- </h4>
46
- <p className="text-gray-700 dark:text-gray-300">
47
- Implement your changes, following the project's coding standards
48
- and guidelines.
49
- </p>
50
- </div>
51
-
52
- <div>
53
- <h4 className="font-semibold text-gray-900 dark:text-white mb-2">
54
- 4. Write Tests
55
- </h4>
56
- <p className="text-gray-700 dark:text-gray-300">
57
- Add tests to cover your changes and ensure that all existing
58
- tests pass.
59
- </p>
60
- </div>
61
-
62
- <div>
63
- <h4 className="font-semibold text-gray-900 dark:text-white mb-2">
64
- 5. Submit a Pull Request
65
- </h4>
66
- <p className="text-gray-700 dark:text-gray-300">
67
- Open a pull request with a clear description of the changes and
68
- any relevant issue numbers.
69
- </p>
70
- </div>
71
- </div>
72
- </div>
73
-
74
- <p className="text-gray-700 dark:text-gray-300">
75
- For more detailed guidelines, please read the{" "}
76
- <a
77
- href="#"
78
- className="text-blue-500 hover:text-blue-600 dark:text-blue-400 dark:hover:text-blue-300"
79
- >
80
- CONTRIBUTING.md
81
- </a>{" "}
82
- file in the project repository.
83
- </p>
84
- </section>
85
-
86
- <section id="license" className="pt-12 scroll-mt-20">
87
- <h2 className="text-3xl font-bold mb-6 flex items-center gap-2">
88
- <Scale className="h-8 w-8 text-green-500" />
89
- License
90
- </h2>
91
-
92
- <div className="bg-white dark:bg-gray-800 rounded-lg p-6 shadow-md border border-gray-100 dark:border-gray-700 mb-6">
93
- <p className="text-gray-700 dark:text-gray-300">
94
- This project is licensed under the MIT License. The MIT License is a
95
- permissive license that allows for reuse with few restrictions. It
96
- permits users to use, copy, modify, merge, publish, distribute,
97
- sublicense, and/or sell copies of the software.
98
- </p>
99
-
100
- <pre className="bg-gray-100 dark:bg-gray-900 p-4 rounded-md mt-4 overflow-x-auto text-sm font-mono">
101
- {`MIT License
102
-
103
- Copyright (c) 2023 AxioDB Contributors
104
-
105
- Permission is hereby granted, free of charge, to any person obtaining a copy
106
- of this software and associated documentation files (the "Software"), to deal
107
- in the Software without restriction, including without limitation the rights
108
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
109
- copies of the Software, and to permit persons to whom the Software is
110
- furnished to do so, subject to the following conditions:
111
-
112
- The above copyright notice and this permission notice shall be included in all
113
- copies or substantial portions of the Software.
114
-
115
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
116
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
117
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
118
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
119
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
120
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
121
- SOFTWARE.`}
122
- </pre>
123
- </div>
124
-
125
- <p className="text-gray-700 dark:text-gray-300">
126
- For more details, see the{" "}
127
- <a
128
- href="#"
129
- className="text-blue-500 hover:text-blue-600 dark:text-blue-400 dark:hover:text-blue-300"
130
- >
131
- LICENSE
132
- </a>{" "}
133
- file in the project repository.
134
- </p>
135
- </section>
136
-
137
- <section id="acknowledgments" className="pt-12 scroll-mt-20">
138
- <h2 className="text-3xl font-bold mb-6 flex items-center gap-2">
139
- <Users className="h-8 w-8 text-purple-500" />
140
- Acknowledgments
141
- </h2>
142
-
143
- <p className="text-gray-700 dark:text-gray-300 mb-6">
144
- Special thanks to all contributors and supporters of AxioDB. Your
145
- feedback and contributions make this project better!
146
- </p>
147
-
148
- <div className="bg-white dark:bg-gray-800 rounded-lg p-6 shadow-md border border-gray-100 dark:border-gray-700 mb-6">
149
- <h3 className="text-xl font-semibold mb-4">Contributors</h3>
150
-
151
- <div className="flex flex-wrap gap-4">
152
- <div className="flex items-center gap-2">
153
- <img
154
- src="https://github.com/ankansaha.png"
155
- alt="Ankan Saha"
156
- className="w-10 h-10 rounded-full"
157
- />
158
- <div className="flex flex-col">
159
- <a
160
- href="https://github.com/AnkanSaha"
161
- target="_blank"
162
- rel="noopener noreferrer"
163
- >
164
- <p className="font-medium text-gray-900 dark:text-white">
165
- Ankan Saha
166
- </p>
167
- </a>
168
- <p className="text-sm text-gray-500 dark:text-gray-400">
169
- Project Lead
170
- </p>
171
- </div>
172
- </div>
173
-
174
- <div className="flex items-center gap-2">
175
- <div className="w-10 h-10 rounded-full bg-gray-200 dark:bg-gray-700 flex items-center justify-center">
176
- <Users className="h-6 w-6 text-gray-500 dark:text-gray-400" />
177
- </div>
178
- <div>
179
- <p className="font-medium text-gray-900 dark:text-white">
180
- Community Contributors
181
- </p>
182
- <p className="text-sm text-gray-500 dark:text-gray-400">
183
- Various Contributors
184
- </p>
185
- </div>
186
- </div>
187
- </div>
188
- </div>
189
-
190
- <div className="bg-purple-50 dark:bg-purple-900/20 border-l-4 border-purple-500 p-4 rounded-r-lg">
191
- <p className="text-gray-700 dark:text-gray-300">
192
- AxioDB is inspired by the best practices and patterns from popular
193
- databases like MongoDB, while bringing its own unique approach to
194
- the NoSQL database space. We're grateful to the broader open-source
195
- community for paving the way for projects like this.
196
- </p>
197
- </div>
198
- </section>
199
- </div>
200
- );
201
- };
202
-
203
- export default Community;