afront 1.0.22 → 1.0.25
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/.babelrc +13 -13
- package/.env +1 -1
- package/LICENSE +21 -21
- package/README.md +94 -94
- package/build-prod/index.html +1 -1
- package/build-prod/manifest.json +25 -25
- package/build-prod/offline.html +1023 -1023
- package/build-prod/robots.txt +3 -3
- package/build-prod-static/index.html +1 -1
- package/build-prod-static/manifest.json +25 -25
- package/build-prod-static/offline.html +1023 -1023
- package/build-prod-static/robots.txt +3 -3
- package/install.js +415 -415
- package/package.json +102 -95
- package/server.js +40 -40
- package/src/ARoutes/AFRoutes.js +28 -28
- package/src/Api/api.config.js +266 -266
- package/src/Api/login.service.js +44 -44
- package/src/App.js +28 -28
- package/src/Components/Background/MeshGradient.js +18 -18
- package/src/Components/Footer/Footer.js +108 -108
- package/src/Components/Header/Header.js +149 -149
- package/src/Components/Loading/LoadingIndicator.js +12 -12
- package/src/Components/Loading/LoadingIndicator.module.css +34 -34
- package/src/Components/Loading/LoadingSpinner.js +27 -27
- package/src/Components/Loading/LoadingSpinner.module.css +100 -100
- package/src/Components/RequireAuth.js +29 -29
- package/src/LoadingFallback.js +13 -13
- package/src/PageNotFound.js +19 -19
- package/src/Pages/Home.js +50 -50
- package/src/Pages/Signup.js +230 -230
- package/src/Pages/Support.js +68 -68
- package/src/Routes/ARoutes.js +66 -66
- package/src/Routes/ARoutesStatic.js +83 -83
- package/src/Static/appStatic.js +16 -16
- package/src/Static/indexStatic.js +13 -13
- package/src/Style/App.module.css +11 -11
- package/src/Style/MeshGradient.module.css +130 -130
- package/src/Style/PageNotFound.module.css +37 -37
- package/src/Style/Style.module.css +686 -686
- package/src/Style/Support.module.css +185 -185
- package/src/Utils/LoadingContext.js +5 -5
- package/src/index.js +25 -25
- package/webpack.build-prod.js +141 -140
- package/webpack.dev.js +127 -127
- package/webpack.prod.js +148 -147
- package/webpack.ssr.prod.js +97 -97
package/package.json
CHANGED
|
@@ -1,95 +1,102 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "afront",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "AFront is a front-end JavaScript library designed to create seamless server-side rendered (SSSR) websites.",
|
|
5
|
-
"main": "webpack.dev.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"build": "webpack --config webpack.prod.js && webpack --config webpack.post-prod.js",
|
|
8
|
-
"build:ssr": "webpack --config webpack.ssr.prod.js",
|
|
9
|
-
"build:alt": "webpack --config webpack.build-prod.js && webpack --config webpack.post-prod-static.js --stats-error-details",
|
|
10
|
-
"prod:ssr": "node build-prod-ssr/ssr.prod.js",
|
|
11
|
-
"start": "webpack serve --config webpack.dev.js",
|
|
12
|
-
"static": "node server.js"
|
|
13
|
-
},
|
|
14
|
-
"repository": {
|
|
15
|
-
"type": "git",
|
|
16
|
-
"url": "git+https://github.com/Asggen/afront.git"
|
|
17
|
-
},
|
|
18
|
-
"keywords": [
|
|
19
|
-
"afront",
|
|
20
|
-
"ssr",
|
|
21
|
-
"web"
|
|
22
|
-
],
|
|
23
|
-
"author": "imarksea - Piyush Nishad",
|
|
24
|
-
"files": [
|
|
25
|
-
"install.js",
|
|
26
|
-
"server.js",
|
|
27
|
-
"webpack.build-prod.js",
|
|
28
|
-
"webpack.dev.js",
|
|
29
|
-
"webpack.prod.js",
|
|
30
|
-
"webpack.ssr.prod.js",
|
|
31
|
-
".babelrc",
|
|
32
|
-
".env",
|
|
33
|
-
"src/**/*",
|
|
34
|
-
"build-prod/**/*",
|
|
35
|
-
"build-prod-static/**/*",
|
|
36
|
-
"build-prod-ssr/**/*"
|
|
37
|
-
],
|
|
38
|
-
"license": "MIT",
|
|
39
|
-
"dependencies": {
|
|
40
|
-
"adm-zip": "^0.5.16",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"@babel/
|
|
67
|
-
"@babel/
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"webpack": "^
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
"
|
|
88
|
-
},
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "afront",
|
|
3
|
+
"version": "1.0.25",
|
|
4
|
+
"description": "AFront is a front-end JavaScript library designed to create seamless server-side rendered (SSSR) websites.",
|
|
5
|
+
"main": "webpack.dev.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "webpack --config webpack.prod.js && webpack --config webpack.post-prod.js",
|
|
8
|
+
"build:ssr": "webpack --config webpack.ssr.prod.js",
|
|
9
|
+
"build:alt": "webpack --config webpack.build-prod.js && webpack --config webpack.post-prod-static.js --stats-error-details",
|
|
10
|
+
"prod:ssr": "node build-prod-ssr/ssr.prod.js",
|
|
11
|
+
"start": "webpack serve --config webpack.dev.js",
|
|
12
|
+
"static": "node server.js"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/Asggen/afront.git"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"afront",
|
|
20
|
+
"ssr",
|
|
21
|
+
"web"
|
|
22
|
+
],
|
|
23
|
+
"author": "imarksea - Piyush Nishad",
|
|
24
|
+
"files": [
|
|
25
|
+
"install.js",
|
|
26
|
+
"server.js",
|
|
27
|
+
"webpack.build-prod.js",
|
|
28
|
+
"webpack.dev.js",
|
|
29
|
+
"webpack.prod.js",
|
|
30
|
+
"webpack.ssr.prod.js",
|
|
31
|
+
".babelrc",
|
|
32
|
+
".env",
|
|
33
|
+
"src/**/*",
|
|
34
|
+
"build-prod/**/*",
|
|
35
|
+
"build-prod-static/**/*",
|
|
36
|
+
"build-prod-ssr/**/*"
|
|
37
|
+
],
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"adm-zip": "^0.5.16",
|
|
41
|
+
"asggen-headtags": "^1.0.3",
|
|
42
|
+
"babel-plugin-css-modules-transform": "^1.6.2",
|
|
43
|
+
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
44
|
+
"banner-webpack-after-content": "^1.0.3",
|
|
45
|
+
"copy-webpack-plugin": "^12.0.2",
|
|
46
|
+
"csp-html-webpack-plugin": "^5.1.0",
|
|
47
|
+
"dotenv": "^16.4.5",
|
|
48
|
+
"express-rate-limit": "^7.4.1",
|
|
49
|
+
"extract-zip": "^2.0.1",
|
|
50
|
+
"follow-redirects": "^1.15.9",
|
|
51
|
+
"fs-extra": "^11.2.0",
|
|
52
|
+
"helmet": "^8.1.0",
|
|
53
|
+
"html-inline-css-webpack-plugin": "^1.11.2",
|
|
54
|
+
"ignore-styles": "^5.0.1",
|
|
55
|
+
"loader-utils": "^3.3.1",
|
|
56
|
+
"react-router": "^7.5.2",
|
|
57
|
+
"readline-sync": "^1.4.10",
|
|
58
|
+
"styled-components": "^6.1.13",
|
|
59
|
+
"terser-webpack-plugin": "^5.3.10",
|
|
60
|
+
"tmp": "^0.2.3"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@babel/cli": "^7.28.3",
|
|
64
|
+
"@babel/core": "^7.26.0",
|
|
65
|
+
"@babel/preset-env": "^7.26.0",
|
|
66
|
+
"@babel/preset-react": "^7.25.9",
|
|
67
|
+
"@babel/register": "^7.25.9",
|
|
68
|
+
"babel-loader": "^9.2.1",
|
|
69
|
+
"css-loader": "^7.1.2",
|
|
70
|
+
"css-minimizer-webpack-plugin": "^7.0.0",
|
|
71
|
+
"express": "^4.21.1",
|
|
72
|
+
"html-webpack-plugin": "^5.6.3",
|
|
73
|
+
"ignore-styles": "^5.0.1",
|
|
74
|
+
"json5": "^2.2.3",
|
|
75
|
+
"mini-css-extract-plugin": "^2.9.2",
|
|
76
|
+
"patch-package": "^8.0.0",
|
|
77
|
+
"postcss": "^8.5.6",
|
|
78
|
+
"react": "^18.3.1",
|
|
79
|
+
"react-dom": "^18.3.1",
|
|
80
|
+
"style-loader": "^4.0.0",
|
|
81
|
+
"webpack": "^5.96.1",
|
|
82
|
+
"webpack-cli": "^5.1.4",
|
|
83
|
+
"webpack-dev-server": "^5.2.1",
|
|
84
|
+
"webpack-node-externals": "^3.0.0"
|
|
85
|
+
},
|
|
86
|
+
"resolutions": {
|
|
87
|
+
"loader-utils": "^3.3.1"
|
|
88
|
+
},
|
|
89
|
+
"overrides": {
|
|
90
|
+
"generic-names": {
|
|
91
|
+
"loader-utils": "^3.3.1"
|
|
92
|
+
},
|
|
93
|
+
"loader-utils": "^3.3.1",
|
|
94
|
+
"json5": "^2.2.3",
|
|
95
|
+
"styled-components": {
|
|
96
|
+
"postcss": "8.5.6"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"bin": {
|
|
100
|
+
"afront": "install.js"
|
|
101
|
+
}
|
|
102
|
+
}
|
package/server.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
const express = require("express");
|
|
2
|
-
const path = require("path");
|
|
3
|
-
const RateLimit = require("express-rate-limit");
|
|
4
|
-
const helmet = require("helmet");
|
|
5
|
-
require("dotenv").config();
|
|
6
|
-
|
|
7
|
-
const app = express();
|
|
8
|
-
const PORT = process.env.PORT;
|
|
9
|
-
const HOST = process.env.HOST;
|
|
10
|
-
|
|
11
|
-
app.set("trust proxy", 1);
|
|
12
|
-
|
|
13
|
-
// Disable the X-Powered-By header to avoid exposing Express
|
|
14
|
-
app.disable("x-powered-by");
|
|
15
|
-
|
|
16
|
-
// Use Helmet to set various HTTP headers for better security
|
|
17
|
-
app.use(helmet());
|
|
18
|
-
|
|
19
|
-
// Set up rate limiter: maximum of 100 requests per 15 minutes
|
|
20
|
-
const limiter = RateLimit({
|
|
21
|
-
windowMs: 15 * 60 * 1000, // 15 minutes
|
|
22
|
-
max: 100, // max 100 requests per windowMs
|
|
23
|
-
message: "Too many requests from this IP, please try again after 15 minutes",
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
// Apply rate limiter to all requests
|
|
27
|
-
app.use(limiter);
|
|
28
|
-
|
|
29
|
-
// Serve static files from the build-prod-static directory
|
|
30
|
-
app.use(express.static(path.join(__dirname, "build-prod-static")));
|
|
31
|
-
|
|
32
|
-
// Serve index.html for all other routes (except static files)
|
|
33
|
-
app.get("*", (req, res) => {
|
|
34
|
-
const indexPath = path.join(__dirname, "build-prod-static", "index.html");
|
|
35
|
-
res.sendFile(indexPath);
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
app.listen(PORT, HOST, () => {
|
|
39
|
-
console.log(`Server is running on http://${HOST}:${PORT}`);
|
|
40
|
-
});
|
|
1
|
+
const express = require("express");
|
|
2
|
+
const path = require("path");
|
|
3
|
+
const RateLimit = require("express-rate-limit");
|
|
4
|
+
const helmet = require("helmet");
|
|
5
|
+
require("dotenv").config();
|
|
6
|
+
|
|
7
|
+
const app = express();
|
|
8
|
+
const PORT = process.env.PORT;
|
|
9
|
+
const HOST = process.env.HOST;
|
|
10
|
+
|
|
11
|
+
app.set("trust proxy", 1);
|
|
12
|
+
|
|
13
|
+
// Disable the X-Powered-By header to avoid exposing Express
|
|
14
|
+
app.disable("x-powered-by");
|
|
15
|
+
|
|
16
|
+
// Use Helmet to set various HTTP headers for better security
|
|
17
|
+
app.use(helmet());
|
|
18
|
+
|
|
19
|
+
// Set up rate limiter: maximum of 100 requests per 15 minutes
|
|
20
|
+
const limiter = RateLimit({
|
|
21
|
+
windowMs: 15 * 60 * 1000, // 15 minutes
|
|
22
|
+
max: 100, // max 100 requests per windowMs
|
|
23
|
+
message: "Too many requests from this IP, please try again after 15 minutes",
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// Apply rate limiter to all requests
|
|
27
|
+
app.use(limiter);
|
|
28
|
+
|
|
29
|
+
// Serve static files from the build-prod-static directory
|
|
30
|
+
app.use(express.static(path.join(__dirname, "build-prod-static")));
|
|
31
|
+
|
|
32
|
+
// Serve index.html for all other routes (except static files)
|
|
33
|
+
app.get("*", (req, res) => {
|
|
34
|
+
const indexPath = path.join(__dirname, "build-prod-static", "index.html");
|
|
35
|
+
res.sendFile(indexPath);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
app.listen(PORT, HOST, () => {
|
|
39
|
+
console.log(`Server is running on http://${HOST}:${PORT}`);
|
|
40
|
+
});
|
package/src/ARoutes/AFRoutes.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { lazy } from "react";
|
|
2
|
-
|
|
3
|
-
const routes = [
|
|
4
|
-
{
|
|
5
|
-
path: "/",
|
|
6
|
-
element: lazy(() => import("../Pages/Home.js")),
|
|
7
|
-
withHeaderFooter: true,
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
path: "/signup",
|
|
11
|
-
element: lazy(() => import("../Pages/Signup.js")),
|
|
12
|
-
withHeaderFooter: false,
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
path: "/support/s",
|
|
16
|
-
element: lazy(() => import("../Pages/Support.js")),
|
|
17
|
-
protected: true,
|
|
18
|
-
withHeaderFooter: true,
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
path: "/*",
|
|
22
|
-
element: lazy(() => import("../PageNotFound.js")),
|
|
23
|
-
withHeaderFooter: true,
|
|
24
|
-
}, // Page Not Found route
|
|
25
|
-
// Add More Pages
|
|
26
|
-
];
|
|
27
|
-
|
|
28
|
-
export default routes;
|
|
1
|
+
import { lazy } from "react";
|
|
2
|
+
|
|
3
|
+
const routes = [
|
|
4
|
+
{
|
|
5
|
+
path: "/",
|
|
6
|
+
element: lazy(() => import("../Pages/Home.js")),
|
|
7
|
+
withHeaderFooter: true,
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
path: "/signup",
|
|
11
|
+
element: lazy(() => import("../Pages/Signup.js")),
|
|
12
|
+
withHeaderFooter: false,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
path: "/support/s",
|
|
16
|
+
element: lazy(() => import("../Pages/Support.js")),
|
|
17
|
+
protected: true,
|
|
18
|
+
withHeaderFooter: true,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
path: "/*",
|
|
22
|
+
element: lazy(() => import("../PageNotFound.js")),
|
|
23
|
+
withHeaderFooter: true,
|
|
24
|
+
}, // Page Not Found route
|
|
25
|
+
// Add More Pages
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
export default routes;
|