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.
Files changed (2) hide show
  1. package/README.md +50 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,30 @@
1
- To use your package, `arkos`, with the provided example, let's break it down into understandable steps.
1
+ ![Header Image](src/images/header.webp)
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
- In the code snippet, you're passing the `prisma` instance to the `arkos.init()` function. Here's how Prisma should be set up:
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.prisma # Your Prisma schema file
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
- ```prisma
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 and the `prisma` client instance passed into `arkos.init()`.
144
- - Once `arkos.init()` is invoked with your `express` app and Prisma client, the package will handle routing, authentication, file uploads, etc., automatically.
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
- ## NB: More documentation coming soon
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.21",
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",