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.
- package/bin/create-project.js +57 -0
- package/package.json +23 -0
- package/templates/stock-chain/backend/.env +9 -0
- package/templates/stock-chain/backend/.eslintrc.js +6 -0
- package/templates/stock-chain/backend/.prettierrc +14 -0
- package/templates/stock-chain/backend/README.md +1 -0
- package/templates/stock-chain/backend/package-lock.json +1666 -0
- package/templates/stock-chain/backend/package.json +21 -0
- package/templates/stock-chain/backend/src/app.js +59 -0
- package/templates/stock-chain/backend/src/config/db.js +29 -0
- package/templates/stock-chain/backend/src/controllers/auth.js +31 -0
- package/templates/stock-chain/backend/src/controllers/bookingcontroller.js +65 -0
- package/templates/stock-chain/backend/src/controllers/buscontroller.js +59 -0
- package/templates/stock-chain/backend/src/controllers/deliverycontroller.js +35 -0
- package/templates/stock-chain/backend/src/controllers/schedulecontroller.js +85 -0
- package/templates/stock-chain/backend/src/controllers/shipmentcontroller.js +35 -0
- package/templates/stock-chain/backend/src/controllers/suppliercontroller.js +35 -0
- package/templates/stock-chain/backend/src/controllers/usercontroller.js +59 -0
- package/templates/stock-chain/backend/src/middleware/auth.js +11 -0
- package/templates/stock-chain/backend/src/middleware/errorHandler.js +7 -0
- package/templates/stock-chain/backend/src/models/delivery.js +20 -0
- package/templates/stock-chain/backend/src/models/index.js +6 -0
- package/templates/stock-chain/backend/src/models/shipment.js +20 -0
- package/templates/stock-chain/backend/src/models/supplier.js +17 -0
- package/templates/stock-chain/backend/src/models/user.js +15 -0
- package/templates/stock-chain/backend/src/routes/authroute.js +11 -0
- package/templates/stock-chain/backend/src/routes/bookingroute.js +18 -0
- package/templates/stock-chain/backend/src/routes/busroute.js +18 -0
- package/templates/stock-chain/backend/src/routes/deliveriesroute.js +18 -0
- package/templates/stock-chain/backend/src/routes/scheduleroute.js +18 -0
- package/templates/stock-chain/backend/src/routes/shipmentsroute.js +18 -0
- package/templates/stock-chain/backend/src/routes/suppliersroute.js +18 -0
- package/templates/stock-chain/backend/src/routes/userroute.js +18 -0
- package/templates/stock-chain/frontend/.env +1 -0
- package/templates/stock-chain/frontend/README.md +16 -0
- package/templates/stock-chain/frontend/eslint.config.js +21 -0
- package/templates/stock-chain/frontend/index.html +13 -0
- package/templates/stock-chain/frontend/package-lock.json +3131 -0
- package/templates/stock-chain/frontend/package.json +33 -0
- package/templates/stock-chain/frontend/public/favicon.svg +1 -0
- package/templates/stock-chain/frontend/public/icons.svg +24 -0
- package/templates/stock-chain/frontend/src/App.jsx +55 -0
- package/templates/stock-chain/frontend/src/assets/hero.png +0 -0
- package/templates/stock-chain/frontend/src/assets/react.svg +1 -0
- package/templates/stock-chain/frontend/src/assets/vite.svg +1 -0
- package/templates/stock-chain/frontend/src/components/Button.jsx +15 -0
- package/templates/stock-chain/frontend/src/components/Input.jsx +25 -0
- package/templates/stock-chain/frontend/src/context/AuthContext.jsx +59 -0
- package/templates/stock-chain/frontend/src/index.css +7 -0
- package/templates/stock-chain/frontend/src/main.jsx +18 -0
- package/templates/stock-chain/frontend/src/pages/AppLayout.jsx +125 -0
- package/templates/stock-chain/frontend/src/pages/Login.jsx +78 -0
- package/templates/stock-chain/frontend/src/pages/ManagerDeliveries.jsx +113 -0
- package/templates/stock-chain/frontend/src/pages/ManagerShipments.jsx +113 -0
- package/templates/stock-chain/frontend/src/pages/ManagerSuppliers.jsx +122 -0
- package/templates/stock-chain/frontend/src/pages/Register.jsx +60 -0
- package/templates/stock-chain/frontend/src/services/api.js +8 -0
- package/templates/stock-chain/frontend/src/services/authService.js +11 -0
- package/templates/stock-chain/frontend/vite.config.js +8 -0
- package/templates/y-bus/backend/.env +9 -0
- package/templates/y-bus/backend/.eslintrc.js +6 -0
- package/templates/y-bus/backend/.prettierrc +14 -0
- package/templates/y-bus/backend/README.md +1 -0
- package/templates/y-bus/backend/package-lock.json +1666 -0
- package/templates/y-bus/backend/package.json +21 -0
- package/templates/y-bus/backend/src/app.js +44 -0
- package/templates/y-bus/backend/src/config/db.js +29 -0
- package/templates/y-bus/backend/src/controllers/auth.js +23 -0
- package/templates/y-bus/backend/src/controllers/bookingcontroller.js +65 -0
- package/templates/y-bus/backend/src/controllers/buscontroller.js +59 -0
- package/templates/y-bus/backend/src/controllers/schedulecontroller.js +85 -0
- package/templates/y-bus/backend/src/controllers/usercontroller.js +59 -0
- package/templates/y-bus/backend/src/middleware/auth.js +11 -0
- package/templates/y-bus/backend/src/middleware/errorHandler.js +7 -0
- package/templates/y-bus/backend/src/models/booking.js +27 -0
- package/templates/y-bus/backend/src/models/bus.js +16 -0
- package/templates/y-bus/backend/src/models/index.js +15 -0
- package/templates/y-bus/backend/src/models/schedule.js +25 -0
- package/templates/y-bus/backend/src/models/user.js +20 -0
- package/templates/y-bus/backend/src/routes/bookingroute.js +18 -0
- package/templates/y-bus/backend/src/routes/busroute.js +18 -0
- package/templates/y-bus/backend/src/routes/scheduleroute.js +18 -0
- package/templates/y-bus/backend/src/routes/userroute.js +18 -0
- package/templates/y-bus/frontend/.env +1 -0
- package/templates/y-bus/frontend/README.md +16 -0
- package/templates/y-bus/frontend/eslint.config.js +21 -0
- package/templates/y-bus/frontend/index.html +13 -0
- package/templates/y-bus/frontend/package-lock.json +3131 -0
- package/templates/y-bus/frontend/package.json +33 -0
- package/templates/y-bus/frontend/public/favicon.svg +1 -0
- package/templates/y-bus/frontend/public/icons.svg +24 -0
- package/templates/y-bus/frontend/src/App.jsx +108 -0
- package/templates/y-bus/frontend/src/assets/hero.png +0 -0
- package/templates/y-bus/frontend/src/assets/react.svg +1 -0
- package/templates/y-bus/frontend/src/assets/vite.svg +1 -0
- package/templates/y-bus/frontend/src/components/Button.jsx +15 -0
- package/templates/y-bus/frontend/src/components/Input.jsx +25 -0
- package/templates/y-bus/frontend/src/context/AuthContext.jsx +59 -0
- package/templates/y-bus/frontend/src/index.css +7 -0
- package/templates/y-bus/frontend/src/main.jsx +18 -0
- package/templates/y-bus/frontend/src/pages/AppLayout.jsx +135 -0
- package/templates/y-bus/frontend/src/pages/CustomerTrips.jsx +101 -0
- package/templates/y-bus/frontend/src/pages/Login.jsx +81 -0
- package/templates/y-bus/frontend/src/pages/ManagerBuses.jsx +140 -0
- package/templates/y-bus/frontend/src/pages/ManagerDashboard.jsx +108 -0
- package/templates/y-bus/frontend/src/pages/ManagerReport.jsx +89 -0
- package/templates/y-bus/frontend/src/pages/ManagerSchedules.jsx +233 -0
- package/templates/y-bus/frontend/src/pages/MyBookings.jsx +78 -0
- package/templates/y-bus/frontend/src/pages/Register.jsx +67 -0
- package/templates/y-bus/frontend/src/services/api.js +8 -0
- package/templates/y-bus/frontend/src/services/authService.js +33 -0
- 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>
|