afront 1.0.24 → 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.
Files changed (48) hide show
  1. package/.babelrc +13 -13
  2. package/.env +1 -1
  3. package/LICENSE +21 -21
  4. package/README.md +94 -94
  5. package/build-prod/index.html +1 -1
  6. package/build-prod/manifest.json +25 -25
  7. package/build-prod/offline.html +1023 -1023
  8. package/build-prod/robots.txt +3 -3
  9. package/build-prod-static/index.html +1 -1
  10. package/build-prod-static/manifest.json +25 -25
  11. package/build-prod-static/offline.html +1023 -1023
  12. package/build-prod-static/robots.txt +3 -3
  13. package/install.js +415 -415
  14. package/package.json +102 -96
  15. package/server.js +40 -40
  16. package/src/ARoutes/AFRoutes.js +28 -28
  17. package/src/Api/api.config.js +266 -266
  18. package/src/Api/login.service.js +44 -44
  19. package/src/App.js +28 -28
  20. package/src/Components/Background/MeshGradient.js +18 -18
  21. package/src/Components/Footer/Footer.js +108 -108
  22. package/src/Components/Header/Header.js +149 -149
  23. package/src/Components/Loading/LoadingIndicator.js +12 -12
  24. package/src/Components/Loading/LoadingIndicator.module.css +34 -34
  25. package/src/Components/Loading/LoadingSpinner.js +27 -27
  26. package/src/Components/Loading/LoadingSpinner.module.css +100 -100
  27. package/src/Components/RequireAuth.js +29 -29
  28. package/src/LoadingFallback.js +13 -13
  29. package/src/PageNotFound.js +19 -19
  30. package/src/Pages/Home.js +50 -50
  31. package/src/Pages/Signup.js +230 -230
  32. package/src/Pages/Support.js +68 -68
  33. package/src/Routes/ARoutes.js +66 -66
  34. package/src/Routes/ARoutesStatic.js +83 -83
  35. package/src/Static/appStatic.js +16 -16
  36. package/src/Static/indexStatic.js +13 -13
  37. package/src/Style/App.module.css +11 -11
  38. package/src/Style/MeshGradient.module.css +130 -130
  39. package/src/Style/PageNotFound.module.css +37 -37
  40. package/src/Style/Style.module.css +686 -686
  41. package/src/Style/Support.module.css +185 -185
  42. package/src/Utils/LoadingContext.js +5 -5
  43. package/src/index.js +25 -25
  44. package/webpack.build-prod.js +141 -140
  45. package/webpack.dev.js +127 -127
  46. package/webpack.prod.js +148 -147
  47. package/webpack.ssr.prod.js +97 -97
  48. package/npm-shrinkwrap.json +0 -9641
package/package.json CHANGED
@@ -1,96 +1,102 @@
1
- {
2
- "name": "afront",
3
- "version": "1.0.24",
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
- "npm-shrinkwrap.json",
27
- "server.js",
28
- "webpack.build-prod.js",
29
- "webpack.dev.js",
30
- "webpack.prod.js",
31
- "webpack.ssr.prod.js",
32
- ".babelrc",
33
- ".env",
34
- "src/**/*",
35
- "build-prod/**/*",
36
- "build-prod-static/**/*",
37
- "build-prod-ssr/**/*"
38
- ],
39
- "license": "MIT",
40
- "dependencies": {
41
- "adm-zip": "^0.5.16",
42
- "afront": "^1.0.24",
43
- "asggen-headtags": "^1.0.3",
44
- "aui": "file:../AUI",
45
- "babel-plugin-css-modules-transform": "^1.6.2",
46
- "babel-plugin-dynamic-import-node": "^2.3.3",
47
- "banner-webpack-after-content": "^1.0.3",
48
- "copy-webpack-plugin": "^12.0.2",
49
- "csp-html-webpack-plugin": "^5.1.0",
50
- "dotenv": "^16.4.5",
51
- "express-rate-limit": "^7.4.1",
52
- "extract-zip": "^2.0.1",
53
- "follow-redirects": "^1.15.9",
54
- "fs-extra": "^11.2.0",
55
- "helmet": "^8.1.0",
56
- "html-inline-css-webpack-plugin": "^1.11.2",
57
- "ignore-styles": "^5.0.1",
58
- "loader-utils": "^3.3.1",
59
- "postcss": "^8.5.6",
60
- "react-router": "^7.5.2",
61
- "readline-sync": "^1.4.10",
62
- "styled-components": "^6.1.13",
63
- "terser-webpack-plugin": "^5.3.10",
64
- "tmp": "^0.2.3"
65
- },
66
- "devDependencies": {
67
- "@babel/cli": "^7.28.3",
68
- "@babel/core": "^7.26.0",
69
- "@babel/preset-env": "^7.26.0",
70
- "@babel/preset-react": "^7.25.9",
71
- "@babel/register": "^7.25.9",
72
- "babel-loader": "^9.2.1",
73
- "css-loader": "^7.1.2",
74
- "css-minimizer-webpack-plugin": "^7.0.0",
75
- "express": "^4.21.1",
76
- "html-webpack-plugin": "^5.6.3",
77
- "ignore-styles": "^5.0.1",
78
- "json5": "^2.2.3",
79
- "mini-css-extract-plugin": "^2.9.2",
80
- "patch-package": "^8.0.0",
81
- "postcss": "^8.5.6",
82
- "react": "^18.3.1",
83
- "react-dom": "^18.3.1",
84
- "style-loader": "^4.0.0",
85
- "webpack": "^5.96.1",
86
- "webpack-cli": "^5.1.4",
87
- "webpack-dev-server": "^5.2.1",
88
- "webpack-node-externals": "^3.0.0"
89
- },
90
- "resolutions": {
91
- "loader-utils": "^3.3.1"
92
- },
93
- "bin": {
94
- "afront": "install.js"
95
- }
96
- }
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
+ });
@@ -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;