ostroner 1.0.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 (112) hide show
  1. package/bin/create-project.js +57 -0
  2. package/package.json +23 -0
  3. package/templates/stock-chain/backend/.env +9 -0
  4. package/templates/stock-chain/backend/.eslintrc.js +6 -0
  5. package/templates/stock-chain/backend/.prettierrc +14 -0
  6. package/templates/stock-chain/backend/README.md +1 -0
  7. package/templates/stock-chain/backend/package-lock.json +1666 -0
  8. package/templates/stock-chain/backend/package.json +21 -0
  9. package/templates/stock-chain/backend/src/app.js +59 -0
  10. package/templates/stock-chain/backend/src/config/db.js +29 -0
  11. package/templates/stock-chain/backend/src/controllers/auth.js +31 -0
  12. package/templates/stock-chain/backend/src/controllers/bookingcontroller.js +65 -0
  13. package/templates/stock-chain/backend/src/controllers/buscontroller.js +59 -0
  14. package/templates/stock-chain/backend/src/controllers/deliverycontroller.js +35 -0
  15. package/templates/stock-chain/backend/src/controllers/schedulecontroller.js +85 -0
  16. package/templates/stock-chain/backend/src/controllers/shipmentcontroller.js +35 -0
  17. package/templates/stock-chain/backend/src/controllers/suppliercontroller.js +35 -0
  18. package/templates/stock-chain/backend/src/controllers/usercontroller.js +59 -0
  19. package/templates/stock-chain/backend/src/middleware/auth.js +11 -0
  20. package/templates/stock-chain/backend/src/middleware/errorHandler.js +7 -0
  21. package/templates/stock-chain/backend/src/models/delivery.js +20 -0
  22. package/templates/stock-chain/backend/src/models/index.js +6 -0
  23. package/templates/stock-chain/backend/src/models/shipment.js +20 -0
  24. package/templates/stock-chain/backend/src/models/supplier.js +17 -0
  25. package/templates/stock-chain/backend/src/models/user.js +15 -0
  26. package/templates/stock-chain/backend/src/routes/authroute.js +11 -0
  27. package/templates/stock-chain/backend/src/routes/bookingroute.js +18 -0
  28. package/templates/stock-chain/backend/src/routes/busroute.js +18 -0
  29. package/templates/stock-chain/backend/src/routes/deliveriesroute.js +18 -0
  30. package/templates/stock-chain/backend/src/routes/scheduleroute.js +18 -0
  31. package/templates/stock-chain/backend/src/routes/shipmentsroute.js +18 -0
  32. package/templates/stock-chain/backend/src/routes/suppliersroute.js +18 -0
  33. package/templates/stock-chain/backend/src/routes/userroute.js +18 -0
  34. package/templates/stock-chain/frontend/.env +1 -0
  35. package/templates/stock-chain/frontend/README.md +16 -0
  36. package/templates/stock-chain/frontend/eslint.config.js +21 -0
  37. package/templates/stock-chain/frontend/index.html +13 -0
  38. package/templates/stock-chain/frontend/package-lock.json +3131 -0
  39. package/templates/stock-chain/frontend/package.json +33 -0
  40. package/templates/stock-chain/frontend/public/favicon.svg +1 -0
  41. package/templates/stock-chain/frontend/public/icons.svg +24 -0
  42. package/templates/stock-chain/frontend/src/App.jsx +55 -0
  43. package/templates/stock-chain/frontend/src/assets/hero.png +0 -0
  44. package/templates/stock-chain/frontend/src/assets/react.svg +1 -0
  45. package/templates/stock-chain/frontend/src/assets/vite.svg +1 -0
  46. package/templates/stock-chain/frontend/src/components/Button.jsx +15 -0
  47. package/templates/stock-chain/frontend/src/components/Input.jsx +25 -0
  48. package/templates/stock-chain/frontend/src/context/AuthContext.jsx +59 -0
  49. package/templates/stock-chain/frontend/src/index.css +7 -0
  50. package/templates/stock-chain/frontend/src/main.jsx +18 -0
  51. package/templates/stock-chain/frontend/src/pages/AppLayout.jsx +125 -0
  52. package/templates/stock-chain/frontend/src/pages/Login.jsx +78 -0
  53. package/templates/stock-chain/frontend/src/pages/ManagerDeliveries.jsx +113 -0
  54. package/templates/stock-chain/frontend/src/pages/ManagerShipments.jsx +113 -0
  55. package/templates/stock-chain/frontend/src/pages/ManagerSuppliers.jsx +122 -0
  56. package/templates/stock-chain/frontend/src/pages/Register.jsx +60 -0
  57. package/templates/stock-chain/frontend/src/services/api.js +8 -0
  58. package/templates/stock-chain/frontend/src/services/authService.js +11 -0
  59. package/templates/stock-chain/frontend/vite.config.js +8 -0
  60. package/templates/y-bus/backend/.env +9 -0
  61. package/templates/y-bus/backend/.eslintrc.js +6 -0
  62. package/templates/y-bus/backend/.prettierrc +14 -0
  63. package/templates/y-bus/backend/README.md +1 -0
  64. package/templates/y-bus/backend/package-lock.json +1666 -0
  65. package/templates/y-bus/backend/package.json +21 -0
  66. package/templates/y-bus/backend/src/app.js +44 -0
  67. package/templates/y-bus/backend/src/config/db.js +29 -0
  68. package/templates/y-bus/backend/src/controllers/auth.js +23 -0
  69. package/templates/y-bus/backend/src/controllers/bookingcontroller.js +65 -0
  70. package/templates/y-bus/backend/src/controllers/buscontroller.js +59 -0
  71. package/templates/y-bus/backend/src/controllers/schedulecontroller.js +85 -0
  72. package/templates/y-bus/backend/src/controllers/usercontroller.js +59 -0
  73. package/templates/y-bus/backend/src/middleware/auth.js +11 -0
  74. package/templates/y-bus/backend/src/middleware/errorHandler.js +7 -0
  75. package/templates/y-bus/backend/src/models/booking.js +27 -0
  76. package/templates/y-bus/backend/src/models/bus.js +16 -0
  77. package/templates/y-bus/backend/src/models/index.js +15 -0
  78. package/templates/y-bus/backend/src/models/schedule.js +25 -0
  79. package/templates/y-bus/backend/src/models/user.js +20 -0
  80. package/templates/y-bus/backend/src/routes/bookingroute.js +18 -0
  81. package/templates/y-bus/backend/src/routes/busroute.js +18 -0
  82. package/templates/y-bus/backend/src/routes/scheduleroute.js +18 -0
  83. package/templates/y-bus/backend/src/routes/userroute.js +18 -0
  84. package/templates/y-bus/frontend/.env +1 -0
  85. package/templates/y-bus/frontend/README.md +16 -0
  86. package/templates/y-bus/frontend/eslint.config.js +21 -0
  87. package/templates/y-bus/frontend/index.html +13 -0
  88. package/templates/y-bus/frontend/package-lock.json +3131 -0
  89. package/templates/y-bus/frontend/package.json +33 -0
  90. package/templates/y-bus/frontend/public/favicon.svg +1 -0
  91. package/templates/y-bus/frontend/public/icons.svg +24 -0
  92. package/templates/y-bus/frontend/src/App.jsx +108 -0
  93. package/templates/y-bus/frontend/src/assets/hero.png +0 -0
  94. package/templates/y-bus/frontend/src/assets/react.svg +1 -0
  95. package/templates/y-bus/frontend/src/assets/vite.svg +1 -0
  96. package/templates/y-bus/frontend/src/components/Button.jsx +15 -0
  97. package/templates/y-bus/frontend/src/components/Input.jsx +25 -0
  98. package/templates/y-bus/frontend/src/context/AuthContext.jsx +59 -0
  99. package/templates/y-bus/frontend/src/index.css +7 -0
  100. package/templates/y-bus/frontend/src/main.jsx +18 -0
  101. package/templates/y-bus/frontend/src/pages/AppLayout.jsx +135 -0
  102. package/templates/y-bus/frontend/src/pages/CustomerTrips.jsx +101 -0
  103. package/templates/y-bus/frontend/src/pages/Login.jsx +81 -0
  104. package/templates/y-bus/frontend/src/pages/ManagerBuses.jsx +140 -0
  105. package/templates/y-bus/frontend/src/pages/ManagerDashboard.jsx +108 -0
  106. package/templates/y-bus/frontend/src/pages/ManagerReport.jsx +89 -0
  107. package/templates/y-bus/frontend/src/pages/ManagerSchedules.jsx +233 -0
  108. package/templates/y-bus/frontend/src/pages/MyBookings.jsx +78 -0
  109. package/templates/y-bus/frontend/src/pages/Register.jsx +67 -0
  110. package/templates/y-bus/frontend/src/services/api.js +8 -0
  111. package/templates/y-bus/frontend/src/services/authService.js +33 -0
  112. package/templates/y-bus/frontend/vite.config.js +8 -0
