Reset repository to empty state

This commit is contained in:
Asgarsk 2025-05-22 18:25:15 +05:30
commit 8a6d5e8876
945 changed files with 61779 additions and 0 deletions

24
.gitignore vendored Normal file
View File

@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

20
Dockerfile Normal file
View File

@ -0,0 +1,20 @@
# Use official Node.js image as the base image
FROM node:20-alpine
# Set the working directory inside the container
WORKDIR /app
# Copy package.json and package-lock.json first to leverage Docker cache for npm install
COPY package*.json ./
# Install the application dependencies
RUN npm install
# Copy the rest of the application files into the container
COPY . .
# Expose port 5173, which Vite uses by default
EXPOSE 5173
# Run the application with `--host 0.0.0.0` to make it accessible externally
CMD ["npm", "run", "dev"]

112
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,112 @@
pipeline {
agent any
environment {
DOCKER_IMAGE = 'jassimsm/tech4biz-reactjs'
DOCKER_TAG = 'latest'
DOCKER_USERNAME = "jassimsm"
DOCKER_PASSWORD = "dckr_pat_c9HutePXaqreGfKi48H0WPWWfBs"
SSH_CREDENTIALS = 'tech4biz-demo'
REMOTE_SERVER = 'ubuntu@160.187.167.157'
REMOTE_WORKSPACE = '/home/ubuntu'
GIT_CREDENTIALS = 'git-cred'
}
stages {
stage('Add Host Key') {
steps {
script {
sshagent(credentials: [SSH_CREDENTIALS]) {
sh '''
mkdir -p ~/.ssh
ssh-keyscan -H 160.187.167.157 >> ~/.ssh/known_hosts
'''
}
}
}
}
stage('Checkout and Install Dependencies on Remote Server') {
steps {
script {
withCredentials([usernamePassword(credentialsId: GIT_CREDENTIALS, usernameVariable: 'GIT_USERNAME', passwordVariable: 'GIT_PASSWORD')]) {
sshagent(credentials: [SSH_CREDENTIALS]) {
sh '''
ssh ${REMOTE_SERVER} "mkdir -p ${REMOTE_WORKSPACE} && cd ${REMOTE_WORKSPACE} && rm -rf Tech4Biz-Website && \
git clone https://${GIT_USERNAME}:${GIT_PASSWORD}@git.tech4biz.wiki/Tech4Biz-Services/Tech4Biz-Website.git && \
cd Tech4Biz-Website && git checkout main"
'''
}
}
}
}
}
stage('Build Docker Image on Remote Server') {
steps {
script {
try {
sshagent(credentials: [SSH_CREDENTIALS]) {
sh '''
ssh ${REMOTE_SERVER} "cd ${REMOTE_WORKSPACE}/Tech4Biz-Website && docker build -t ${DOCKER_IMAGE}:${DOCKER_TAG} ."
'''
}
} catch (Exception e) {
error "Failed to build Docker image on remote server: ${e.message}"
}
}
}
}
stage('Push Docker Image from Remote Server') {
steps {
script {
try {
sshagent(credentials: [SSH_CREDENTIALS]) {
sh '''
ssh ${REMOTE_SERVER} "echo ${DOCKER_PASSWORD} | docker login -u ${DOCKER_USERNAME} --password-stdin && docker push ${DOCKER_IMAGE}:${DOCKER_TAG}"
'''
}
} catch (Exception e) {
error "Failed to push Docker image from remote server: ${e.message}"
}
}
}
}
stage('Deploy') {
steps {
script {
sshagent(credentials: [SSH_CREDENTIALS]) {
sh '''
ssh ${REMOTE_SERVER} "cd ${REMOTE_WORKSPACE}/Tech4Biz-Website && \
docker pull ${DOCKER_IMAGE}:${DOCKER_TAG} && \
docker stop tech4biz-container || true && \
docker rm tech4biz-container || true && \
docker run -d -p 5173:5173 --name tech4biz-container ${DOCKER_IMAGE}:${DOCKER_TAG}"
'''
}
}
}
}
stage('Update Nginx Configuration') {
steps {
script {
sshagent(credentials: [SSH_CREDENTIALS]) {
sh '''
ssh ${REMOTE_SERVER} "sudo nginx -t && sudo systemctl reload nginx"
'''
}
}
}
}
}
post {
always {
cleanWs()
}
}
}

