baraqex 1.0.49 → 1.0.51

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 (31) hide show
  1. package/dist/index.js +189 -251
  2. package/dist/index.js.map +4 -4
  3. package/dist/server.js +849 -1282
  4. package/dist/server.js.map +4 -4
  5. package/package.json +1 -1
  6. package/templates/basic-app/.eslintignore +5 -0
  7. package/templates/basic-app/.eslintrc.json +25 -0
  8. package/templates/basic-app/README.md +166 -0
  9. package/templates/basic-app/esbuild.config.js +37 -0
  10. package/templates/basic-app/favicon.ico +0 -0
  11. package/templates/basic-app/index.html +13 -0
  12. package/templates/basic-app/main.css +3 -0
  13. package/templates/basic-app/package-lock.json +6856 -0
  14. package/templates/basic-app/package.json +31 -20
  15. package/templates/basic-app/postcss.config.js +6 -0
  16. package/templates/basic-app/public/logo.png +0 -0
  17. package/templates/basic-app/src/main.css +77 -0
  18. package/templates/basic-app/src/main.tsx +465 -0
  19. package/templates/basic-app/tailwind.config.js +38 -0
  20. package/templates/basic-app/tsconfig.json +13 -0
  21. package/templates/basic-app/vite.config.ts +8 -0
  22. package/templates/fullstack-template/package.json +5 -23
  23. package/templates/fullstack-template/server.js +11 -572
  24. package/templates/basic-app/public/index.html +0 -13
  25. package/templates/basic-app/public/styles.css +0 -158
  26. package/templates/basic-app/server.js +0 -15
  27. package/templates/basic-app/src/App.jsx +0 -68
  28. package/templates/basic-template/README.md +0 -24
  29. package/templates/basic-template/package.json +0 -13
  30. package/templates/basic-template/server.js +0 -36
  31. package/templates/fullstack-template/package-lock.json +0 -1895
