arkos 0.0.21 โ 0.0.22-alpha.1
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.
- package/README.md +50 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
### **What is Arkos**
|
|
4
|
+
|
|
5
|
+
**Arkos** is a **lightweight backend framework** for **Express.js and Prisma** that simplifies API development by providing automatic route generation, built-in authentication, error handling, and file upload optimization. Designed to be a foundational layer for backend applications, Arkos allows developers to quickly set up a secure and scalable server with minimal configuration.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
### **Key Features**
|
|
10
|
+
|
|
11
|
+
- ๐ **Automatic API Generation** โ Instantly create RESTful API routes for Prisma models.
|
|
12
|
+
|
|
13
|
+
- ๐ **Built-in Authentication** โ Supports JWT-based authentication with effortless setup.
|
|
14
|
+
|
|
15
|
+
- โก **Express Middlewares** โ Pre-configured security, request parsing, and error handling.
|
|
16
|
+
|
|
17
|
+
- ๐ก๏ธ **Built-in Data Validation** โ using class-validator and class-transformer, just drop a create-post.dto.ts.
|
|
18
|
+
|
|
19
|
+
- โฌ๏ธ **File Upload & Optimization** โ Efficient image, video, docs, raw-file handling.
|
|
20
|
+
|
|
21
|
+
- ๐ **Prisma Integration** โ Seamless connection with Prisma ORM for database management with relation feilds handling.
|
|
22
|
+
|
|
23
|
+
- ๐จโ๐ป **Interceptors Middlewares** โ Tailor as you want, intercept, customize, for example using beforeCreateOne, afterSignUp.
|
|
24
|
+
|
|
25
|
+
- โ๏ธ **Nodemailer Integration** โ Seamless nodemailer integration for sending emails.
|
|
26
|
+
|
|
27
|
+
With Arkos, developers can **bootstrap their backend in seconds**, focusing on building features rather than repetitive setup tasks.
|
|
2
28
|
|
|
3
29
|
### 1. **Install the Package**
|
|
4
30
|
|
|
@@ -16,7 +42,7 @@ pnpm install arkos
|
|
|
16
42
|
|
|
17
43
|
### 2. **Setup Prisma Client**
|
|
18
44
|
|
|
19
|
-
|
|
45
|
+
Here's how Prisma should be set up to use seamlessly with arkos:
|
|
20
46
|
|
|
21
47
|
1. **Install Prisma and initialize it:**
|
|
22
48
|
Make sure you have Prisma installed in your project. You can install it using:
|
|
@@ -69,7 +95,7 @@ arkos.init(app);
|
|
|
69
95
|
- **Authentication Setup**: The package will set (read further to learn how to prepare the environment) up authentication routes, middleware, and necessary handlers for managing user sessions and JWT tokens.
|
|
70
96
|
- **Error Handling**: Automatic error handling middleware could be added.
|
|
71
97
|
- **File Upload**: Arkos will configure necessary middleware to handle file uploads, image upload optimization, and route generation.
|
|
72
|
-
- **Prisma Integration**: The prisma instance must be export as default or prisma under scr/utils/prisma.ts.
|
|
98
|
+
- **Prisma Integration**: The prisma instance must be export as default or as prisma under scr/utils/prisma.ts.
|
|
73
99
|
|
|
74
100
|
### 5. **Additional Configuration (Optional)**
|
|
75
101
|
|
|
@@ -93,7 +119,9 @@ project-root/
|
|
|
93
119
|
โ
|
|
94
120
|
โโโ package.json # Your project dependencies
|
|
95
121
|
โโโ prisma/
|
|
96
|
-
โโโ schema
|
|
122
|
+
โโโ schema/
|
|
123
|
+
โโโ schema.prisma # Your Prisma schema file
|
|
124
|
+
โโโ post.prisma # Your Post model file
|
|
97
125
|
```
|
|
98
126
|
|
|
99
127
|
---
|
|
@@ -102,7 +130,7 @@ project-root/
|
|
|
102
130
|
|
|
103
131
|
Ensure you have a basic Prisma schema like this:
|
|
104
132
|
|
|
105
|
-
```
|
|
133
|
+
```typescript
|
|
106
134
|
// prisma/schema.prisma
|
|
107
135
|
datasource db {
|
|
108
136
|
provider = "sqlite" // Replace with your database provider (e.g., 'mongodb', 'mysql', 'sqlite', 'postgresql')
|
|
@@ -140,8 +168,8 @@ After all there will be routes for
|
|
|
140
168
|
|
|
141
169
|
### Recap
|
|
142
170
|
|
|
143
|
-
- You need `prisma` properly set up
|
|
144
|
-
- Once `arkos.init()` is invoked with your `express` app
|
|
171
|
+
- You need `prisma` properly set up.
|
|
172
|
+
- Once `arkos.init()` is invoked with your `express` app the package will handle routing, authentication, file uploads, etc., automatically.
|
|
145
173
|
- Ensure you have all dependencies installed (`arkos`, `prisma`, `express`, etc.) before running the app.
|
|
146
174
|
|
|
147
175
|
---
|
|
@@ -150,8 +178,22 @@ After all there will be routes for
|
|
|
150
178
|
|
|
151
179
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
152
180
|
|
|
181
|
+
---
|
|
182
|
+
|
|
153
183
|
## ๐ซ Contact
|
|
154
184
|
|
|
155
185
|
For any issues or questions, please open an issue or contact [Uanela Como](mailto:uanelaluiswayne@gmail.com).
|
|
156
186
|
|
|
157
|
-
|
|
187
|
+
Feel free to reach out for questions, suggestions, or contributions โค๏ธ.
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
### **Origin of the Name "Arkos"**
|
|
192
|
+
|
|
193
|
+
The name **"Arkos"** is derived from the Greek word **แผฯฯฮฎ (Arkhฤ)**, which means **"beginning"** or **"foundation"**. This interpretation perfectly aligns with the core purpose of the package โ to serve as a **foundational layer** for quickly setting up backend systems. Just as **แผฯฯฮฎ** represents the starting point or origin, Arkos is designed to **initiate** and **structure** backend projects, providing developers with a robust base to build upon.
|
|
194
|
+
|
|
195
|
+
This makes Arkos an essential tool for **bootstrapping** and organizing backend applications, helping developers focus on features rather than repetitive setup tasks.
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
### NB: More documentation coming soon
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arkos",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22-alpha.1",
|
|
4
4
|
"description": "A super customizable TypeScript package for auto-generating API routes with built-in authentication, email service, error handling, file upload routes, image upload optimization, and seamless Prisma integration.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|