8
README.md Normal file
View File

@ -0,0 +1,8 @@
# React + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

24
Tech4biz-Version01/Tech4biz/.gitignore vendored Normal file
View File

@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

View File

@ -0,0 +1,23 @@
FROM node:23.7.0-alpine3.20 AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM node:23.7.0-alpine3.20 AS production
WORKDIR /app
COPY --from=builder /app/dist ./dist
RUN npm install -g serve
EXPOSE 5173
CMD ["serve", "-s", "dist", "-l", "5173"]

103
Tech4biz-Version01/Tech4biz/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,103 @@
pipeline {
agent any
environment {
SSH_CREDENTIALS = 'tech4biz-web'
GIT_CREDENTIALS = 'gitea-cred'
REPO_URL = 'https://git.tech4biz.wiki/Tech4Biz-Services/Tech4Biz-Website-Containerized.git'
BRANCH = 'main'
REMOTE_SERVER = 'ubuntu@160.187.167.14'
REMOTE_DIR = '/home/ubuntu/tech4biz-website'
IMAGE_NAME = 'tech4biz-web'
CONTAINER_NAME = 'tech4biz-web'
APP_PORT = '5173'
NOTIFY_EMAIL = 'devops@tech4biz.wiki'
}
options {
disableConcurrentBuilds()
}
stages {
stage('Add Remote Host Key') {
steps {
echo "🔑 Adding remote host key to known_hosts..."
sshagent(credentials: [SSH_CREDENTIALS]) {
sh '''
mkdir -p ~/.ssh
ssh-keyscan -H 160.187.167.14 >> ~/.ssh/known_hosts
'''
}
}
}
stage('Checkout Code from Gitea') {
steps {
echo "📦 Cloning repository from Gitea..."
git credentialsId: "${GIT_CREDENTIALS}", url: "${REPO_URL}", branch: "${BRANCH}"
}
}
stage('Deploy and Build Docker Image') {
steps {
echo "🚢 Sending code to remote and building Docker image..."
sshagent(credentials: [SSH_CREDENTIALS]) {
sh '''
ssh ${REMOTE_SERVER} "sudo mkdir -p ${REMOTE_DIR} && sudo chown -R ubuntu:ubuntu ${REMOTE_DIR}"
# Exclude .git directory to prevent file not found errors
rsync -avz --delete --exclude='.git' ./ ${REMOTE_SERVER}:${REMOTE_DIR}/
ssh ${REMOTE_SERVER} "cd ${REMOTE_DIR} && docker build -t ${IMAGE_NAME} ."
'''
}
}
}
stage('Run Docker Container') {
steps {
echo "🐳 Running Docker container on remote server..."
sshagent(credentials: [SSH_CREDENTIALS]) {
sh '''
ssh ${REMOTE_SERVER} "docker rm -f ${CONTAINER_NAME} || true && \
docker run -d -p ${APP_PORT}:${APP_PORT} --name ${CONTAINER_NAME} ${IMAGE_NAME} && \
docker update --restart=always ${CONTAINER_NAME}"
'''
}
}
}
stage('Reload Nginx') {
steps {
echo "🌐 Reloading Nginx on remote server..."
sshagent(credentials: [SSH_CREDENTIALS]) {
sh '''
ssh ${REMOTE_SERVER} "sudo nginx -t && sudo systemctl reload nginx"
'''
}
}
}
}
post {
success {
echo "✅ Deployment succeeded. Sending notification email..."
mail to: "${NOTIFY_EMAIL}",
subject: "✅ Jenkins Job Success: ${env.JOB_NAME} #${env.BUILD_NUMBER}",
body: "Good news!\n\nThe Jenkins job ${env.JOB_NAME} #${env.BUILD_NUMBER} completed successfully.\n\n- Jenkins"
}
failure {
echo "❌ Deployment failed. Sending notification email..."
mail to: "${NOTIFY_EMAIL}",
subject: "❌ Jenkins Job Failed: ${env.JOB_NAME} #${env.BUILD_NUMBER}",
body: "The Jenkins job ${env.JOB_NAME} #${env.BUILD_NUMBER} has failed.\nPlease check the Jenkins console output for more details.\n\n- Jenkins"
}
always {
echo "🧹 Cleaning workspace..."
cleanWs()
}
}
}

