Migrated all sqlite tables to mySQL for server

This commit is contained in:
Josh 2025-05-19 17:06:49 +00:00
parent 72e52d57fe
commit 3fdf280817
7 changed files with 413703 additions and 350 deletions

View File

@ -6,6 +6,12 @@ GOOGLE_MAPS_API_KEY=AIzaSyCTMgjiHUF2Vl3QriQu2kDEuZWz39ZAR20
REACT_APP_GOOGLE_MAPS_API_KEY=AIzaSyCTMgjiHUF2Vl3QriQu2kDEuZWz39ZAR20
COLLEGE_SCORECARD_KEY = BlZ0tIdmXVGI4G8NxJ9e6dXEiGUfAfnQJyw8bumj
DB_HOST=34.67.180.54
DB_PORT=3306
DB_USER=sqluser
DB_NAME=user_profile_db
DB_PASSWORD=ps<g+2DO-eTb2mb5
REACT_APP_API_URL=https://dev1.aptivaai.com/api
REACT_APP_ENV=production
REACT_APP_OPENAI_API_KEY=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

View File

@ -4,30 +4,59 @@ import cors from 'cors';
import helmet from 'helmet';
import dotenv from 'dotenv';
import { fileURLToPath } from 'url';
import fs from 'fs';
import path from 'path';
import sqlite3 from 'sqlite3'; // Import SQLite
import bodyParser from 'body-parser';
import bcrypt from 'bcrypt';
import jwt from 'jsonwebtoken'; // For token-based authentication
// Derive __dirname for ES modules
import mysql from 'mysql2';
import sqlite3 from 'sqlite3';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const dbPath = path.resolve('/home/jcoakley/aptiva-dev1-app/user_profile.db');
const db = new sqlite3.Database(dbPath, (err) => {
if (err) {
console.error('Error connecting to database:', err.message);
} else {
console.log('Connected to user_profile.db');
}
const rootPath = path.resolve(__dirname, '..'); // Up one level
const env = process.env.NODE_ENV?.trim() || 'development';
const envPath = path.resolve(rootPath, `.env.${env}`);
dotenv.config({ path: envPath }); // Load .env file
// Grab secrets and config from ENV
const SECRET_KEY = process.env.SECRET_KEY || 'supersecurekey';
const DB_HOST = process.env.DB_HOST || '127.0.0.1';
const DB_PORT = process.env.DB_PORT ? parseInt(process.env.DB_PORT) : 3306;
const DB_USER = process.env.DB_USER || 'sqluser';
const DB_PASSWORD = process.env.DB_PASSWORD || '';
const DB_NAME = process.env.DB_NAME || 'user_profile_db';
console.log('SECRET_KEY:', SECRET_KEY);
console.log('DB_HOST:', DB_HOST);
console.log('DB_USER:', DB_USER);
console.log('DB_NAME:', DB_NAME);
console.log('Current Working Directory:', process.cwd());
// Create a MySQL pool for user_profile data
const pool = mysql.createPool({
host: DB_HOST,
port: DB_PORT,
user: DB_USER,
password: DB_PASSWORD,
database: DB_NAME,
connectionLimit: 10, // optional
});
dotenv.config({ path: path.resolve('/home/jcoakley/aptiva-dev1-app/.env') }); // Adjust the path based on your folder structure
const SECRET_KEY = process.env.SECRET_KEY || 'supersecurekey'; // Use a secure key in production
console.log('ONET_USERNAME:', process.env.ONET_USERNAME);
console.log('ONET_PASSWORD:', process.env.ONET_PASSWORD);
console.log('Current Working Directory:', process.cwd());
// Test a quick query (optional)
pool.query('SELECT 1', (err) => {
if (err) {
console.error('Error connecting to MySQL user_profile_db:', err.message);
} else {
console.log('Connected to MySQL user_profile_db');
}
});
const app = express();
const PORT = 5000;
@ -36,7 +65,8 @@ const allowedOrigins = ['http://localhost:3000', 'http://34.16.120.118:3000', 'h
app.disable('x-powered-by');
app.use(bodyParser.json());
app.use(express.json());
app.use(helmet({
app.use(
helmet({
contentSecurityPolicy: false,
crossOriginEmbedderPolicy: false,
})
@ -83,8 +113,7 @@ app.use((req, res, next) => {
next();
});
// Route for user registration
// =============== USER REGISTRATION (MySQL) ===============
app.post('/api/register', async (req, res) => {
const {
userId,
@ -99,60 +128,69 @@ app.post('/api/register', async (req, res) => {
career_situation
} = req.body;
// Validate all required fields, including career_situation
if (!userId || !username || !password || !firstname || !lastname || !email || !zipcode || !state || !area || !career_situation) {
if (
!userId ||
!username ||
!password ||
!firstname ||
!lastname ||
!email ||
!zipcode ||
!state ||
!area ||
!career_situation
) {
return res.status(400).json({ error: 'All fields including career_situation are required' });
}
try {
const hashedPassword = await bcrypt.hash(password, 10);
// Insert into user_auth
const authQuery = `
INSERT INTO user_auth (user_id, username, hashed_password)
VALUES (?, ?, ?)
`;
// 1) Insert into user_profile first
const profileQuery = `
INSERT INTO user_profile (id, firstname, lastname, email, zipcode, state, area, career_situation)
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
`;
pool.query(
profileQuery,
[userId, firstname, lastname, email, zipcode, state, area, career_situation],
(err2, results2) => {
if (err2) {
console.error('Error inserting into user_profile:', err2.message);
return res.status(500).json({ error: 'Failed to create user profile' });
}
db.run(authQuery, [userId, username, hashedPassword], function (err) {
if (err) {
console.error('Error inserting into user_auth:', err.message);
if (err.message.includes('UNIQUE constraint failed')) {
return res.status(400).json({ error: 'Username already exists' });
}
return res.status(500).json({ error: 'Failed to register user' });
}
// 2) Insert into user_auth
const authQuery = `
INSERT INTO user_auth (user_id, username, hashed_password)
VALUES (?, ?, ?)
`;
pool.query(authQuery, [userId, username, hashedPassword], (err, results) => {
if (err) {
console.error('Error inserting into user_auth:', err.message);
if (err.code === 'ER_DUP_ENTRY') {
return res.status(400).json({ error: 'Username already exists' });
}
return res.status(500).json({ error: 'Failed to register user' });
}
return res.status(201).json({ message: 'User registered successfully', userId });
});
}
);
// Insert into user_profile including career_situation
const profileQuery = `
INSERT INTO user_profile (user_id, firstname, lastname, email, zipcode, state, area, career_situation)
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
`;
db.run(profileQuery, [userId, firstname, lastname, email, zipcode, state, area, career_situation], (err) => {
if (err) {
console.error('Error inserting into user_profile:', err.message);
return res.status(500).json({ error: 'Failed to create user profile' });
}
return res.status(201).json({ message: 'User registered successfully', userId });
});
});
} catch (error) {
console.error('Error during registration:', error.message);
return res.status(500).json({ error: 'Internal server error' });
}
});
// Route to handle user sign-in (updated with career_priorities and career_list)
// =============== SIGN-IN (MySQL) ===============
app.post('/api/signin', async (req, res) => {
const { username, password } = req.body;
if (!username || !password) {
return res.status(400).json({ error: 'Both username and password are required' });
}
// Updated query includes career_priorities and career_list
const query = `
SELECT
user_auth.user_id,
@ -164,34 +202,29 @@ app.post('/api/signin', async (req, res) => {
user_profile.email,
user_profile.firstname,
user_profile.lastname,
user_profile.career_priorities, -- new field
user_profile.career_list -- new field
user_profile.career_priorities,
user_profile.career_list
FROM user_auth
LEFT JOIN user_profile ON user_auth.user_id = user_profile.user_id
WHERE user_auth.username = ?
`;
db.get(query, [username], async (err, row) => {
pool.query(query, [username], async (err, results) => {
if (err) {
console.error('Error querying user_auth:', err.message);
return res.status(500).json({ error: 'Failed to query user authentication data' });
}
// If no matching username
if (!row) {
if (!results || results.length === 0) {
return res.status(401).json({ error: 'Invalid username or password' });
}
// Verify the password using bcrypt
const row = results[0];
const isMatch = await bcrypt.compare(password, row.hashed_password);
if (!isMatch) {
return res.status(401).json({ error: 'Invalid username or password' });
}
// Generate JWT
const token = jwt.sign({ userId: row.user_id }, SECRET_KEY, { expiresIn: '2h' });
// Return fully updated user object
res.status(200).json({
message: 'Login successful',
token,
@ -202,30 +235,26 @@ app.post('/api/signin', async (req, res) => {
lastname: row.lastname,
email: row.email,
zipcode: row.zipcode,
is_premium: row.is_premium,
is_premium: row.is_premium,
is_pro_premium: row.is_pro_premium,
career_situation: row.career_situation,
career_priorities: row.career_priorities, // newly added
career_list: row.career_list, // newly added
}
career_priorities: row.career_priorities,
career_list: row.career_list,
},
});
});
});
/// Check if username already exists
// =============== CHECK USERNAME (MySQL) ===============
app.get('/api/check-username/:username', (req, res) => {
const { username } = req.params;
const query = `SELECT username FROM user_auth WHERE username = ?`;
db.get(query, [username], (err, row) => {
pool.query(query, [username], (err, results) => {
if (err) {
console.error('Error checking username:', err.message);
return res.status(500).json({ error: 'Database error' });
}
if (row) {
if (results && results.length > 0) {
res.status(200).json({ exists: true });
} else {
res.status(200).json({ exists: false });
@ -233,7 +262,7 @@ app.get('/api/check-username/:username', (req, res) => {
});
});
// Upsert user profile (corrected and robust)
// =============== UPSERT USER PROFILE (MySQL) ===============
app.post('/api/user-profile', (req, res) => {
const token = req.headers.authorization?.split(' ')[1];
if (!token) {
@ -262,32 +291,35 @@ app.post('/api/user-profile', (req, res) => {
career_list,
} = req.body;
// Check existing profile explicitly first
db.get(`SELECT * FROM user_profile WHERE user_id = ?;`, [userId], (err, existingRow) => {
// Check existing profile
pool.query(`SELECT * FROM user_profile WHERE user_id = ?`, [userId], (err, results) => {
if (err) {
console.error('Error checking profile:', err.message);
return res.status(500).json({ error: 'Database error' });
}
const existingRow = results && results.length > 0 ? results[0] : null;
// Require fields ONLY if no existing profile found
if (!existingRow && (!firstName || !lastName || !email || !zipCode || !state || !area)) {
return res.status(400).json({ error: 'All fields are required for initial profile creation.' });
}
const finalAnswers = interest_inventory_answers !== undefined
? interest_inventory_answers
: existingRow?.interest_inventory_answers || null;
const finalAnswers =
interest_inventory_answers !== undefined
? interest_inventory_answers
: existingRow?.interest_inventory_answers || null;
const finalCareerPriorities = career_priorities !== undefined
? career_priorities
: existingRow?.career_priorities || null;
const finalCareerPriorities =
career_priorities !== undefined
? career_priorities
: existingRow?.career_priorities || null;
const finalCareerList = career_list !== undefined
? career_list
: existingRow?.career_list || null;
const finalCareerList =
career_list !== undefined
? career_list
: existingRow?.career_list || null;
if (existingRow) {
// Update existing profile clearly
// Update
const updateQuery = `
UPDATE user_profile
SET firstname = ?, lastname = ?, email = ?, zipcode = ?, state = ?, area = ?, career_situation = ?,
@ -305,22 +337,21 @@ app.post('/api/user-profile', (req, res) => {
finalAnswers,
finalCareerPriorities,
finalCareerList,
userId,
userId
];
db.run(updateQuery, params, function (err) {
if (err) {
console.error('Update error:', err.message);
pool.query(updateQuery, params, (err2, result2) => {
if (err2) {
console.error('Update error:', err2.message);
return res.status(500).json({ error: 'Failed to update user profile' });
}
res.status(200).json({ message: 'User profile updated successfully' });
});
} else {
// Insert new profile clearly
// Insert new profile
const insertQuery = `
INSERT INTO user_profile
(user_id, firstname, lastname, email, zipcode, state, area, career_situation, interest_inventory_answers, career_priorities, career_list)
(user_id, firstname, lastname, email, zipcode, state, area, career_situation,
interest_inventory_answers, career_priorities, career_list)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
`;
const params = [
@ -336,61 +367,54 @@ app.post('/api/user-profile', (req, res) => {
finalCareerPriorities,
finalCareerList,
];
db.run(insertQuery, params, function (err) {
if (err) {
console.error('Insert error:', err.message);
pool.query(insertQuery, params, (err3, result3) => {
if (err3) {
console.error('Insert error:', err3.message);
return res.status(500).json({ error: 'Failed to create user profile' });
}
res.status(201).json({ message: 'User profile created successfully', id: this.lastID });
res.status(201).json({ message: 'User profile created successfully', id: result3.insertId });
});
}
});
});
// Route to fetch user profile
// =============== FETCH USER PROFILE (MySQL) ===============
app.get('/api/user-profile', (req, res) => {
const token = req.headers.authorization?.split(' ')[1];
if (!token) {
return res.status(401).json({ error: 'Authorization token is required' });
}
let userId;
try {
// Extract the userId (user_id) from the token
const { userId } = jwt.verify(token, SECRET_KEY);
// Query user_profile using user_id
const query = 'SELECT * FROM user_profile WHERE user_id = ?';
db.get(query, [userId], (err, row) => {
if (err) {
console.error('Error fetching user profile:', err.message);
return res.status(500).json({ error: 'Internal server error' });
}
if (!row) {
return res.status(404).json({ error: 'User profile not found' });
}
res.status(200).json(row); // Return the profile row
});
const decoded = jwt.verify(token, SECRET_KEY);
userId = decoded.userId;
} catch (error) {
console.error('Error verifying token:', error.message);
res.status(401).json({ error: 'Invalid or expired token' });
return res.status(401).json({ error: 'Invalid or expired token' });
}
const query = 'SELECT * FROM user_profile WHERE user_id = ?';
pool.query(query, [userId], (err, results) => {
if (err) {
console.error('Error fetching user profile:', err.message);
return res.status(500).json({ error: 'Internal server error' });
}
if (!results || results.length === 0) {
return res.status(404).json({ error: 'User profile not found' });
}
res.status(200).json(results[0]);
});
});
// Route to fetch areas by state
// =============== SALARY_INFO REMAINS IN SQLITE ===============
app.get('/api/areas', (req, res) => {
const { state } = req.query;
if (!state) {
return res.status(400).json({ error: 'State parameter is required' });
}
const dbPath = path.resolve('/home/jcoakley/aptiva-dev1-app/salary_info.db'); // Path to salary_info.db
const db = new sqlite3.Database(dbPath, sqlite3.OPEN_READONLY, (err) => {
const salaryDbPath = path.resolve('/home/jcoakley/aptiva-dev1-app/salary_info.db');
const salaryDb = new sqlite3.Database(salaryDbPath, sqlite3.OPEN_READONLY, (err) => {
if (err) {
console.error('Error connecting to database:', err.message);
return res.status(500).json({ error: 'Failed to connect to database' });
@ -398,27 +422,23 @@ app.get('/api/areas', (req, res) => {
});
const query = `SELECT DISTINCT AREA_TITLE FROM salary_data WHERE PRIM_STATE = ?`;
db.all(query, [state], (err, rows) => {
salaryDb.all(query, [state], (err, rows) => {
if (err) {
console.error('Error executing query:', err.message);
return res.status(500).json({ error: 'Failed to fetch areas' });
}
const areas = rows.map((row) => row.AREA_TITLE);
res.json({ areas });
});
db.close((err) => {
salaryDb.close((err) => {
if (err) {
console.error('Error closing the database:', err.message);
console.error('Error closing the salary_info.db:', err.message);
}
});
});
// Start the server
// =============== START SERVER ===============
app.listen(PORT, () => {
console.log(`Server running on http://localhost:${PORT}`);
console.log(`Server running on http://localhost:${PORT}`);
});

4
export_salary.sql Normal file
View File

@ -0,0 +1,4 @@
.mode csv
.headers on
.once salary_data.csv
SELECT * FROM salary_data;

110
package-lock.json generated
View File

@ -32,6 +32,7 @@
"mammoth": "^1.9.0",
"moment": "^2.30.1",
"multer": "^1.4.5-lts.2",
"mysql2": "^3.14.1",
"openai": "^4.97.0",
"pdf-parse": "^1.1.1",
"pdfjs-dist": "^3.11.174",
@ -5489,6 +5490,15 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/aws-ssl-profiles": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/aws-ssl-profiles/-/aws-ssl-profiles-1.1.2.tgz",
"integrity": "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==",
"license": "MIT",
"engines": {
"node": ">= 6.0.0"
}
},
"node_modules/axe-core": {
"version": "4.10.3",
"resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.10.3.tgz",
@ -7575,6 +7585,15 @@
"integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==",
"license": "MIT"
},
"node_modules/denque": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz",
"integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==",
"license": "Apache-2.0",
"engines": {
"node": ">=0.10"
}
},
"node_modules/depd": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
@ -9687,6 +9706,15 @@
"node": ">=10"
}
},
"node_modules/generate-function": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
"integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==",
"license": "MIT",
"dependencies": {
"is-property": "^1.0.2"
}
},
"node_modules/gensync": {
"version": "1.0.0-beta.2",
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
@ -10882,6 +10910,12 @@
"integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==",
"license": "MIT"
},
"node_modules/is-property": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
"integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==",
"license": "MIT"
},
"node_modules/is-regex": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz",
@ -12700,6 +12734,12 @@
"integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==",
"license": "MIT"
},
"node_modules/long": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz",
"integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==",
"license": "Apache-2.0"
},
"node_modules/loose-envify": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
@ -12741,6 +12781,21 @@
"yallist": "^3.0.2"
}
},
"node_modules/lru.min": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/lru.min/-/lru.min-1.1.2.tgz",
"integrity": "sha512-Nv9KddBcQSlQopmBHXSsZVY5xsdlZkdH/Iey0BlcBYggMd4two7cZnKOK9vmy3nY0O5RGH99z1PCeTpPqszUYg==",
"license": "MIT",
"engines": {
"bun": ">=1.0.0",
"deno": ">=1.30.0",
"node": ">=8.0.0"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wellwelwel"
}
},
"node_modules/lucide-react": {
"version": "0.483.0",
"resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.483.0.tgz",
@ -13209,6 +13264,26 @@
"multicast-dns": "cli.js"
}
},
"node_modules/mysql2": {
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.14.1.tgz",
"integrity": "sha512-7ytuPQJjQB8TNAYX/H2yhL+iQOnIBjAMam361R7UAL0lOVXWjtdrmoL9HYKqKoLp/8UUTRcvo1QPvK9KL7wA8w==",
"license": "MIT",
"dependencies": {
"aws-ssl-profiles": "^1.1.1",
"denque": "^2.1.0",
"generate-function": "^2.3.1",
"iconv-lite": "^0.6.3",
"long": "^5.2.1",
"lru.min": "^1.0.0",
"named-placeholders": "^1.1.3",
"seq-queue": "^0.0.5",
"sqlstring": "^2.3.2"
},
"engines": {
"node": ">= 8.0"
}
},
"node_modules/mz": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
@ -13220,6 +13295,27 @@
"thenify-all": "^1.0.0"
}
},
"node_modules/named-placeholders": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz",
"integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==",
"license": "MIT",
"dependencies": {
"lru-cache": "^7.14.1"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/named-placeholders/node_modules/lru-cache": {
"version": "7.18.3",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz",
"integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==",
"license": "ISC",
"engines": {
"node": ">=12"
}
},
"node_modules/nan": {
"version": "2.22.2",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.22.2.tgz",
@ -17094,6 +17190,11 @@
"node": ">= 0.8"
}
},
"node_modules/seq-queue": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz",
"integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q=="
},
"node_modules/serialize-javascript": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz",
@ -17646,6 +17747,15 @@
"integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==",
"license": "MIT"
},
"node_modules/sqlstring": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz",
"integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/ssf": {
"version": "0.11.2",
"resolved": "https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz",

View File

@ -27,6 +27,7 @@
"mammoth": "^1.9.0",
"moment": "^2.30.1",
"multer": "^1.4.5-lts.2",
"mysql2": "^3.14.1",
"openai": "^4.97.0",
"pdf-parse": "^1.1.1",
"pdfjs-dist": "^3.11.174",

413428
salary_data.csv Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long