baraqex 1.0.67 → 1.0.69
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/dist/index.js +17 -3
- package/dist/index.js.map +2 -2
- package/dist/server/api-router.d.ts +3 -1
- package/dist/server/api-router.d.ts.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +17 -3
- package/dist/server/index.js.map +2 -2
- package/package.json +1 -1
- package/templates/fullstack-template/.env.example +16 -29
- package/templates/fullstack-template/README.md +9 -45
- package/templates/fullstack-template/package-lock.json +1504 -6211
- package/templates/fullstack-template/package.json +16 -46
- package/templates/fullstack-template/server.js +52 -25
- package/templates/fullstack-template/src/App.tsx +178 -1
- package/templates/fullstack-template/src/api/hello.js +19 -0
- package/templates/fullstack-template/src/api/users.js +39 -0
- package/templates/fullstack-template/src/pages/index.tsx +200 -0
- package/templates/fullstack-template/src/server.ts +162 -98
- package/templates/fullstack-template/tsconfig.json +30 -0
package/package.json
CHANGED
|
@@ -2,41 +2,28 @@
|
|
|
2
2
|
PORT=3000
|
|
3
3
|
NODE_ENV=development
|
|
4
4
|
|
|
5
|
-
#
|
|
6
|
-
|
|
7
|
-
JWT_EXPIRES_IN=7d
|
|
5
|
+
# Database Configuration (Optional)
|
|
6
|
+
# Uncomment and configure the database you want to use
|
|
8
7
|
|
|
9
|
-
#
|
|
10
|
-
# DATABASE_URL=mongodb://localhost:27017/
|
|
8
|
+
# MongoDB
|
|
9
|
+
# DATABASE_URL=mongodb://localhost:27017/baraqex-app
|
|
11
10
|
# DATABASE_TYPE=mongodb
|
|
12
11
|
|
|
13
|
-
#
|
|
14
|
-
# DATABASE_URL=
|
|
15
|
-
# DATABASE_TYPE=postgres
|
|
16
|
-
|
|
17
|
-
# For MySQL:
|
|
18
|
-
# DATABASE_URL=mysql://username:password@localhost:3306/fullstack_app
|
|
12
|
+
# MySQL
|
|
13
|
+
# DATABASE_URL=mysql://username:password@localhost:3306/baraqex_app
|
|
19
14
|
# DATABASE_TYPE=mysql
|
|
20
15
|
|
|
21
|
-
#
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
# Session Configuration
|
|
25
|
-
SESSION_SECRET=your-session-secret-key
|
|
26
|
-
|
|
27
|
-
# Email Configuration (for future features)
|
|
28
|
-
# SMTP_HOST=smtp.gmail.com
|
|
29
|
-
# SMTP_PORT=587
|
|
30
|
-
# SMTP_USER=your-email@gmail.com
|
|
31
|
-
# SMTP_PASS=your-app-password
|
|
16
|
+
# PostgreSQL
|
|
17
|
+
# DATABASE_URL=postgresql://username:password@localhost:5432/baraqex_app
|
|
18
|
+
# DATABASE_TYPE=postgres
|
|
32
19
|
|
|
33
|
-
#
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
# Authentication (Optional)
|
|
21
|
+
# JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
|
|
22
|
+
# JWT_EXPIRES_IN=7d
|
|
36
23
|
|
|
37
|
-
#
|
|
38
|
-
#
|
|
24
|
+
# CORS Configuration (Optional)
|
|
25
|
+
# FRONTEND_URL=http://localhost:3000
|
|
39
26
|
|
|
40
27
|
# API Rate Limiting
|
|
41
|
-
RATE_LIMIT_WINDOW_MS=900000
|
|
42
|
-
RATE_LIMIT_MAX_REQUESTS=100
|
|
28
|
+
# RATE_LIMIT_WINDOW_MS=900000
|
|
29
|
+
# RATE_LIMIT_MAX_REQUESTS=100
|
|
@@ -1,52 +1,16 @@
|
|
|
1
|
-
# Fullstack
|
|
1
|
+
# Baraqex Fullstack Template
|
|
2
2
|
|
|
3
|
-
A complete fullstack application template built with
|
|
3
|
+
A complete fullstack application template built with Baraqex framework, featuring both frontend and backend capabilities.
|
|
4
4
|
|
|
5
5
|
## 🚀 Features
|
|
6
6
|
|
|
7
|
-
- **
|
|
8
|
-
- **
|
|
9
|
-
- **
|
|
10
|
-
- **
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
13
|
-
- **
|
|
14
|
-
- **Production Ready**: Environment configuration, logging, error handling
|
|
15
|
-
|
|
16
|
-
## 📋 Prerequisites
|
|
17
|
-
|
|
18
|
-
- Node.js 16+
|
|
19
|
-
- npm, yarn, or pnpm
|
|
20
|
-
- Database (optional - works with in-memory storage for demo)
|
|
21
|
-
|
|
22
|
-
## 🛠️ Quick Start
|
|
23
|
-
|
|
24
|
-
1. **Install dependencies**
|
|
25
|
-
```bash
|
|
26
|
-
npm install
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
2. **Environment setup**
|
|
30
|
-
```bash
|
|
31
|
-
cp .env.example .env
|
|
32
|
-
# Edit .env with your configuration
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
3. **Start development server**
|
|
36
|
-
```bash
|
|
37
|
-
npm run dev
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
4. **Open your browser**
|
|
41
|
-
- Frontend: http://localhost:3000
|
|
42
|
-
- API: http://localhost:3000/api
|
|
43
|
-
- API Docs: http://localhost:3000/api-docs
|
|
44
|
-
|
|
45
|
-
## 🎯 Default Credentials
|
|
46
|
-
|
|
47
|
-
For demo purposes, you can login with:
|
|
48
|
-
- **Username**: `admin` or `user`
|
|
49
|
-
- **Password**: `password`
|
|
7
|
+
- **Server-Side Rendering (SSR)** - Fast initial page loads with SEO benefits
|
|
8
|
+
- **API Routes** - Built-in API endpoint handling with Express.js
|
|
9
|
+
- **Database Integration** - Support for MongoDB, MySQL, and PostgreSQL
|
|
10
|
+
- **Authentication** - JWT-based authentication system
|
|
11
|
+
- **File-based Routing** - Automatic route generation based on file structure
|
|
12
|
+
- **TypeScript Support** - Full TypeScript support out of the box
|
|
13
|
+
- **Hot Reload** - Development server with hot reload capabilities
|
|
50
14
|
|
|
51
15
|
## 📁 Project Structure
|
|
52
16
|
|