axiodb 2.10.25 → 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,35 +0,0 @@
1
- {
2
- "name": "vite-react-typescript-starter",
3
- "private": true,
4
- "version": "2.1.11",
5
- "type": "module",
6
- "scripts": {
7
- "dev": "vite --host",
8
- "build": "vite build",
9
- "lint": "eslint .",
10
- "preview": "vite preview"
11
- },
12
- "dependencies": {
13
- "lucide-react": "^0.344.0",
14
- "react": "^18.3.1",
15
- "react-dom": "^18.3.1",
16
- "react-icons": "^5.5.0",
17
- "react-router-dom": "^6.22.3"
18
- },
19
- "devDependencies": {
20
- "@eslint/js": "^9.9.1",
21
- "@types/react": "^18.3.5",
22
- "@types/react-dom": "^18.3.0",
23
- "@vitejs/plugin-react": "^4.4.1",
24
- "autoprefixer": "^10.4.18",
25
- "eslint": "^9.9.1",
26
- "eslint-plugin-react-hooks": "^5.1.0-rc.0",
27
- "eslint-plugin-react-refresh": "^0.4.11",
28
- "globals": "^15.9.0",
29
- "postcss": "^8.4.35",
30
- "tailwindcss": "^3.4.1",
31
- "typescript": "^5.5.3",
32
- "typescript-eslint": "^8.3.0",
33
- "vite": "^6.3.4"
34
- }
35
- }
@@ -1,6 +0,0 @@
1
- export default {
2
- plugins: {
3
- tailwindcss: {},
4
- autoprefixer: {}
5
- }
6
- }
Binary file
@@ -1,39 +0,0 @@
1
- import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
2
- import Layout from "./components/layout/Layout";
3
- import Introduction from "./components/content/Introduction";
4
- import Features from "./components/content/Features";
5
- import Installation from "./components/content/Installation";
6
- import Usage from "./components/content/Usage";
7
- import AdvancedFeatures from "./components/content/AdvancedFeatures";
8
- import ApiReference from "./components/content/ApiReference";
9
- import Security from "./components/content/Security";
10
- import Community from "./components/content/Community";
11
- import Comparison from "./components/content/Comparison";
12
- import CreateDatabase from "./components/content/CreateDatabase";
13
- import CreateCollection from "./components/content/CreateCollection";
14
- import MaintainersZone from "./components/content/MaintainersZone";
15
-
16
- function App() {
17
- return (
18
- <Router>
19
- <Layout>
20
- <Routes>
21
- <Route path="/" element={<Introduction />} />
22
- <Route path="/features" element={<Features />} />
23
- <Route path="/installation" element={<Installation />} />
24
- <Route path="/usage" element={<Usage />} />
25
- <Route path="/advanced-features" element={<AdvancedFeatures />} />
26
- <Route path="/api-reference" element={<ApiReference />} />
27
- <Route path="/security" element={<Security />} />
28
- <Route path="/community" element={<Community />} />
29
- <Route path="/comparison" element={<Comparison />} />
30
- <Route path="/create-database" element={<CreateDatabase />} />
31
- <Route path="/create-collection" element={<CreateCollection />} />
32
- <Route path="/maintainers-zone" element={<MaintainersZone />} />
33
- </Routes>
34
- </Layout>
35
- </Router>
36
- );
37
- }
38
-
39
- export default App;
Binary file
@@ -1,318 +0,0 @@
1
- import React, { useState } from "react";
2
- import { Rocket, Code, Lock, RefreshCw, Database } from "lucide-react";
3
- import CodeBlock from "../ui/CodeBlock";
4
- import Button from "../ui/Button";
5
-
6
- const AdvancedFeatures: React.FC = () => {
7
- const [activeFeature, setActiveFeature] = useState<string>("multi-db");
8
-
9
- const featuresCode = {
10
- "multi-db": `const { AxioDB, SchemaTypes } = require("axiodb");
11
-
12
- const db = new AxioDB();
13
-
14
- const setup = async () => {
15
- const schema = {
16
- name: SchemaTypes.string().required().max(15),
17
- age: SchemaTypes.number().required().min(18),
18
- };
19
-
20
- const DB1 = await db.createDB("DB1");
21
- const collection1 = await DB1.createCollection(
22
- "collection1",
23
- schema,
24
- true,
25
- "secretKey",
26
- );
27
-
28
- // Insert data
29
- for (let i = 0; i < 300; i++) {
30
- await collection1.insert({ name: \`User\${i}\`, age: i + 18 });
31
- }
32
-
33
- // Query data
34
- const results = await collection1
35
- .query({})
36
- .Sort({ age: -1 })
37
- .Limit(10)
38
- .exec();
39
- console.log("Query Results:", results);
40
-
41
- // Delete collection
42
- await DB1.deleteCollection("collection1");
43
- };
44
-
45
- setup();`,
46
- aggregation: `const aggregationResult = await collection1
47
- .aggregate([
48
- { $match: { name: { $regex: "User" } } },
49
- { $project: { name: 1, age: 1 } },
50
- { $sort: { age: -1 } },
51
- { $limit: 10 },
52
- ])
53
- .exec();
54
-
55
- console.log("Aggregation Result:", aggregationResult);`,
56
- encryption: `const encryptedCollection = await DB1.createCollection(
57
- "secureCollection",
58
- schema,
59
- true,
60
- "mySecretKey",
61
- );
62
-
63
- // Insert encrypted data
64
- await encryptedCollection.insert({ name: "Encrypted User", age: 25 });
65
-
66
- // Query encrypted data
67
- const encryptedResult = await encryptedCollection.query({ age: 25 }).exec();
68
- console.log("Encrypted Query Result:", encryptedResult);`,
69
- operations: `// Update a single document
70
- await collection1
71
- .update({ age: 20 })
72
- .UpdateOne({ name: "Updated User", gender: "Male" });
73
-
74
- // Update multiple documents
75
- await collection1
76
- .update({ name: { $regex: "User" } })
77
- .UpdateMany({ isActive: true });
78
-
79
- // Delete a single document
80
- await collection1.delete({ name: "User1" }).deleteOne();
81
-
82
- // Delete multiple documents
83
- await collection1.delete({ age: { $lt: 25 } }).deleteMany();`,
84
- };
85
-
86
- return (
87
- <section id="advanced-features" className="pt-12 scroll-mt-20">
88
- <h2 className="text-3xl font-bold mb-6 flex items-center gap-2">
89
- <Rocket className="h-8 w-8 text-purple-500" />
90
- Advanced Features
91
- </h2>
92
-
93
- <p className="text-gray-700 dark:text-gray-300 mb-6">
94
- AxioDB provides a range of advanced features to handle complex database
95
- operations. Explore these features to unlock the full potential of
96
- AxioDB:
97
- </p>
98
-
99
- <div className="flex flex-wrap gap-2 mb-6">
100
- <Button
101
- variant={activeFeature === "multi-db" ? "primary" : "outline"}
102
- onClick={() => setActiveFeature("multi-db")}
103
- >
104
- Multiple Databases
105
- </Button>
106
- <Button
107
- variant={activeFeature === "aggregation" ? "primary" : "outline"}
108
- onClick={() => setActiveFeature("aggregation")}
109
- >
110
- Aggregation
111
- </Button>
112
- <Button
113
- variant={activeFeature === "encryption" ? "primary" : "outline"}
114
- onClick={() => setActiveFeature("encryption")}
115
- >
116
- Encryption
117
- </Button>
118
- <Button
119
- variant={activeFeature === "operations" ? "primary" : "outline"}
120
- onClick={() => setActiveFeature("operations")}
121
- >
122
- Update & Delete
123
- </Button>
124
- </div>
125
-
126
- <div className="bg-white dark:bg-gray-800 rounded-lg p-6 shadow-md border border-gray-100 dark:border-gray-700 mb-8">
127
- <h3 className="font-semibold text-lg mb-4">
128
- {activeFeature === "multi-db" &&
129
- "Creating Multiple Databases and Collections"}
130
- {activeFeature === "aggregation" && "Aggregation Pipelines"}
131
- {activeFeature === "encryption" && "Encryption"}
132
- {activeFeature === "operations" && "Update and Delete Operations"}
133
- </h3>
134
-
135
- <p className="text-gray-700 dark:text-gray-300 mb-4">
136
- {activeFeature === "multi-db" &&
137
- "Create and manage multiple databases and collections with different schemas and security settings:"}
138
- {activeFeature === "aggregation" &&
139
- "Perform advanced operations like filtering, sorting, grouping, and projecting data:"}
140
- {activeFeature === "encryption" &&
141
- "Enable encryption for sensitive data by providing a secret key during collection creation:"}
142
- {activeFeature === "operations" &&
143
- "Perform various update and delete operations on documents:"}
144
- </p>
145
-
146
- <CodeBlock
147
- code={featuresCode[activeFeature as keyof typeof featuresCode]}
148
- language="javascript"
149
- />
150
- </div>
151
-
152
- <div className="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8">
153
- <div className="bg-white dark:bg-gray-800 rounded-lg p-6 shadow-sm border border-gray-100 dark:border-gray-700">
154
- <div className="flex items-center gap-2 mb-3">
155
- <Code className="h-6 w-6 text-blue-500" />
156
- <h3 className="font-semibold text-lg">Custom Query Processing</h3>
157
- </div>
158
-
159
- <p className="text-gray-700 dark:text-gray-300 mb-3">
160
- AxioDB allows you to create complex queries with custom processing
161
- logic:
162
- </p>
163
-
164
- <ul className="space-y-1 list-disc pl-6 text-gray-700 dark:text-gray-300">
165
- <li>
166
- Use{" "}
167
- <code className="bg-gray-100 dark:bg-gray-900 px-1 py-0.5 rounded">
168
- $regex
169
- </code>{" "}
170
- for pattern matching
171
- </li>
172
- <li>
173
- Apply comparison operators like{" "}
174
- <code className="bg-gray-100 dark:bg-gray-900 px-1 py-0.5 rounded">
175
- $gt
176
- </code>
177
- ,{" "}
178
- <code className="bg-gray-100 dark:bg-gray-900 px-1 py-0.5 rounded">
179
- $lt
180
- </code>
181
- </li>
182
- <li>
183
- Project specific fields with{" "}
184
- <code className="bg-gray-100 dark:bg-gray-900 px-1 py-0.5 rounded">
185
- .setProject()
186
- </code>
187
- </li>
188
- <li>
189
- Count results with{" "}
190
- <code className="bg-gray-100 dark:bg-gray-900 px-1 py-0.5 rounded">
191
- .setCount()
192
- </code>
193
- </li>
194
- </ul>
195
- </div>
196
-
197
- <div className="bg-white dark:bg-gray-800 rounded-lg p-6 shadow-sm border border-gray-100 dark:border-gray-700">
198
- <div className="flex items-center gap-2 mb-3">
199
- <Lock className="h-6 w-6 text-green-500" />
200
- <h3 className="font-semibold text-lg">
201
- Advanced Schema Validation
202
- </h3>
203
- </div>
204
-
205
- <p className="text-gray-700 dark:text-gray-300 mb-3">
206
- Create robust schemas with advanced validation rules:
207
- </p>
208
-
209
- <ul className="space-y-1 list-disc pl-6 text-gray-700 dark:text-gray-300">
210
- <li>
211
- Type validation (
212
- <code className="bg-gray-100 dark:bg-gray-900 px-1 py-0.5 rounded">
213
- string()
214
- </code>
215
- ,{" "}
216
- <code className="bg-gray-100 dark:bg-gray-900 px-1 py-0.5 rounded">
217
- number()
218
- </code>
219
- , etc.)
220
- </li>
221
- <li>
222
- Required fields with{" "}
223
- <code className="bg-gray-100 dark:bg-gray-900 px-1 py-0.5 rounded">
224
- .required()
225
- </code>
226
- </li>
227
- <li>
228
- Value ranges with{" "}
229
- <code className="bg-gray-100 dark:bg-gray-900 px-1 py-0.5 rounded">
230
- .min()
231
- </code>{" "}
232
- and{" "}
233
- <code className="bg-gray-100 dark:bg-gray-900 px-1 py-0.5 rounded">
234
- .max()
235
- </code>
236
- </li>
237
- <li>
238
- Format validation with{" "}
239
- <code className="bg-gray-100 dark:bg-gray-900 px-1 py-0.5 rounded">
240
- .email()
241
- </code>
242
- </li>
243
- </ul>
244
- </div>
245
-
246
- <div className="bg-white dark:bg-gray-800 rounded-lg p-6 shadow-sm border border-gray-100 dark:border-gray-700">
247
- <div className="flex items-center gap-2 mb-3">
248
- <RefreshCw className="h-6 w-6 text-orange-500" />
249
- <h3 className="font-semibold text-lg">Performance Optimization</h3>
250
- </div>
251
-
252
- <p className="text-gray-700 dark:text-gray-300 mb-3">
253
- Optimize AxioDB performance for your specific use case:
254
- </p>
255
-
256
- <ul className="space-y-1 list-disc pl-6 text-gray-700 dark:text-gray-300">
257
- <li>
258
- Query by{" "}
259
- <code className="bg-gray-100 dark:bg-gray-900 px-1 py-0.5 rounded">
260
- documentId
261
- </code>{" "}
262
- for fastest lookups
263
- </li>
264
- <li>
265
- Use{" "}
266
- <code className="bg-gray-100 dark:bg-gray-900 px-1 py-0.5 rounded">
267
- .Limit()
268
- </code>{" "}
269
- and{" "}
270
- <code className="bg-gray-100 dark:bg-gray-900 px-1 py-0.5 rounded">
271
- .Skip()
272
- </code>{" "}
273
- for pagination
274
- </li>
275
- <li>
276
- Leverage{" "}
277
- <code className="bg-gray-100 dark:bg-gray-900 px-1 py-0.5 rounded">
278
- InMemoryCache
279
- </code>{" "}
280
- for frequent queries
281
- </li>
282
- <li>Structure data for optimal querying patterns</li>
283
- </ul>
284
- </div>
285
-
286
- <div className="bg-white dark:bg-gray-800 rounded-lg p-6 shadow-sm border border-gray-100 dark:border-gray-700">
287
- <div className="flex items-center gap-2 mb-3">
288
- <Database className="h-6 w-6 text-purple-500" />
289
- <h3 className="font-semibold text-lg">Data Management</h3>
290
- </div>
291
-
292
- <p className="text-gray-700 dark:text-gray-300 mb-3">
293
- Efficiently manage your data with these functions:
294
- </p>
295
-
296
- <ul className="space-y-1 list-disc pl-6 text-gray-700 dark:text-gray-300">
297
- <li>Bulk operations for inserting multiple documents</li>
298
- <li>Conditional updates with query filters</li>
299
- <li>Collection management (create/delete)</li>
300
- <li>Database operations (create/delete)</li>
301
- </ul>
302
- </div>
303
- </div>
304
-
305
- <div className="bg-blue-50 dark:bg-blue-900/20 border-l-4 border-blue-500 p-4 rounded-r-lg">
306
- <h3 className="font-semibold mb-2">Pro Tip</h3>
307
- <p className="text-gray-700 dark:text-gray-300">
308
- Combine these advanced features to create powerful, efficient, and
309
- secure database operations. For example, use aggregation with
310
- encryption and custom queries to process sensitive data securely while
311
- maintaining performance.
312
- </p>
313
- </div>
314
- </section>
315
- );
316
- };
317
-
318
- export default AdvancedFeatures;