@@ -1,158 +0,0 @@
1
- * {
2
- margin: 0;
3
- padding: 0;
4
- box-sizing: border-box;
5
- }
6
-
7
- body {
8
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
9
- line-height: 1.6;
10
- color: #333;
11
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
12
- min-height: 100vh;
13
- }
14
-
15
- .app {
16
- max-width: 800px;
17
- margin: 0 auto;
18
- padding: 20px;
19
- background: white;
20
- border-radius: 10px;
21
- box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
22
- margin-top: 20px;
23
- margin-bottom: 20px;
24
- }
25
-
26
- .app-header {
27
- text-align: center;
28
- margin-bottom: 40px;
29
- padding-bottom: 20px;
30
- border-bottom: 2px solid #f0f0f0;
31
- }
32
-
33
- .app-header h1 {
34
- color: #667eea;
35
- font-size: 2.5rem;
36
- margin-bottom: 10px;
37
- }
38
-
39
- .counter-section {
40
- text-align: center;
41
- margin-bottom: 40px;
42
- }
43
-
44
- .counter-display {
45
- margin: 30px 0;
46
- }
47
-
48
- .count-value {
49
- font-size: 4rem;
50
- font-weight: bold;
51
- color: #667eea;
52
- display: inline-block;
53
- padding: 20px 40px;
54
- border: 3px solid #667eea;
55
- border-radius: 50px;
56
- background: linear-gradient(45deg, #f8f9ff, #ffffff);
57
- }
58
-
59
- .counter-controls {
60
- display: flex;
61
- gap: 15px;
62
- justify-content: center;
63
- flex-wrap: wrap;
64
- }
65
-
66
- .btn {
67
- padding: 12px 24px;
68
- border: none;
69
- border-radius: 6px;
70
- font-size: 1rem;
71
- cursor: pointer;
72
- transition: all 0.3s ease;
73
- font-weight: 600;
74
- }
75
-
76
- .btn-primary {
77
- background: #667eea;
78
- color: white;
79
- }
80
-
81
- .btn-primary:hover {
82
- background: #5a6fd8;
83
- transform: translateY(-2px);
84
- }
85
-
86
- .btn-secondary {
87
- background: #6c757d;
88
- color: white;
89
- }
90
-
91
- .btn-secondary:hover {
92
- background: #5a6268;
93
- transform: translateY(-2px);
94
- }
95
-
96
- .btn-danger {
97
- background: #dc3545;
98
- color: white;
99
- }
100
-
101
- .btn-danger:hover {
102
- background: #c82333;
103
- transform: translateY(-2px);
104
- }
105
-
106
- .info-section {
107
- background: #f8f9fa;
108
- padding: 30px;
109
- border-radius: 8px;
110
- margin-bottom: 30px;
111
- }
112
-
113
- .info-section h3 {
114
- color: #667eea;
115
- margin-bottom: 15px;
116
- }
117
-
118
- .info-section ul {
119
- list-style: none;
120
- padding-left: 0;
121
- }
122
-
123
- .info-section li {
124
- margin-bottom: 8px;
125
- font-size: 1.1rem;
126
- }
127
-
128
- .app-footer {
129
- text-align: center;
130
- padding-top: 20px;
131
- border-top: 1px solid #f0f0f0;
132
- color: #666;
133
- }
134
-
135
- @media (max-width: 768px) {
136
- .app {
137
- margin: 10px;
138
- padding: 15px;
139
- }
140
-
141
- .app-header h1 {
142
- font-size: 2rem;
143
- }
144
-
145
- .count-value {
146
- font-size: 3rem;
147
- padding: 15px 30px;
148
- }
149
-
150
- .counter-controls {
151
- flex-direction: column;
152
- align-items: center;
153
- }
154
-
155
- .btn {
156
- width: 200px;
157
- }
158
- }
@@ -1,15 +0,0 @@
1
- import { createServer } from '../../dist/server/index.js';
2
-
3
- const server = createServer({
4
- port: process.env.PORT || 3000,
5
- staticDir: './public',
6
- enableCors: true
7
- });
8
-
9
- server.start().then(() => {
10
- console.log('🚀 Baraqex Basic App server started successfully!');
11
- console.log('📱 Visit http://localhost:3000 to see your app');
12
- }).catch(error => {
13
- console.error('❌ Failed to start server:', error);
14
- process.exit(1);
15
- });
@@ -1,68 +0,0 @@
1
- import { jsx, useState, useEffect } from 'baraqex';
2
-
3
- export default function App() {
4
- const [count, setCount] = useState(0);
5
- const [message, setMessage] = useState('Welcome to Baraqex!');
6
-
7
- useEffect(() => {
8
- console.log('App component mounted');
9
- }, []);
10
-
11
- const increment = () => {
12
- setCount(prev => prev + 1);
13
- };
14
-
15
- const decrement = () => {
16
- setCount(prev => prev - 1);
17
- };
18
-
19
- const resetCount = () => {
20
- setCount(0);
21
- setMessage('Counter reset!');
22
- };
23
-
24
- return (
25
- <div className="app">
26
- <header className="app-header">
27
- <h1>{message}</h1>
28
- <p>This is a basic Baraqex application template.</p>
29
- </header>
30
-
31
- <main className="app-main">
32
- <div className="counter-section">
33
- <h2>Interactive Counter</h2>
34
- <div className="counter-display">
35
- <span className="count-value">{count}</span>
36
- </div>
37
-
38
- <div className="counter-controls">
39
- <button onClick={decrement} className="btn btn-secondary">
40
- - Decrease
41
- </button>
42
- <button onClick={increment} className="btn btn-primary">
43
- + Increase
44
- </button>
45
- <button onClick={resetCount} className="btn btn-danger">
46
- Reset
47
- </button>
48
- </div>
49
- </div>
50
-
51
- <div className="info-section">
52
- <h3>Features Included:</h3>
53
- <ul>
54
- <li>✅ Modern JSX components</li>
55
- <li>✅ State management with hooks</li>
56
- <li>✅ Event handling</li>
57
- <li>✅ Component lifecycle</li>
58
- <li>✅ Responsive design</li>
59
- </ul>
60
- </div>
61
- </main>
62
-
63
- <footer className="app-footer">
64
- <p>Built with ❤️ using Baraqex Framework</p>
65
- </footer>
66
- </div>
67
- );
68
- }
@@ -1,24 +0,0 @@
1
- # Basic Frontend Hamroun App
2
-
3
- A simple Frontend Hamroun application.
4
-
5
- ## Getting Started
6
-
7
- ```bash
8
- npm install
9
- npm run dev
10
- ```
11
-
12
- Visit http://localhost:3000 to see your app.
13
-
14
- ## What's Included
15
-
16
- - Express server with Frontend Hamroun SSR
17
- - Simple component structure
18
- - Ready to customize and expand
19
-
20
- ## Next Steps
21
-
22
- - Edit `server.js` to add more components
23
- - Add styling and interactivity
24
- - Explore Frontend Hamroun documentation
@@ -1,13 +0,0 @@
1
- {
2
- "name": "basic-app",
3
- "version": "1.0.0",
4
- "type": "module",
5
- "scripts": {
6
- "dev": "node server.js",
7
- "start": "node server.js"
8
- },
9
- "dependencies": {
10
- "frontend-hamroun": "latest",
11
- "express": "^4.18.2"
12
- }
13
- }
@@ -1,36 +0,0 @@
1
- import express from 'express';
2
- import { renderToString, jsx } from 'frontend-hamroun';
3
-
4
- const app = express();
5
- const port = 3000;
6
-
7
- // Simple component
8
- function App() {
9
- return jsx('div', { style: { padding: '2rem', textAlign: 'center' } },
10
- jsx('h1', null, 'Hello Frontend Hamroun!'),
11
- jsx('p', null, 'Your app is running successfully.'),
12
- jsx('p', null, 'Edit server.js to get started!')
13
- );
14
- }
15
-
16
- app.get('/', async (req, res) => {
17
- const html = await renderToString(jsx(App));
18
- res.send(`
19
- <!DOCTYPE html>
20
- <html>
21
- <head>
22
- <title>Basic Frontend Hamroun App</title>
23
- <style>
24
- body { font-family: -apple-system, BlinkMacSystemFont, sans-serif; margin: 0; }
25
- </style>
26
- </head>
27
- <body>
28
- <div id="root">${html}</div>
29
- </body>
30
- </html>
31
- `);
32
- });
33
-
34
- app.listen(port, () => {
35
- console.log(`Server running at http://localhost:${port}`);
36
- });