Refactored meaningful project name and its associated changes

This commit is contained in:
shankar 2024-12-13 16:31:08 +05:30
parent 7c288da183
commit 7bc7be60fa
97 changed files with 34 additions and 33 deletions

View File

@ -3,7 +3,7 @@ version: '3.8'
services: services:
frontend: frontend:
build: build:
context: ./router-dashboard context: ./router-frontend
dockerfile: dockerfile dockerfile: dockerfile
args: args:
- SERVER_IP=${SERVER_IP:-localhost} - SERVER_IP=${SERVER_IP:-localhost}
@ -18,9 +18,9 @@ services:
depends_on: depends_on:
backend: backend:
condition: service_healthy condition: service_healthy
container_name: router_dashboard_frontend container_name: router-dashboard-frontend
networks: networks:
- app_network - routernetwork
healthcheck: healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://${SERVER_IP:-localhost}:5173"] test: ["CMD", "wget", "--spider", "-q", "http://${SERVER_IP:-localhost}:5173"]
interval: 30s interval: 30s
@ -30,7 +30,7 @@ services:
backend: backend:
build: build:
context: ./ve-router-backend context: ./router-backend
dockerfile: dockerfile dockerfile: dockerfile
ports: ports:
- "${BACKEND_PORT:-3000}:3000" - "${BACKEND_PORT:-3000}:3000"
@ -53,8 +53,8 @@ services:
start_period: 30s start_period: 30s
timeout: 10s timeout: 10s
networks: networks:
- app_network - routernetwork
container_name: router_dashboard_backend container_name: router-dashboard-backend
mysql: mysql:
image: mysql:8.0 image: mysql:8.0
@ -78,13 +78,14 @@ services:
retries: 5 retries: 5
start_period: 30s start_period: 30s
networks: networks:
- app_network - routernetwork
container_name: router_dashboard_mysql container_name: router-dashboard-mysql
networks:
app_network:
driver: bridge
volumes: volumes:
mysql_data: mysql_data:
name: router_dashboard_mysql_data name: router-dashboard-mysql-data
networks:
routernetwork:
name: routernetwork
driver: bridge

View File

@ -1,5 +1,5 @@
# setup.ps1 # setup.ps1
$projectName = "ve-router-backend" $projectName = "router-backend"
# Colors for output # Colors for output
$green = "`e[0;32m" $green = "`e[0;32m"
@ -16,7 +16,7 @@ Set-Location -Path $projectName
Write-Host "$blue Initializing package.json... $nc" Write-Host "$blue Initializing package.json... $nc"
$packageJson = @" $packageJson = @"
{ {
"name": "ve-router-backend", "name": "router-backend",
"version": "1.0.0", "version": "1.0.0",
"description": "Router Management System Backend", "description": "Router Management System Backend",
"main": "dist/app.js", "main": "dist/app.js",

View File

@ -1,4 +1,4 @@
# ve-router-backend/Dockerfile # router-backend/Dockerfile
FROM node:18-alpine FROM node:18-alpine
WORKDIR /app WORKDIR /app

View File

@ -1,18 +1,18 @@
{ {
"name": "ve-router-backend", "name": "router-backend",
"version": "1.0.0", "version": "1.0.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "ve-router-backend", "name": "router-backend",
"version": "1.0.0", "version": "1.0.0",
"dependencies": { "dependencies": {
"cors": "^2.8.5", "cors": "^2.8.5",
"dotenv": "^16.4.5", "dotenv": "^16.4.5",
"express": "^4.18.2", "express": "^4.18.2",
"mysql2": "^3.2.0", "mysql2": "^3.2.0",
"ve-router-backend": "file:", "router-backend": "file:",
"winston": "^3.16.0" "winston": "^3.16.0"
}, },
"devDependencies": { "devDependencies": {
@ -3491,7 +3491,7 @@
"node": ">= 0.8" "node": ">= 0.8"
} }
}, },
"node_modules/ve-router-backend": { "node_modules/router-backend": {
"resolved": "", "resolved": "",
"link": true "link": true
}, },

View File

@ -1,5 +1,5 @@
{ {
"name": "ve-router-backend", "name": "router-backend",
"version": "1.0.0", "version": "1.0.0",
"description": "Router Management System Backend", "description": "Router Management System Backend",
"main": "dist/app.js", "main": "dist/app.js",
@ -16,7 +16,7 @@
"dotenv": "^16.4.5", "dotenv": "^16.4.5",
"express": "^4.18.2", "express": "^4.18.2",
"mysql2": "^3.2.0", "mysql2": "^3.2.0",
"ve-router-backend": "file:", "router-backend": "file:",
"winston": "^3.16.0", "winston": "^3.16.0",
"bcryptjs": "^2.4.3", "bcryptjs": "^2.4.3",
"jsonwebtoken": "^9.0.2" "jsonwebtoken": "^9.0.2"

View File

@ -1,2 +0,0 @@
// router-dashboard/src/services/index.ts
export * from './api.service';

View File

@ -1,17 +1,17 @@
{ {
"name": "router-dashboard", "name": "router-frontend",
"version": "0.0.0", "version": "0.0.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "router-dashboard", "name": "router-frontend",
"version": "0.0.0", "version": "0.0.0",
"dependencies": { "dependencies": {
"lucide-react": "^0.294.0", "lucide-react": "^0.294.0",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"router-dashboard": "file:" "router-frontend": "file:"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.9.0", "@types/node": "^22.9.0",
@ -3516,7 +3516,7 @@
"fsevents": "~2.3.2" "fsevents": "~2.3.2"
} }
}, },
"node_modules/router-dashboard": { "node_modules/router-frontend": {
"resolved": "", "resolved": "",
"link": true "link": true
}, },

View File

@ -1,5 +1,5 @@
{ {
"name": "router-dashboard", "name": "router-frontend",
"private": true, "private": true,
"version": "0.0.0", "version": "0.0.0",
"type": "module", "type": "module",
@ -14,7 +14,7 @@
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-router-dom": "^6.14.1", "react-router-dom": "^6.14.1",
"router-dashboard": "file:" "router-frontend": "file:"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.9.0", "@types/node": "^22.9.0",

View File

Before

Width:  |  Height:  |  Size: 905 B

After

Width:  |  Height:  |  Size: 905 B

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -1,4 +1,4 @@
// router-dashboard/src/services/api.service.ts // router-dashboard-frontend/src/services/api.service.ts
import { RouterData, FilterType, BackendRouter } from '../types'; import { RouterData, FilterType, BackendRouter } from '../types';
const API_BASE_URL = process.env.NODE_ENV === 'development' const API_BASE_URL = process.env.NODE_ENV === 'development'

View File

@ -0,0 +1,2 @@
// router-frontend/src/services/index.ts
export * from './api.service';

View File

@ -1,4 +1,4 @@
// router-dashboard/src/types/backend.ts // router-frontend/src/types/backend.ts
export interface BackendStudy { export interface BackendStudy {
siuid: string; siuid: string;
patient_id: string; patient_id: string;

View File

@ -1,4 +1,4 @@
// router-dashboard/src/types/index.ts // router-frontend/src/types/index.ts
export interface Study { export interface Study {
siuid: string; siuid: string;
patientId: string; patientId: string;