View File

@ -0,0 +1,8 @@
# React + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

View File

@ -0,0 +1,38 @@
import js from '@eslint/js'
import globals from 'globals'
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
export default [
{ ignores: ['dist'] },
{
files: ['**/*.{js,jsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
settings: { react: { version: '18.3' } },
plugins: {
react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
...reactHooks.configs.recommended.rules,
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
]

View File

@ -0,0 +1,46 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/x-icon" href="public/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="google-site-verification" content="v6_dy8N7Ck7nbEe-68tZ7wwTFK6TsLkbET3BjYRKZ-A" />
<meta name="description" content="360-degree engineering for scalable, AI-driven, and cloud-powered growth. Future-ready solutions that drive innovation, efficiency, and success." />
<title>Tech4Biz Solutions | Tech for Growth & Innovation</title>
<script>
!function () {
var reb2b = window.reb2b = window.reb2b || [];
if (reb2b.invoked) return;
reb2b.invoked = true;
reb2b.methods = ["identify", "collect"];
reb2b.factory = function (method) {
return function () {
var args = Array.prototype.slice.call(arguments);
args.unshift(method);
reb2b.push(args);
return reb2b;
};
};
for (var i = 0; i < reb2b.methods.length; i++) {
var key = reb2b.methods[i];
reb2b[key] = reb2b.factory(key);
}
reb2b.load = function (key) {
var script = document.createElement("script");
script.type = "text/javascript";
script.async = true;
script.src = "https://s3-us-west-2.amazonaws.com/b2bjsstore/b/VN080HXQ3V6J.js.gz";
var first = document.getElementsByTagName("script")[0];
first.parentNode.insertBefore(script, first);
};
reb2b.SNIPPET_VERSION = "1.0.1";
reb2b.load("VN080HXQ3V6J");
}();
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,48 @@
{
"name": "tech4biz",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "eslint ."
},
"dependencies": {
"@headlessui/react": "^2.2.0",
"@heroicons/react": "^2.2.0",
"antd": "^5.24.2",
"axios": "^1.7.9",
"embla-carousel-react": "^8.5.2",
"framer-motion": "^12.0.5",
"gsap": "^3.12.7",
"lodash": "^4.17.21",
"lucide-react": "^0.474.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-google-recaptcha": "^3.1.0",
"react-helmet": "^6.1.0",
"react-helmet-async": "^2.0.5",
"react-icons": "^5.4.0",
"react-intersection-observer": "^9.15.1",
"react-loading-skeleton": "^3.5.0",
"react-phone-input-2": "^2.15.1",
"react-router-dom": "^7.1.3",
"styled-components": "^6.1.15",
"vite": "^6.0.8"
},
"devDependencies": {
"@eslint/js": "^9.17.0",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.17",
"eslint": "^9.17.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.5",
"globals": "^15.14.0",
"postcss": "^8.4.35",
"tailwindcss": "^3.4.1"
}
}

View File

@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 798 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Some files were not shown because too many files have changed in this diff Show More