arcanajs 0.2.2 → 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.
- package/.env.example +0 -0
- package/.prettierrc +4 -0
- package/README.md +85 -254
- package/arcanajs +0 -0
- package/arcanajs-cli.json +8 -0
- package/arcanajs.config.mjs +0 -0
- package/eslint.config.mjs +35 -0
- package/jest.config.mjs +8 -0
- package/package.json +5 -55
- package/src/app/Http/Controllers/Controller.ts +0 -0
- package/src/app/Http/Controllers/UserController.ts +0 -0
- package/src/app/Http/Middleware/AuthMiddleware.ts +0 -0
- package/src/app/Http/Middleware/ValidationMiddleware.ts +0 -0
- package/src/app/Models/User.ts +0 -0
- package/src/app/Providers/AppServiceProvider.ts +0 -0
- package/src/app/Providers/DatabaseProvider.ts +0 -0
- package/src/app/Repositories/UserRepository.ts +0 -0
- package/src/app/Services/UserService.ts +0 -0
- package/src/bootstrap/app.ts +0 -0
- package/src/config/app.ts +0 -0
- package/src/config/cache.ts +0 -0
- package/src/config/database.ts +0 -0
- package/src/config/mail.ts +0 -0
- package/src/config/server.ts +0 -0
- package/src/core/App.ts +0 -0
- package/src/core/Cache.ts +0 -0
- package/src/core/Container.ts +0 -0
- package/src/core/Controller.ts +0 -0
- package/src/core/Kernel.ts +0 -0
- package/src/core/Logger.ts +0 -0
- package/src/core/Repository.ts +0 -0
- package/src/core/Response.ts +0 -0
- package/src/core/Service.ts +0 -0
- package/src/core/Validator.ts +0 -0
- package/src/resources/css/style.css +0 -0
- package/src/resources/views/back-office/components/common/Footer/main.tsx +161 -0
- package/src/resources/views/back-office/components/common/Header/main.tsx +151 -0
- package/src/resources/views/back-office/components/common/Layout/main.tsx +15 -0
- package/src/resources/views/back-office/components/ui/CodeBlock/index.tsx +350 -0
- package/src/resources/views/back-office/pages/About/index.tsx +0 -0
- package/src/resources/views/back-office/pages/Contact/index.tsx +0 -0
- package/src/resources/views/back-office/pages/Home/index.tsx +0 -0
- package/src/resources/views/back-office/pages/NotFound/index.tsx +0 -0
- package/src/resources/views/back-office/types/global.d.ts +0 -0
- package/src/resources/views/front-office/components/common/Footer/main.tsx +161 -0
- package/src/resources/views/front-office/components/common/Header/main.tsx +151 -0
- package/src/resources/views/front-office/components/common/Layout/main.tsx +15 -0
- package/src/resources/views/front-office/components/ui/CodeBlock/index.tsx +350 -0
- package/src/resources/views/front-office/pages/About/index.tsx +0 -0
- package/src/resources/views/front-office/pages/Contact/index.tsx +0 -0
- package/src/resources/views/front-office/pages/Home/index.tsx +0 -0
- package/src/resources/views/front-office/pages/NotFound/index.tsx +0 -0
- package/src/resources/views/front-office/types/global.d.ts +0 -0
- package/src/resources/views/main.tsx +0 -0
- package/src/routes/api.routes.ts +0 -0
- package/src/routes/web.routes.ts +0 -0
- package/tests/integration/jest.ts +0 -0
- package/tests/unit/jest.ts +0 -0
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +27 -0
- package/LICENSE +0 -21
- package/bin/arcana.ts +0 -19
- package/dist/bin/arcana.d.ts +0 -4
- package/dist/bin/arcana.d.ts.map +0 -1
- package/dist/bin/arcana.js +0 -17
- package/dist/bin/arcana.js.map +0 -1
- package/dist/config/default.d.ts +0 -7
- package/dist/config/default.d.ts.map +0 -1
- package/dist/config/default.js +0 -8
- package/dist/config/default.js.map +0 -1
- package/dist/src/controllers/HomeController.d.ts +0 -6
- package/dist/src/controllers/HomeController.d.ts.map +0 -1
- package/dist/src/controllers/HomeController.js +0 -9
- package/dist/src/controllers/HomeController.js.map +0 -1
- package/dist/src/middleware/auth.d.ts +0 -3
- package/dist/src/middleware/auth.d.ts.map +0 -1
- package/dist/src/middleware/auth.js +0 -9
- package/dist/src/middleware/auth.js.map +0 -1
- package/dist/src/models/User.d.ts +0 -11
- package/dist/src/models/User.d.ts.map +0 -1
- package/dist/src/models/User.js +0 -45
- package/dist/src/models/User.js.map +0 -1
- package/dist/src/repositories/UserRepository.d.ts +0 -9
- package/dist/src/repositories/UserRepository.d.ts.map +0 -1
- package/dist/src/repositories/UserRepository.js +0 -19
- package/dist/src/repositories/UserRepository.js.map +0 -1
- package/dist/src/routes/index.d.ts +0 -3
- package/dist/src/routes/index.d.ts.map +0 -1
- package/dist/src/routes/index.js +0 -14
- package/dist/src/routes/index.js.map +0 -1
- package/dist/src/server.d.ts +0 -2
- package/dist/src/server.d.ts.map +0 -1
- package/dist/src/server.js +0 -34
- package/dist/src/server.js.map +0 -1
- package/dist/src/services/UserService.d.ts +0 -8
- package/dist/src/services/UserService.d.ts.map +0 -1
- package/dist/src/services/UserService.js +0 -16
- package/dist/src/services/UserService.js.map +0 -1
- package/dist/src/views/pages/home.d.ts +0 -2
- package/dist/src/views/pages/home.d.ts.map +0 -1
- package/dist/src/views/pages/home.js +0 -13
- package/dist/src/views/pages/home.js.map +0 -1
package/.env.example
ADDED
|
File without changes
|
package/.prettierrc
ADDED
package/README.md
CHANGED
|
@@ -1,284 +1,115 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
</p>
|
|
6
|
-
|
|
7
|
-
<p align="center">
|
|
8
|
-
A powerful full-stack framework combining Express, React, and MongoDB with server-side rendering
|
|
9
|
-
</p>
|
|
10
|
-
|
|
11
|
-
<p align="center">
|
|
12
|
-
<a href="#features">Features</a> •
|
|
13
|
-
<a href="#installation">Installation</a> •
|
|
14
|
-
<a href="#quick-start">Quick Start</a> •
|
|
15
|
-
<a href="#architecture">Architecture</a> •
|
|
16
|
-
<a href="#routing">Routing</a> •
|
|
17
|
-
<a href="#documentation">Documentation</a> •
|
|
18
|
-
<a href="#examples">Examples</a> •
|
|
19
|
-
<a href="#contributing">Contributing</a> •
|
|
20
|
-
<a href="#license">License</a>
|
|
21
|
-
</p>
|
|
22
|
-
|
|
23
|
-
## Overview
|
|
24
|
-
|
|
25
|
-
Arcana.js is a comprehensive full-stack JavaScript framework built on top of Express.js and React, designed to create scalable, maintainable web applications with server-side rendering capabilities. By leveraging MongoDB and Mongoose, it provides a complete solution for modern web development following best practices in software architecture.
|
|
26
|
-
|
|
27
|
-
## Features
|
|
28
|
-
|
|
29
|
-
- **Express.js Backend**: Fast, unopinionated, minimalist web framework as the foundation
|
|
30
|
-
- **React Frontend**: Component-based UI with server-side rendering out of the box
|
|
31
|
-
- **MongoDB & Mongoose**: Powerful data modeling and integration with MongoDB
|
|
32
|
-
- **MVC Architecture**: Clean separation of concerns with Model-View-Controller pattern
|
|
33
|
-
- **OOP Principles**: Object-oriented design throughout the codebase
|
|
34
|
-
- **Repository Pattern**: Abstraction layer between data access and business logic
|
|
35
|
-
- **Server-Side Rendering**: Improved performance and SEO capabilities
|
|
36
|
-
- **Scalable Architecture**: Designed to grow with your application needs
|
|
37
|
-
- **TypeScript Support**: Optional static typing for better developer experience
|
|
38
|
-
- **Built-in Middleware**: Common functionality pre-configured
|
|
39
|
-
- **Elegant Routing System**: Declarative and flexible route definition
|
|
40
|
-
|
|
41
|
-
## Installation
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
# Install Arcana.js CLI globally
|
|
45
|
-
npm install -g arcana-cli
|
|
46
|
-
|
|
47
|
-
# Create a new Arcana.js project
|
|
48
|
-
arcana create my-awesome-app
|
|
49
|
-
|
|
50
|
-
# Navigate to project directory
|
|
51
|
-
cd my-awesome-app
|
|
52
|
-
|
|
53
|
-
# Install dependencies
|
|
54
|
-
npm install
|
|
55
|
-
|
|
56
|
-
# Start development server
|
|
57
|
-
npm run dev
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Quick Start
|
|
61
|
-
|
|
62
|
-
After installation, your application will be running at `http://localhost:3000`.
|
|
63
|
-
|
|
64
|
-
```javascript
|
|
65
|
-
// Example controller: src/controllers/UserController.js
|
|
66
|
-
import { Controller } from 'arcana/core';
|
|
67
|
-
import { UserRepository } from '../repositories/UserRepository';
|
|
68
|
-
|
|
69
|
-
export class UserController extends Controller {
|
|
70
|
-
constructor() {
|
|
71
|
-
super();
|
|
72
|
-
this.userRepository = new UserRepository();
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
async index(req, res) {
|
|
76
|
-
const users = await this.userRepository.findAll();
|
|
77
|
-
return this.render('users/index', { users });
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
async show(req, res) {
|
|
81
|
-
const user = await this.userRepository.findById(req.params.id);
|
|
82
|
-
return this.render('users/show', { user });
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## Architecture
|
|
88
|
-
|
|
89
|
-
Arcana.js follows the MVC (Model-View-Controller) architecture with a strong emphasis on the repository pattern:
|
|
90
|
-
|
|
91
|
-
```
|
|
92
|
-
my-awesome-app/
|
|
93
|
-
├── config/ # Application configuration
|
|
94
|
-
├── public/ # Static assets
|
|
95
|
-
├── src/
|
|
96
|
-
│ ├── controllers/ # Route controllers
|
|
97
|
-
│ ├── models/ # Mongoose models
|
|
98
|
-
│ ├── repositories/ # Data access layer
|
|
99
|
-
│ ├── services/ # Business logic
|
|
100
|
-
│ ├── views/ # React components for SSR
|
|
101
|
-
│ │ ├── layouts/ # Layout components
|
|
102
|
-
│ │ └── pages/ # Page components
|
|
103
|
-
│ └── routes/ # Route definitions
|
|
104
|
-
├── tests/ # Test files
|
|
105
|
-
├── .env # Environment variables
|
|
106
|
-
├── .gitignore
|
|
107
|
-
├── package.json
|
|
108
|
-
└── arcana.config.js # Arcana.js configuration
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
## Routing
|
|
112
|
-
|
|
113
|
-
Arcana.js provides a powerful and flexible routing system that integrates seamlessly with controllers. Routes are defined in dedicated router files and automatically linked to controller methods.
|
|
114
|
-
|
|
115
|
-
### Basic Router Configuration
|
|
116
|
-
|
|
117
|
-
```javascript
|
|
118
|
-
// src/routes/userRoutes.js
|
|
119
|
-
import { Router } from 'arcana/core';
|
|
120
|
-
import { UserController } from '../controllers/UserController';
|
|
121
|
-
|
|
122
|
-
const userController = new UserController();
|
|
123
|
-
const router = new Router();
|
|
124
|
-
|
|
125
|
-
// Define routes and link to controller methods
|
|
126
|
-
router.get('/users', userController.index);
|
|
127
|
-
router.get('/users/:id', userController.show);
|
|
128
|
-
router.post('/users', userController.create);
|
|
129
|
-
router.put('/users/:id', userController.update);
|
|
130
|
-
router.delete('/users/:id', userController.delete);
|
|
131
|
-
|
|
132
|
-
export default router;
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### Route Groups and Middleware
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="https://digiclips.ma/arcanajs.png" alt="ArcanaJS Logo" width="200" style="border-radius: 9px;"/>
|
|
3
|
+
|
|
4
|
+
<p><strong>ArcanaJS A modern, full-stack JavaScript framework for building fast, SEO-friendly web applications</strong></p>
|
|
136
5
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
6
|
+
[](https://www.npmjs.com/package/arcanajs)
|
|
7
|
+
[](https://github.com/arcanajs/arcanajs/blob/main/LICENSE)
|
|
8
|
+
[](https://www.npmjs.com/package/arcanajs)
|
|
9
|
+
[](https://github.com/arcanajs/arcanajs/actions)
|
|
141
10
|
|
|
142
|
-
|
|
11
|
+
[Website](https://arcanajs.com) • [Documentation](https://arcanajs.com/docs) • [Examples](https://github.com/arcanajs/examples) • [Community](https://discord.gg/zkFDewQ7TW)
|
|
143
12
|
|
|
144
|
-
|
|
145
|
-
router.group('/api', [authMiddleware], (r) => {
|
|
146
|
-
// These routes will all be prefixed with '/api' and use authMiddleware
|
|
147
|
-
r.use('/users', require('./userRoutes'));
|
|
148
|
-
r.use('/posts', require('./postRoutes'));
|
|
149
|
-
});
|
|
13
|
+
</div>
|
|
150
14
|
|
|
151
|
-
|
|
152
|
-
```
|
|
15
|
+
## 📚 Documentation
|
|
153
16
|
|
|
154
|
-
|
|
17
|
+
Comprehensive guides, API references, and tutorials are available at: **[https://arcanajs.com/docs](https://arcanajs.com/docs)**
|
|
155
18
|
|
|
156
|
-
|
|
157
|
-
// src/app.js
|
|
158
|
-
import { Application } from 'arcana/core';
|
|
159
|
-
import userRoutes from './routes/userRoutes';
|
|
160
|
-
import apiRoutes from './routes/apiRoutes';
|
|
19
|
+
## 🤝 Contributing
|
|
161
20
|
|
|
162
|
-
|
|
21
|
+
We welcome contributions from the community! Whether it's:
|
|
163
22
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
]);
|
|
23
|
+
- 🐛 **Bug reports** – Help us identify and fix issues
|
|
24
|
+
- 💡 **Feature requests** – Share your ideas for improvements
|
|
25
|
+
- 📝 **Documentation** – Improve or translate our docs
|
|
26
|
+
- 🔧 **Code contributions** – Submit bug fixes or new features
|
|
169
27
|
|
|
170
|
-
|
|
171
|
-
```
|
|
28
|
+
### How to Contribute
|
|
172
29
|
|
|
173
|
-
|
|
30
|
+
1. **Fork** the repository
|
|
31
|
+
2. **Create** a feature branch:
|
|
32
|
+
```bash
|
|
33
|
+
git checkout -b feature/amazing-feature
|
|
34
|
+
```
|
|
35
|
+
3. **Commit** your changes:
|
|
36
|
+
```bash
|
|
37
|
+
git commit -m "feat: add amazing feature"
|
|
38
|
+
```
|
|
39
|
+
4. **Push** to your branch:
|
|
40
|
+
```bash
|
|
41
|
+
git push origin feature/amazing-feature
|
|
42
|
+
```
|
|
43
|
+
5. **Open** a Pull Request
|
|
174
44
|
|
|
175
|
-
|
|
176
|
-
// Advanced routing with parameter validation
|
|
177
|
-
router.get('/products/:category/:id', productController.show)
|
|
178
|
-
.where('category', /^[a-z-]+$/)
|
|
179
|
-
.where('id', /^\d+$/);
|
|
180
|
-
```
|
|
45
|
+
### Contribution Guidelines
|
|
181
46
|
|
|
182
|
-
|
|
47
|
+
- Follow the existing code style and conventions
|
|
48
|
+
- Write clear commit messages (we use [Conventional Commits](https://www.conventionalcommits.org/))
|
|
49
|
+
- Add tests for new features
|
|
50
|
+
- Update documentation as needed
|
|
51
|
+
- Ensure all tests pass before submitting PR
|
|
183
52
|
|
|
184
|
-
|
|
185
|
-
// Define a named route for easy URL generation
|
|
186
|
-
router.get('/dashboard', dashboardController.index, 'dashboard.index');
|
|
53
|
+
Refer to our [Contributing Guidelines](CONTRIBUTING.md) for detailed information.
|
|
187
54
|
|
|
188
|
-
|
|
189
|
-
const dashboardUrl = router.namedRoute('dashboard.index');
|
|
190
|
-
```
|
|
55
|
+
---
|
|
191
56
|
|
|
192
|
-
##
|
|
57
|
+
## 💬 Community
|
|
193
58
|
|
|
194
|
-
|
|
59
|
+
Join our growing community:
|
|
195
60
|
|
|
196
|
-
|
|
61
|
+
- **Discord** – [Join our Discord server](https://discord.gg/zkFDewQ7TW) for discussions and support
|
|
62
|
+
- **Twitter** – Follow [@ArcanaJS](https://twitter.com/arcanajs) for updates
|
|
63
|
+
- **Stack Overflow** – Tag your questions with `arcanajs`
|
|
64
|
+
- **GitHub Discussions** – [Start a discussion](https://github.com/arcanajs/arcanajs/discussions)
|
|
197
65
|
|
|
198
|
-
|
|
199
|
-
- **Views**: Create React components for rendering
|
|
200
|
-
- **Controllers**: Handle HTTP requests and control flow
|
|
201
|
-
- **Repositories**: Abstract data access operations
|
|
202
|
-
- **Services**: Implement business logic
|
|
203
|
-
- **Middlewares**: Process requests before they reach controllers
|
|
204
|
-
- **Routers**: Define application routes and connect them to controllers
|
|
66
|
+
## 🙏 Acknowledgments
|
|
205
67
|
|
|
206
|
-
|
|
68
|
+
ArcanaJS is built on the shoulders of giants. Special thanks to:
|
|
207
69
|
|
|
208
|
-
|
|
70
|
+
- The **React** team for the amazing UI library
|
|
71
|
+
- The **Express** community for the robust web framework
|
|
72
|
+
- The **MongoDB** team for the flexible database
|
|
73
|
+
- All our [contributors](https://github.com/arcanajs/arcanajs/graphs/contributors) who make this project better
|
|
209
74
|
|
|
210
|
-
|
|
211
|
-
// src/models/User.js
|
|
212
|
-
import { Model, Schema } from 'arcana/db';
|
|
75
|
+
### Inspiration
|
|
213
76
|
|
|
214
|
-
|
|
215
|
-
username: { type: String, required: true, unique: true },
|
|
216
|
-
email: { type: String, required: true, unique: true },
|
|
217
|
-
password: { type: String, required: true },
|
|
218
|
-
createdAt: { type: Date, default: Date.now },
|
|
219
|
-
updatedAt: { type: Date, default: Date.now }
|
|
220
|
-
});
|
|
77
|
+
ArcanaJS draws inspiration from excellent frameworks like:
|
|
221
78
|
|
|
222
|
-
|
|
223
|
-
|
|
79
|
+
- [NestJS](https://nestjs.com/) – Progressive Node.js framework
|
|
80
|
+
- [Laravel](https://laravel.com/) – PHP framework with elegant syntax
|
|
224
81
|
|
|
225
|
-
|
|
82
|
+
---
|
|
226
83
|
|
|
227
|
-
|
|
228
|
-
// src/repositories/UserRepository.js
|
|
229
|
-
import { Repository } from 'arcana/core';
|
|
230
|
-
import { User } from '../models/User';
|
|
84
|
+
## 👨💻 Author
|
|
231
85
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
super(User);
|
|
235
|
-
}
|
|
86
|
+
<div align="center">
|
|
87
|
+
<img src="https://github.com/mohammed-ben-cheikh.png" width="100" style="border-radius: 50%;" alt="Mohammed Ben Cheikh"/>
|
|
236
88
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
// src/views/pages/users/Index.jsx
|
|
247
|
-
import React from 'react';
|
|
248
|
-
import { Page } from 'arcana/view';
|
|
249
|
-
|
|
250
|
-
export default function UsersIndex({ users }) {
|
|
251
|
-
return (
|
|
252
|
-
<Page title="All Users">
|
|
253
|
-
<h1>Users</h1>
|
|
254
|
-
<ul>
|
|
255
|
-
{users.map(user => (
|
|
256
|
-
<li key={user._id}>
|
|
257
|
-
<a href={`/users/${user._id}`}>{user.username}</a>
|
|
258
|
-
</li>
|
|
259
|
-
))}
|
|
260
|
-
</ul>
|
|
261
|
-
</Page>
|
|
262
|
-
);
|
|
263
|
-
}
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
## Contributing
|
|
267
|
-
|
|
268
|
-
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
269
|
-
|
|
270
|
-
1. Fork the repository
|
|
271
|
-
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
272
|
-
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
273
|
-
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
274
|
-
5. Open a Pull Request
|
|
275
|
-
|
|
276
|
-
## License
|
|
277
|
-
|
|
278
|
-
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
89
|
+
**Mohammed Ben Cheikh**
|
|
90
|
+
|
|
91
|
+
Full-Stack Developer & Framework Architect
|
|
92
|
+
|
|
93
|
+
[](https://mohammedbencheikh.com)
|
|
94
|
+
[](mailto:mohammed.bencheikh.dev@gmail.com)
|
|
95
|
+
[](https://github.com/mohammed-ben-cheikh)
|
|
96
|
+
[](https://linkedin.com/in/mohammed-ben-cheikh)
|
|
97
|
+
</div>
|
|
279
98
|
|
|
280
99
|
---
|
|
281
100
|
|
|
282
|
-
<
|
|
283
|
-
Made with ❤️ by
|
|
284
|
-
|
|
101
|
+
<div align="center">
|
|
102
|
+
<p><strong>Made with ❤️ and dedication by <a href="https://mohammedbencheikh.com">Mohammed Ben Cheikh</a></strong></p>
|
|
103
|
+
|
|
104
|
+
<p>If you find <strong>ArcanaJS</strong> useful, please consider:</p>
|
|
105
|
+
|
|
106
|
+
⭐ **[Starring the project](https://github.com/arcanajs/arcanajs)** on GitHub
|
|
107
|
+
|
|
108
|
+
🐦 **[Following us](https://twitter.com/arcanajs)** on Twitter
|
|
109
|
+
|
|
110
|
+
💖 **[Sponsoring the project](https://github.com/sponsors/arcanajs)** to support development
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
<sub>© 2025 ArcanaJS. All rights reserved.</sub>
|
|
115
|
+
</div>
|
package/arcanajs
ADDED
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
import eslint from '@eslint/js';
|
|
3
|
+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
4
|
+
import globals from 'globals';
|
|
5
|
+
import tseslint from 'typescript-eslint';
|
|
6
|
+
|
|
7
|
+
export default tseslint.config(
|
|
8
|
+
{
|
|
9
|
+
ignores: ['eslint.config.mjs'],
|
|
10
|
+
},
|
|
11
|
+
eslint.configs.recommended,
|
|
12
|
+
...tseslint.configs.recommendedTypeChecked,
|
|
13
|
+
eslintPluginPrettierRecommended,
|
|
14
|
+
{
|
|
15
|
+
languageOptions: {
|
|
16
|
+
globals: {
|
|
17
|
+
...globals.node,
|
|
18
|
+
...globals.jest,
|
|
19
|
+
},
|
|
20
|
+
sourceType: 'commonjs',
|
|
21
|
+
parserOptions: {
|
|
22
|
+
projectService: true,
|
|
23
|
+
tsconfigRootDir: import.meta.dirname,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
rules: {
|
|
29
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
30
|
+
'@typescript-eslint/no-floating-promises': 'warn',
|
|
31
|
+
'@typescript-eslint/no-unsafe-argument': 'warn',
|
|
32
|
+
"prettier/prettier": ["error", { endOfLine: "auto" }],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
);
|
package/jest.config.mjs
ADDED
package/package.json
CHANGED
|
@@ -5,52 +5,8 @@
|
|
|
5
5
|
"email": "mohammed.bencheikh.dev@gmail.com",
|
|
6
6
|
"url": "https://mohammedbencheikh.com/"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.
|
|
8
|
+
"version": "1.0.0",
|
|
9
9
|
"description": "A powerful full-stack framework combining Express, React and MongoDB with server-side rendering",
|
|
10
|
-
"main": "dist/server.js",
|
|
11
|
-
"types": "dist/server.d.ts",
|
|
12
|
-
"files": [
|
|
13
|
-
"dist",
|
|
14
|
-
"bin"
|
|
15
|
-
],
|
|
16
|
-
"scripts": {
|
|
17
|
-
"clean": "rm -rf dist",
|
|
18
|
-
"build": "tsc -p tsconfig.json",
|
|
19
|
-
"build:watch": "tsc -p tsconfig.json --watch",
|
|
20
|
-
"prepare": "npm run build",
|
|
21
|
-
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
22
|
-
"pack:verify": "npm pack --dry-run",
|
|
23
|
-
"dev": "nodemon --watch src --exec ts-node src/server.ts",
|
|
24
|
-
"start": "node dist/server.js",
|
|
25
|
-
"lint": "eslint . || true",
|
|
26
|
-
"test": "jest --runInBand"
|
|
27
|
-
},
|
|
28
|
-
"peerDependencies": {
|
|
29
|
-
"react": ">=16 <20",
|
|
30
|
-
"react-dom": ">=16 <20"
|
|
31
|
-
},
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"dotenv": "^16.0.0",
|
|
34
|
-
"express": "^4.18.2",
|
|
35
|
-
"mongoose": "^7.0.0",
|
|
36
|
-
"react": "^18.2.0",
|
|
37
|
-
"react-dom": "^18.2.0",
|
|
38
|
-
"url-join": "^5.0.0"
|
|
39
|
-
},
|
|
40
|
-
"devDependencies": {
|
|
41
|
-
"@types/dotenv": "^6.1.1",
|
|
42
|
-
"@types/express": "^5.0.5",
|
|
43
|
-
"@types/mongoose": "^5.11.96",
|
|
44
|
-
"@types/node": "^20.0.0",
|
|
45
|
-
"@types/react": "^18.2.0",
|
|
46
|
-
"@types/react-dom": "^18.2.0",
|
|
47
|
-
"@types/url-join": "^4.0.3",
|
|
48
|
-
"eslint": "^8.0.0",
|
|
49
|
-
"jest": "^29.0.0",
|
|
50
|
-
"nodemon": "^3.0.1",
|
|
51
|
-
"ts-node": "^10.9.2",
|
|
52
|
-
"typescript": "^5.2.0"
|
|
53
|
-
},
|
|
54
10
|
"keywords": [
|
|
55
11
|
"framework",
|
|
56
12
|
"full-stack",
|
|
@@ -65,17 +21,11 @@
|
|
|
65
21
|
],
|
|
66
22
|
"repository": {
|
|
67
23
|
"type": "git",
|
|
68
|
-
"url": "https://github.com/
|
|
24
|
+
"url": "https://github.com/arcanajs/arcanajs.git"
|
|
69
25
|
},
|
|
70
26
|
"bugs": {
|
|
71
|
-
"url": "https://github.com/
|
|
72
|
-
},
|
|
73
|
-
"homepage": "https://github.com/Mohammed-Ben-Cheikh/arcanajs#readme",
|
|
74
|
-
"bin": {
|
|
75
|
-
"arcana": "dist/bin/arcana.js"
|
|
76
|
-
},
|
|
77
|
-
"engines": {
|
|
78
|
-
"node": ">=16"
|
|
27
|
+
"url": "https://github.com/arcanajs/arcanajs/issues"
|
|
79
28
|
},
|
|
29
|
+
"homepage": "https://arcanajs.com",
|
|
80
30
|
"license": "MIT"
|
|
81
|
-
}
|
|
31
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/core/App.ts
ADDED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|