diff --git a/backend/server.js b/backend/server.js index 20a2c62..261c17f 100755 --- a/backend/server.js +++ b/backend/server.js @@ -171,7 +171,7 @@ app.post('/api/login', (req, res) => { } // Generate JWT - const token = jwt.sign({ userId: row.user_id }, SECRET_KEY, { expiresIn: '1h' }); + const token = jwt.sign({ userId: row.user_id }, SECRET_KEY, { expiresIn: '2h' }); res.status(200).json({ token }); }); }); diff --git a/backend/server2.js b/backend/server2.js index 8ef7f20..615baf5 100755 --- a/backend/server2.js +++ b/backend/server2.js @@ -346,10 +346,16 @@ app.get('/api/cip/:socCode', (req, res) => { res.status(404).json({ error: 'CIP code not found for this SOC code' }); }); -app.get('/api/CIP_institution_mapping_fixed.json', (req, res) => { - const filePath = path.join(__dirname, 'CIP_institution_mapping_fixed.json'); // Adjust the path if needed - res.sendFile(filePath); -}); +// Filtered schools endpoint +app.get('/api/schools', (req, res) => { + const { cipCode, state, level, type } = req.query; + const filePath = path.join(__dirname, 'CIP_institution_mapping_fixed.json'); + + fs.readFile(filePath, 'utf8', (err, data) => { + if (err) { + console.error('Error reading file:', err); + return res.status(500).json({ error: 'Failed to load data' }); + } diff --git a/src/App.css b/src/App.css index 425f455..1cd1509 100644 --- a/src/App.css +++ b/src/App.css @@ -1,18 +1,25 @@ /* src/App.css */ /* Body styling for the entire application */ -body { - background-color: #e9ecef; /* Light gray-blue background */ +/* General body and root styling for full-page coverage */ +body, #root { + background-color: #f4f7fb; /* Light gray-blue background */ font-family: Arial, sans-serif; margin: 0; padding: 0; + min-height: 100vh; /* Full viewport height */ + display: flex; + flex-direction: column; } -/* Main container to center and constrain content */ +/* Main App container for consistent centering */ .container { max-width: 1200px; - margin: 0 auto; + margin: 20px auto; padding: 20px; + background-color: #ffffff; /* White background for sections */ + border-radius: 8px; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } /* Main App styling */ @@ -110,3 +117,14 @@ input, select { box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); border: 1px solid #ddd; } + +/* Responsive Adjustments */ +@media (max-width: 768px) { + .dashboard { + grid-template-columns: 1fr; /* Stack vertically on smaller screens */ + } + + .riasec-scores, .riasec-descriptions { + padding: 15px; + } +} \ No newline at end of file diff --git a/src/components/CareerSuggestions.js b/src/components/CareerSuggestions.js index 5b55a32..d3a053f 100644 --- a/src/components/CareerSuggestions.js +++ b/src/components/CareerSuggestions.js @@ -8,7 +8,7 @@ export function CareerSuggestions({ careerSuggestions = [], onCareerClick }) { return (
-

Career Suggestions

+

Career Suggestions