@@ -0,0 +1,18 @@
1
+ import { Router } from "express";
2
+ import {
3
+ createDelivery,
4
+ deleteDelivery,
5
+ getAllDeliveries,
6
+ getDeliveryById,
7
+ updateDelivery,
8
+ } from "../controllers/deliverycontroller.js";
9
+
10
+ const router = Router();
11
+
12
+ router.get("/", getAllDeliveries);
13
+ router.get("/:id", getDeliveryById);
14
+ router.post("/", createDelivery);
15
+ router.put("/:id", updateDelivery);
16
+ router.delete("/:id", deleteDelivery);
17
+
18
+ export default router;
@@ -0,0 +1,18 @@
1
+ import { Router } from "express";
2
+ import {
3
+ createSchedule,
4
+ deleteSchedule,
5
+ getAllSchedules,
6
+ getScheduleById,
7
+ updateSchedule,
8
+ } from "../controllers/schedulecontroller.js";
9
+
10
+ const router = Router();
11
+
12
+ router.get("/", getAllSchedules);
13
+ router.get("/:id", getScheduleById);
14
+ router.post("/", createSchedule);
15
+ router.put("/:id", updateSchedule);
16
+ router.delete("/:id", deleteSchedule);
17
+
18
+ export default router;
@@ -0,0 +1,18 @@
1
+ import { Router } from "express";
2
+ import {
3
+ createShipment,
4
+ deleteShipment,
5
+ getAllShipments,
6
+ getShipmentById,
7
+ updateShipment,
8
+ } from "../controllers/shipmentcontroller.js";
9
+
10
+ const router = Router();
11
+
12
+ router.get("/", getAllShipments);
13
+ router.get("/:id", getShipmentById);
14
+ router.post("/", createShipment);
15
+ router.put("/:id", updateShipment);
16
+ router.delete("/:id", deleteShipment);
17
+
18
+ export default router;
@@ -0,0 +1,18 @@
1
+ import { Router } from "express";
2
+ import {
3
+ createSupplier,
4
+ deleteSupplier,
5
+ getAllSuppliers,
6
+ getSupplierById,
7
+ updateSupplier,
8
+ } from "../controllers/suppliercontroller.js";
9
+
10
+ const router = Router();
11
+
12
+ router.get("/", getAllSuppliers);
13
+ router.get("/:id", getSupplierById);
14
+ router.post("/", createSupplier);
15
+ router.put("/:id", updateSupplier);
16
+ router.delete("/:id", deleteSupplier);
17
+
18
+ export default router;
@@ -0,0 +1,18 @@
1
+ import { Router } from "express";
2
+ import {
3
+ createUser,
4
+ deleteUser,
5
+ getAllUsers,
6
+ getUserById,
7
+ updateUser,
8
+ } from "../controllers/usercontroller.js";
9
+
10
+ const router = Router();
11
+
12
+ router.get("/", getAllUsers);
13
+ router.get("/:id", getUserById);
14
+ router.post("/", createUser);
15
+ router.put("/:id", updateUser);
16
+ router.delete("/:id", deleteUser);
17
+
18
+ export default router;
@@ -0,0 +1 @@
1
+ VITE_API_URL=http://localhost:5000/api
@@ -0,0 +1,16 @@
1
+ # React + Vite
2
+
3
+ This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
+
5
+ Currently, two official plugins are available:
6
+
7
+ - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
8
+ - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
9
+
10
+ ## React Compiler
11
+
12
+ The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
13
+
14
+ ## Expanding the ESLint configuration
15
+
16
+ If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project.
@@ -0,0 +1,21 @@
1
+ import js from '@eslint/js'
2
+ import globals from 'globals'
3
+ import reactHooks from 'eslint-plugin-react-hooks'
4
+ import reactRefresh from 'eslint-plugin-react-refresh'
5
+ import { defineConfig, globalIgnores } from 'eslint/config'
6
+
7
+ export default defineConfig([
8
+ globalIgnores(['dist']),
9
+ {
10
+ files: ['**/*.{js,jsx}'],
11
+ extends: [
12
+ js.configs.recommended,
13
+ reactHooks.configs.flat.recommended,
14
+ reactRefresh.configs.vite,
15
+ ],
16
+ languageOptions: {
17
+ globals: globals.browser,
18
+ parserOptions: { ecmaFeatures: { jsx: true } },
19
+ },
20
+ },
21
+ ])
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>frontend</title>
8
+ </head>
9
+ <body>
10
+ <div id="root"></div>
11
+ <script type="module" src="/src/main.jsx"></script>
12
+ </body>
13
+ </html>