afront 1.0.25 → 1.0.26

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 (45) 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/manifest.json +25 -25
  6. package/build-prod/offline.html +1023 -1023
  7. package/build-prod/robots.txt +3 -3
  8. package/build-prod-static/manifest.json +25 -25
  9. package/build-prod-static/offline.html +1023 -1023
  10. package/build-prod-static/robots.txt +3 -3
  11. package/install.js +518 -415
  12. package/package.json +102 -102
  13. package/server.js +40 -40
  14. package/src/ARoutes/AFRoutes.js +28 -28
  15. package/src/Api/api.config.js +266 -266
  16. package/src/Api/login.service.js +44 -44
  17. package/src/App.js +28 -28
  18. package/src/Components/Background/MeshGradient.js +18 -18
  19. package/src/Components/Footer/Footer.js +108 -108
  20. package/src/Components/Header/Header.js +149 -149
  21. package/src/Components/Loading/LoadingIndicator.js +12 -12
  22. package/src/Components/Loading/LoadingIndicator.module.css +34 -34
  23. package/src/Components/Loading/LoadingSpinner.js +27 -27
  24. package/src/Components/Loading/LoadingSpinner.module.css +100 -100
  25. package/src/Components/RequireAuth.js +29 -29
  26. package/src/LoadingFallback.js +13 -13
  27. package/src/PageNotFound.js +19 -19
  28. package/src/Pages/Home.js +50 -50
  29. package/src/Pages/Signup.js +230 -230
  30. package/src/Pages/Support.js +68 -68
  31. package/src/Routes/ARoutes.js +66 -66
  32. package/src/Routes/ARoutesStatic.js +83 -83
  33. package/src/Static/appStatic.js +16 -16
  34. package/src/Static/indexStatic.js +13 -13
  35. package/src/Style/App.module.css +11 -11
  36. package/src/Style/MeshGradient.module.css +130 -130
  37. package/src/Style/PageNotFound.module.css +37 -37
  38. package/src/Style/Style.module.css +686 -686
  39. package/src/Style/Support.module.css +185 -185
  40. package/src/Utils/LoadingContext.js +5 -5
  41. package/src/index.js +25 -25
  42. package/webpack.build-prod.js +141 -141
  43. package/webpack.dev.js +127 -127
  44. package/webpack.prod.js +148 -148
  45. package/webpack.ssr.prod.js +97 -97
package/package.json CHANGED
@@ -1,102 +1,102 @@
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
- }
1
+ {
2
+ "name": "afront",
3
+ "version": "1.0.26",
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.12.0",
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;