create-myexam-app 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/index.js +65 -0
- package/package.json +22 -0
- package/projects/parking managementt system/Backend/.env +3 -0
- package/projects/parking managementt system/Backend/controllers/CarController.js +43 -0
- package/projects/parking managementt system/Backend/controllers/ParkingRecordController.js +42 -0
- package/projects/parking managementt system/Backend/controllers/ParkingSlotController.js +42 -0
- package/projects/parking managementt system/Backend/controllers/PaymentController.js +42 -0
- package/projects/parking managementt system/Backend/controllers/UserController.js +71 -0
- package/projects/parking managementt system/Backend/db/connectDB.js +11 -0
- package/projects/parking managementt system/Backend/models/CarModels.js +9 -0
- package/projects/parking managementt system/Backend/models/ParkingRecordModelss.js +10 -0
- package/projects/parking managementt system/Backend/models/ParkingSlotModels.js +7 -0
- package/projects/parking managementt system/Backend/models/PaymentModels.js +9 -0
- package/projects/parking managementt system/Backend/models/UserModels.js +9 -0
- package/projects/parking managementt system/Backend/package-lock.json +1526 -0
- package/projects/parking managementt system/Backend/package.json +23 -0
- package/projects/parking managementt system/Backend/routes/CarRoutes.js +11 -0
- package/projects/parking managementt system/Backend/routes/ParkingRecordRoutes.js +9 -0
- package/projects/parking managementt system/Backend/routes/ParkingSlotRoutes.js +11 -0
- package/projects/parking managementt system/Backend/routes/PaymentRoutes.js +10 -0
- package/projects/parking managementt system/Backend/routes/UserRoutes.js +17 -0
- package/projects/parking managementt system/Backend/server.js +27 -0
- package/projects/parking managementt system/frontend/README.md +16 -0
- package/projects/parking managementt system/frontend/eslint.config.js +21 -0
- package/projects/parking managementt system/frontend/index.html +13 -0
- package/projects/parking managementt system/frontend/package-lock.json +3033 -0
- package/projects/parking managementt system/frontend/package.json +31 -0
- package/projects/parking managementt system/frontend/public/favicon.svg +1 -0
- package/projects/parking managementt system/frontend/public/icons.svg +24 -0
- package/projects/parking managementt system/frontend/src/App.css +184 -0
- package/projects/parking managementt system/frontend/src/App.jsx +34 -0
- package/projects/parking managementt system/frontend/src/assets/hero.png +0 -0
- package/projects/parking managementt system/frontend/src/assets/react.svg +1 -0
- package/projects/parking managementt system/frontend/src/assets/vite.svg +1 -0
- package/projects/parking managementt system/frontend/src/components/Navbar.jsx +27 -0
- package/projects/parking managementt system/frontend/src/index.css +1 -0
- package/projects/parking managementt system/frontend/src/main.jsx +10 -0
- package/projects/parking managementt system/frontend/src/pages/Cars.jsx +116 -0
- package/projects/parking managementt system/frontend/src/pages/Dashboard.jsx +45 -0
- package/projects/parking managementt system/frontend/src/pages/Login.jsx +63 -0
- package/projects/parking managementt system/frontend/src/pages/ParkingRecord.jsx +168 -0
- package/projects/parking managementt system/frontend/src/pages/ParkingSlot.jsx +102 -0
- package/projects/parking managementt system/frontend/src/pages/Payment.jsx +101 -0
- package/projects/parking managementt system/frontend/src/pages/Register.jsx +65 -0
- package/projects/parking managementt system/frontend/src/pages/Report.jsx +98 -0
- package/projects/parking managementt system/frontend/vite.config.js +10 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "backend",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
7
|
+
"start": "nodemon server.js"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"author": "",
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"description": "",
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"bcryptjs": "^3.0.3",
|
|
16
|
+
"cors": "^2.8.6",
|
|
17
|
+
"dotenv": "^17.4.2",
|
|
18
|
+
"express": "^5.2.1",
|
|
19
|
+
"jsonwebtoken": "^9.0.3",
|
|
20
|
+
"mongoose": "^9.6.1",
|
|
21
|
+
"nodemon": "^3.1.14"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import express from "express";
|
|
2
|
+
import {carCreate,getAllCars,updateCar,deleteCar} from "../controllers/CarController.js"
|
|
3
|
+
|
|
4
|
+
const router = express.Router();
|
|
5
|
+
|
|
6
|
+
router.post("/", carCreate);
|
|
7
|
+
router.get("/", getAllCars);
|
|
8
|
+
router.put("/:id",updateCar);
|
|
9
|
+
router.delete("/:id", deleteCar);
|
|
10
|
+
|
|
11
|
+
export default router;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import express from "express";
|
|
2
|
+
import {parkingRecordCreate,getParkingRecord,updateParkingRecord,deleteParkingRecord} from "../controllers/ParkingRecordController.js";
|
|
3
|
+
|
|
4
|
+
const router = express.Router();
|
|
5
|
+
router.post("/",parkingRecordCreate);
|
|
6
|
+
router.get("/", getParkingRecord);
|
|
7
|
+
router.put("/:id", updateParkingRecord);
|
|
8
|
+
router.delete("/:id", deleteParkingRecord);
|
|
9
|
+
export default router;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import express from "express"
|
|
2
|
+
import {parkingSlotCreate,getParkingSlot,updatepakingSlot,deleteParkingSlot} from "../controllers/ParkingSlotController.js";
|
|
3
|
+
|
|
4
|
+
const router = express.Router();
|
|
5
|
+
|
|
6
|
+
router.post("/", parkingSlotCreate);
|
|
7
|
+
router.get("/", getParkingSlot);
|
|
8
|
+
router.put("/:id", updatepakingSlot);
|
|
9
|
+
router.delete("/:id", deleteParkingSlot);
|
|
10
|
+
|
|
11
|
+
export default router;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import express from "express";
|
|
2
|
+
import { paymentCreate,getPayment,updatePayment,deletePayment } from "../controllers/PaymentController.js";
|
|
3
|
+
|
|
4
|
+
const router = express.Router();
|
|
5
|
+
router.post("/", paymentCreate);
|
|
6
|
+
router.get("/", getPayment);
|
|
7
|
+
router.put("/:id", updatePayment);
|
|
8
|
+
router.delete("/:id", deletePayment);
|
|
9
|
+
|
|
10
|
+
export default router;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import express from "express";
|
|
2
|
+
import { userCreate,getUser,updateUser,deleteUser, registerUser, loginUser } from "../controllers/UserController.js";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
const router = express.Router();
|
|
6
|
+
|
|
7
|
+
//crud routes
|
|
8
|
+
router.post("/", userCreate);
|
|
9
|
+
router.get("/", getUser);
|
|
10
|
+
router.put("/:id", updateUser);
|
|
11
|
+
router.delete("/:id", deleteUser);
|
|
12
|
+
|
|
13
|
+
//auth routes
|
|
14
|
+
router.post("/register", registerUser);
|
|
15
|
+
router.post("/login", loginUser);
|
|
16
|
+
|
|
17
|
+
export default router;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import 'dotenv/config';
|
|
3
|
+
import cors from 'cors';
|
|
4
|
+
import { connectDB } from './db/connectDB.js';
|
|
5
|
+
import CarRoutes from "./routes/CarRoutes.js"
|
|
6
|
+
import ParkingRecordRoutes from "./routes/ParkingRecordRoutes.js"
|
|
7
|
+
import ParkingSlotRoutes from "./routes/ParkingSlotRoutes.js";
|
|
8
|
+
import PaymentRoutes from "./routes/PaymentRoutes.js";
|
|
9
|
+
import UserRoutes from "./routes/UserRoutes.js";
|
|
10
|
+
|
|
11
|
+
const app = express();
|
|
12
|
+
const PORT = process.env.PORT || 5000;
|
|
13
|
+
connectDB();
|
|
14
|
+
|
|
15
|
+
app.use(cors());
|
|
16
|
+
|
|
17
|
+
app.use(express.json());
|
|
18
|
+
//routes
|
|
19
|
+
app.use("/api/cars", CarRoutes);
|
|
20
|
+
app.use("/api/parkingRecords", ParkingRecordRoutes);
|
|
21
|
+
app.use("/api/parkingSlots", ParkingSlotRoutes);
|
|
22
|
+
app.use("/api/payments", PaymentRoutes);
|
|
23
|
+
app.use("/api/users", UserRoutes);
|
|
24
|
+
|
|
25
|
+
app.listen(PORT, () => {
|
|
26
|
+
console.log( `server is running on http://localhost ${PORT}`);
|
|
27
|
+
})
|
|
@@ -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>
|