create-laju-app 1.1.4 → 1.2.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.
Files changed (3) hide show
  1. package/README.md +34 -119
  2. package/bin/cli.js +3 -0
  3. package/package.json +5 -1
package/README.md CHANGED
@@ -1,149 +1,64 @@
1
- # Laju
1
+ # create-laju-app
2
2
 
3
- **High-performance TypeScript web framework** - 11x faster than Express.js
3
+ CLI tool to quickly create a new Laju project.
4
4
 
5
- Build modern full-stack applications with HyperExpress, Svelte 5, and Inertia.js.
6
-
7
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
- [![Node.js Version](https://img.shields.io/badge/node-20--22-brightgreen)](https://nodejs.org)
9
- [![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue?logo=typescript)](https://www.typescriptlang.org/)
10
- [![GitHub stars](https://img.shields.io/github/stars/maulanashalihin/laju?style=social)](https://github.com/maulanashalihin/laju)
11
-
12
- ## 🚀 Quick Start
5
+ ## Usage
13
6
 
14
7
  ```bash
15
8
  # Create new project
16
- npx create-laju-app my-project
17
- cd my-project
9
+ npx create-laju-app my-app
18
10
 
19
- # Setup database
20
- cp .env.example .env
21
- npx knex migrate:latest
11
+ # Navigate to project
12
+ cd my-app
22
13
 
23
- # Start development
14
+ # Start development server
24
15
  npm run dev
25
16
  ```
26
17
 
27
- Visit `http://localhost:5555`
18
+ ## Options
19
+
20
+ ```bash
21
+ npx create-laju-app <project-name> [options]
22
+ ```
23
+
24
+ | Option | Description | Default |
25
+ |--------|-------------|---------|
26
+ | `--package-manager` | Package manager to use (npm, yarn, bun) | Auto-detect |
28
27
 
29
- ## Features
28
+ ## What's Included
30
29
 
31
- ### Performance First
32
- - **258,611 req/sec** - HyperExpress server (11x faster than Express)
33
- - **19.9x faster writes** - SQLite with WAL mode
34
- - **Zero-config caching** - Database cache included (optional Redis)
30
+ The created project includes:
35
31
 
36
- ### Modern Stack
32
+ - **Laju Framework** - High-performance TypeScript web framework
37
33
  - **Svelte 5** - Reactive UI with runes
38
34
  - **Inertia.js** - SPA without client-side routing
39
35
  - **TailwindCSS 4** - Utility-first CSS with Vite
40
- - **TypeScript** - Full type safety
41
-
42
- ### Built-in Services
43
- - **Authentication** - Sessions, OAuth (Google), password reset
44
- - **Storage** - S3/Wasabi with presigned URLs
36
+ - **Database** - SQLite + Knex.js migrations
37
+ - **Authentication** - Session-based auth + OAuth (Google)
38
+ - **Storage** - S3/Wasabi support with presigned URLs
45
39
  - **Email** - Nodemailer (SMTP) or Resend (API)
46
40
  - **Caching** - Database cache or Redis
47
- - **Templates** - Eta for SSR
48
-
49
- ## 📊 Performance
50
-
51
- | Framework | Requests/sec | Comparison |
52
- |-----------|--------------|------------|
53
- | **Laju** | **258,611** | Baseline |
54
- | Pure Node.js | 124,024 | 2x slower |
55
- | Express.js | 22,590 | 11x slower |
56
- | Laravel | 80 | 3,232x slower |
57
-
58
- *Benchmark: Simple JSON response on same hardware*
59
-
60
- ## 📚 Documentation
61
-
62
- **[Complete Documentation →](https://github.com/maulanashalihin/laju/tree/main/docs)**
63
-
64
- Documentation is organized for progressive learning from beginner to advanced.
65
41
 
66
- ### Getting Started
67
- - [Introduction](https://github.com/maulanashalihin/laju/blob/main/docs/01-INTRODUCTION.md) - Framework overview, quick start
68
- - [Project Structure](https://github.com/maulanashalihin/laju/blob/main/docs/02-PROJECT-STRUCTURE.md) - Directory layout
69
- - [Database](https://github.com/maulanashalihin/laju/blob/main/docs/03-DATABASE.md) - Knex.js + SQLite
42
+ ## Next Steps
70
43
 
71
- ### Core Features
72
- - [Routing & Controllers](https://github.com/maulanashalihin/laju/blob/main/docs/04-ROUTING-CONTROLLERS.md) - Handle requests
73
- - [Frontend (Svelte 5)](https://github.com/maulanashalihin/laju/blob/main/docs/05-FRONTEND-SVELTE.md) - Build reactive UI
74
- - [Authentication](https://github.com/maulanashalihin/laju/blob/main/docs/06-AUTHENTICATION.md) - Sessions + OAuth
75
- - [Middleware](https://github.com/maulanashalihin/laju/blob/main/docs/07-MIDDLEWARE.md) - Auth, rate limiting
76
- - [Validation](https://github.com/maulanashalihin/laju/blob/main/docs/08-VALIDATION.md) - Input validation
77
- - [Email](https://github.com/maulanashalihin/laju/blob/main/docs/09-EMAIL.md) - Send emails
78
-
79
- ### Advanced Features
80
- - [Storage (S3)](https://github.com/maulanashalihin/laju/blob/main/docs/10-STORAGE.md) - File uploads
81
- - [Caching](https://github.com/maulanashalihin/laju/blob/main/docs/11-CACHING.md) - Redis + Database cache
82
- - [Background Jobs](https://github.com/maulanashalihin/laju/blob/main/docs/12-BACKGROUND-JOBS.md) - Cron jobs, Scheduling
83
- - [CSRF Protection](https://github.com/maulanashalihin/laju/blob/main/docs/13-CSRF.md) - Security
84
- - [Translation](https://github.com/maulanashalihin/laju/blob/main/docs/14-TRANSLATION.md) - Multi-language
85
-
86
- ### Production
87
- - [Best Practices](https://github.com/maulanashalihin/laju/blob/main/docs/16-BEST-PRACTICES.md) - Code quality
88
- - [Security Guide](https://github.com/maulanashalihin/laju/blob/main/docs/17-SECURITY.md) - Secure your app
89
- - [Testing](https://github.com/maulanashalihin/laju/blob/main/docs/19-TESTING.md) - Unit + Integration tests
90
- - [Deployment](https://github.com/maulanashalihin/laju/blob/main/docs/20-DEPLOYMENT.md) - Production setup
91
-
92
- ## Project Structure
93
-
94
- ```
95
- app/
96
- ├── controllers/ # Request handlers
97
- ├── middlewares/ # Auth, rate limiting
98
- ├── services/ # DB, Mailer, Storage
99
- └── validators/ # Input validation
100
-
101
- resources/
102
- ├── js/
103
- │ ├── Pages/ # Svelte/Inertia pages
104
- │ ├── Components/ # Reusable components
105
- │ └── index.css # TailwindCSS 4
106
- └── views/ # Eta templates
107
-
108
- routes/ # Route definitions
109
- migrations/ # Database migrations
110
- ```
111
-
112
- ## Commands
44
+ After creating the project:
113
45
 
114
46
  ```bash
115
- npm run dev # Development
116
- npm run build # Production build
117
- node laju make:controller UserController # Generate controller
118
- npx knex migrate:make create_posts # Create migration
119
- npx knex migrate:latest # Run migrations
120
- ```
121
-
122
- ## Tech Stack
123
-
124
- | Layer | Technology |
125
- |-------|------------|
126
- | Server | HyperExpress |
127
- | Database | BetterSQLite3 + Knex |
128
- | Frontend | Svelte 5 + Inertia.js |
129
- | Styling | TailwindCSS 4 |
130
- | Build | Vite |
131
- | Templates | Eta |
47
+ # Navigate to project
48
+ cd my-app
132
49
 
133
- ## Author
50
+ # Start development
51
+ npm run dev
52
+ ```
134
53
 
135
- **Maulana Shalihin** - [maulana@drip.id](mailto:maulana@drip.id)
54
+ Visit `http://localhost:5555` to view the application.
136
55
 
137
- - [tapsite.ai](https://tapsite.ai) - AI website builder
138
- - [dripsender.id](https://dripsender.id) - Email marketing
139
- - [laju.dev](https://laju.dev) - This framework
56
+ ## Documentation
140
57
 
141
- ## Support
58
+ For complete Laju framework documentation, visit:
142
59
 
143
- - Star this repository
144
- - [Become a Sponsor](https://github.com/sponsors/maulanashalihin)
145
- - Report bugs via [GitHub Issues](https://github.com/maulanashalihin/laju/issues)
60
+ **[Laju Documentation →](https://github.com/maulanashalihin/laju)**
146
61
 
147
62
  ## License
148
63
 
149
- MIT License
64
+ MIT
package/bin/cli.js CHANGED
@@ -191,6 +191,9 @@ program
191
191
  // Update project name in package.json
192
192
  packageJson.name = projectDirectory;
193
193
 
194
+ // Reset version to 0.0.1 for new project
195
+ packageJson.version = '0.0.1';
196
+
194
197
  // Write back package.json
195
198
  fs.writeFileSync(
196
199
  packageJsonPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-laju-app",
3
- "version": "1.1.4",
3
+ "version": "1.2.0",
4
4
  "description": "CLI tool to scaffold new Laju framework projects",
5
5
  "keywords": [
6
6
  "laju",
@@ -34,6 +34,10 @@
34
34
  "README.md",
35
35
  "LICENSE"
36
36
  ],
37
+ "type": "commonjs",
38
+ "publishConfig": {
39
+ "access": "public"
40
+ },
37
41
  "dependencies": {
38
42
  "commander": "^11.0.0",
39
43
  "degit": "^2.8.4",