Skip to content

This is a University Project so there could be a lot of things written extra or doesn't work. I believe in open source so, I shared my work.

Notifications You must be signed in to change notification settings

faeem13/StudyabroadportalwebDevelopmentProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📦 Installation & Setup Guide

Complete guide to get your Study Abroad Portal up and running.


🎯 Choose Your Method

Method 1: With Server (npm start) ⭐ RECOMMENDED FOR DEVELOPMENT

Method 2: Without Server (Direct Browser Access)


Method 1: Server Setup (npm start)

✅ Prerequisites

Install Node.js and npm

Check if already installed:

node --version
npm --version

If not installed:

  1. Go to: https://nodejs.org/
  2. Download LTS (Long Term Support) version
  3. Install (follow installer instructions)
  4. Restart your terminal/command prompt
  5. Verify installation: node --version

📥 Installation Steps

Step 1: Navigate to Project Directory

cd /path/to/study-abroad-portal

On Windows:

cd C:\Users\YourName\Desktop\study-abroad-portal

On Mac/Linux:

cd ~/Desktop/study-abroad-portal

Step 2: Install Dependencies

npm install

What this does:

  • Installs Express (web server framework)
  • Installs CORS (cross-origin resource sharing)
  • Installs Body-parser (request parsing)
  • Creates node_modules folder
  • Creates package-lock.json file

Expected output:

added 57 packages, and audited 58 packages in 3s
found 0 vulnerabilities

Step 3: Start the Server

npm start

You should see:

╔════════════════════════════════════════════════════════════╗
║                                                            ║
║        🌍 Study Abroad Portal Server                      ║
║                                                            ║
╚════════════════════════════════════════════════════════════╝

  ✅ Server is running successfully!

  🌐 Local:    http://localhost:3000
  🌐 Network:  http://localhost:3000

╔════════════════════════════════════════════════════════════╗
║  Available Pages:                                          ║
╠════════════════════════════════════════════════════════════╣
║  • Home:             http://localhost:3000/                    ║
║  • Start Page:       http://localhost:3000/start              ║
║  • Login:            http://localhost:3000/login              ║
...

Step 4: Open Your Browser

Go to: http://localhost:3000

🎉 Success! The portal is now running!


🎮 Server Commands

# Start the server
npm start

# Alternative start commands (all do the same thing)
npm run dev
npm run serve

# Stop the server
Ctrl + C

🌐 Available URLs (When Server is Running)

Pages:

API Endpoints (Mock):


🔧 Troubleshooting Server Setup

Problem 1: "node: command not found"

Solution:

  • Node.js is not installed
  • Install from: https://nodejs.org/
  • Restart terminal after installation

Problem 2: "npm: command not found"

Solution:

  • npm comes with Node.js
  • Reinstall Node.js from: https://nodejs.org/
  • On Linux, install separately: sudo apt install npm

Problem 3: "Cannot find module 'express'"

Solution:

npm install

If that fails:

npm install --force

Or install manually:

npm install express cors body-parser

Problem 4: "Port 3000 is already in use"

Solution A: Stop other process using port 3000

Solution B: Use different port:

# Linux/Mac
PORT=8080 npm start

# Windows Command Prompt
set PORT=8080 && npm start

# Windows PowerShell
$env:PORT=8080; npm start

Then visit: http://localhost:8080

Problem 5: "Missing script: start"

Solution:

  • Check that package.json exists in current directory
  • Verify you're in the correct directory: ls (should show package.json)
  • If missing, you're in wrong directory

Problem 6: Permission errors (Linux/Mac)

Solution:

# Fix npm permissions
sudo chown -R $(whoami) ~/.npm

# Or install with sudo
sudo npm install

Problem 7: npm install is very slow

Solution:

# Clear npm cache
npm cache clean --force

# Try install again
npm install

Problem 8: EACCES error

Solution (Linux/Mac):

sudo npm install -g npm@latest

Solution (Windows):

  • Run Command Prompt as Administrator
  • Run: npm install

🔄 Restart After Changes

If you modify server.js or other server files:

  1. Stop server: Ctrl + C
  2. Start again: npm start

Note: HTML, CSS, and client-side JS changes don't need server restart. Just refresh browser.


Method 2: Direct Browser Access (No Server)

🚀 Super Simple - No Installation!

Option 1: Double-Click

  1. Find start.html or home.html in file explorer
  2. Double-click it
  3. Opens in default browser
  4. Done! ✅

Option 2: Right-Click

  1. Right-click start.html or home.html
  2. Select "Open with"
  3. Choose browser (Chrome, Firefox, Edge, Safari)
  4. Done! ✅

Option 3: Drag and Drop

  1. Open your web browser
  2. Drag start.html or home.html into browser window
  3. Done! ✅

Option 4: File Menu

  1. Open browser
  2. File → Open File (or Ctrl+O / Cmd+O)
  3. Navigate to project folder
  4. Select start.html or home.html
  5. Done! ✅

📊 Comparison: Server vs Direct

Feature With Server Without Server
Installation Requires Node.js/npm None needed
URLs Clean (/home) File paths (home.html)
API Endpoints Available Not available
Setup Time 5 minutes 0 seconds
Best For Development, Testing Quick viewing, Sharing
Database Ready Yes (with setup) No
Internet Required No (except images) No (except images)

💡 Recommendations

Use Server Method If:

  • ✅ You're developing features
  • ✅ You want clean URLs
  • ✅ You plan to add database
  • ✅ You want API endpoints
  • ✅ You're testing in production-like environment

Use Direct Method If:

  • ✅ You just want to view/test quickly
  • ✅ You don't want to install anything
  • ✅ You're sharing with someone
  • ✅ You're on a restricted computer
  • ✅ You want simplicity

🎓 Next Steps

After Installation:

  1. Explore the Portal

    • Navigate through all pages
    • Test features and tools
    • Create a user account
  2. Customize Content

    • Edit university data
    • Add scholarships
    • Update country information
  3. Database Integration (Optional)

    • Read MYSQL_INTEGRATION_GUIDE.md
    • Set up MySQL database
    • Connect backend to database
  4. Deploy Online

    • See README.md deployment section
    • Choose hosting platform
    • Upload and go live!

📚 Additional Resources

  • README.md - Complete documentation
  • QUICK_START.txt - Quick reference
  • MYSQL_INTEGRATION_GUIDE.md - Database setup
  • AUTH_SYSTEM_README.md - Authentication details

✅ Installation Checklist

For Server Method:

  • Node.js installed and verified
  • Navigated to project directory
  • Ran npm install successfully
  • Ran npm start successfully
  • Opened http://localhost:3000 in browser
  • Portal loads correctly

For Direct Method:

  • Located HTML files
  • Opened start.html or home.html in browser
  • Portal loads correctly

🎉 You're All Set!

Your Study Abroad Portal is now ready to use!

Questions? Check the troubleshooting section or README.md

Good luck with your study abroad journey! 🌍✈️📚

✅ Server Setup Complete!

Your Study Abroad Portal now supports both server and non-server modes!


🎉 What's Been Set Up

1. ✅ Node.js Server Configuration

  • package.json - NPM configuration with all dependencies
  • server.js - Express server with routes and API endpoints
  • .gitignore - Exclude node_modules and system files

2. ✅ Startup Scripts

  • start-server.sh - Linux/Mac automatic startup script
  • start-server.bat - Windows automatic startup script

3. ✅ Documentation

  • README.md - Complete guide (updated with server instructions)
  • INSTALLATION.md - Detailed installation guide
  • QUICK_START.txt - Quick reference (updated)

4. ✅ Helper Scripts

  • navigation-helper.js - Shared navigation utilities

5. ✅ Entry Points

  • start.html - Beautiful landing page
  • home.html - Main portal page

🚀 How to Run Your Portal

Method 1: With Server (npm start) ⭐ RECOMMENDED

Quick Start:

# 1. Install dependencies (first time only)
npm install

# 2. Start server
npm start

# 3. Open browser
# http://localhost:3000

Using Startup Scripts:

Linux/Mac:

chmod +x start-server.sh
./start-server.sh

Windows:

start-server.bat

(Just double-click the file!)

Benefits:

  • ✅ Clean URLs (/home instead of home.html)
  • ✅ API endpoints ready
  • ✅ Better for development
  • ✅ Database integration ready
  • ✅ Professional production-like setup

Method 2: Without Server (Direct Browser)

Quick Start:

  1. Double-click start.html or home.html
  2. Portal opens in browser
  3. That's it!

Benefits:

  • ✅ No installation needed
  • ✅ Instant access
  • ✅ Works offline
  • ✅ Easy sharing

📊 File Structure

study-abroad-portal/
│
├── 🚀 SERVER FILES
│   ├── package.json           # NPM configuration
│   ├── server.js              # Express server
│   ├── .gitignore             # Git ignore rules
│   ├── start-server.sh        # Linux/Mac startup script
│   └── start-server.bat       # Windows startup script
│
├── 🌐 WEB PAGES
│   ├── start.html             # Landing page
│   ├── home.html              # Main portal
│   ├── login.html             # Authentication
│   ├── profile.html           # User dashboard
│   ├── preparation-tips.html  # Prep guide
│   ├── test-prep.html         # Test resources
│   ├── universities.html      # University search
│   ├── scholarships.html      # Scholarship finder
│   ├── visa-guide.html        # Visa info
│   └── job-prospects.html     # Job prospects
│
├── 🎨 STYLES
│   ├── home-styles.css
│   ├── login-styles.css
│   ├── profile-styles.css
│   └── [other CSS files]
│
├── ⚙️ SCRIPTS
│   ├── home-script.js
│   ├── login-script.js
│   ├── profile-script.js
│   ├── navigation-helper.js   # Shared utilities
│   └── [other JS files]
│
└── 📚 DOCUMENTATION
    ├── README.md              # Main documentation
    ├── INSTALLATION.md        # Setup guide
    ├── QUICK_START.txt        # Quick reference
    ├── SERVER_SETUP_COMPLETE.md (this file)
    ├── MYSQL_INTEGRATION_GUIDE.md
    └── AUTH_SYSTEM_README.md

🌐 Available Routes (Server Mode)

Pages:

URL Page Description
/ Home Landing page
/start Start Entry page
/home Home Main portal
/login Login User authentication
/profile Profile User dashboard
/preparation Prep Tips Study preparation
/test-prep Tests IELTS/GRE/TOEFL
/universities Universities University search
/scholarships Scholarships Scholarship finder
/visa Visa Guide Visa information
/jobs Job Prospects Career opportunities

API Endpoints (Mock):

Endpoint Method Purpose
/api/health GET Health check
/api/auth/login POST User login
/api/auth/register POST User registration
/api/user/profile GET Get user profile
/api/user/save-university POST Save university
/api/user/save-scholarship POST Save scholarship
/api/universities GET Get universities list
/api/scholarships GET Get scholarships list

Note: These are mock endpoints. They return sample data for testing. See MYSQL_INTEGRATION_GUIDE.md to connect to a real database.


🔧 Server Commands

# Install dependencies (first time only)
npm install

# Start the server
npm start

# Alternative start commands (all equivalent)
npm run dev
npm run serve

# Stop the server
Ctrl + C

🎯 What Happens When Server Runs

Console Output:

╔════════════════════════════════════════════════════════════╗
║                                                            ║
║        🌍 Study Abroad Portal Server                      ║
║                                                            ║
╚════════════════════════════════════════════════════════════╝

  ✅ Server is running successfully!

  🌐 Local:    http://localhost:3000
  🌐 Network:  http://localhost:3000

╔════════════════════════════════════════════════════════════╗
║  Available Pages:                                          ║
╠════════════════════════════════════════════════════════════╣
║  • Home:             http://localhost:3000/                    ║
║  • Start Page:       http://localhost:3000/start              ║
║  • Login:            http://localhost:3000/login              ║
║  • Profile:          http://localhost:3000/profile            ║
║  • Preparation:      http://localhost:3000/preparation        ║
║  • Test Prep:        http://localhost:3000/test-prep          ║
║  • Universities:     http://localhost:3000/universities       ║
║  • Scholarships:     http://localhost:3000/scholarships       ║
║  • Visa Guide:       http://localhost:3000/visa               ║
║  • Job Prospects:    http://localhost:3000/jobs               ║
╚════════════════════════════════════════════════════════════╝

Request Logging:

The server logs all requests:

[2026-01-29T12:00:00.000Z] GET /
[2026-01-29T12:00:05.000Z] GET /universities
[2026-01-29T12:00:10.000Z] POST /api/auth/login

🛠️ Troubleshooting

"npm: command not found"

Solution: Install Node.js from https://nodejs.org/

"Cannot find module 'express'"

Solution: Run npm install

"Port 3000 already in use"

Solution:

# Use different port
PORT=8080 npm start

"Missing script: start"

Solution: Check that you're in the correct directory with package.json

Permission errors (Linux/Mac)

Solution:

sudo chown -R $(whoami) ~/.npm

See INSTALLATION.md for complete troubleshooting guide.


🔄 Development Workflow

Making Changes:

1. HTML/CSS/JS Changes (Client-side):

  • Edit the files
  • Save
  • Refresh browser (F5 or Ctrl+R)
  • No server restart needed!

2. server.js Changes (Server-side):

  • Edit server.js
  • Save
  • Stop server (Ctrl+C)
  • Restart server (npm start)

📦 Dependencies Installed

When you run npm install, these packages are installed:

Package Version Purpose
express ^4.18.2 Web server framework
cors ^2.8.5 Cross-origin resource sharing
body-parser ^1.20.2 Request body parsing

Total size: ~10 MB in node_modules/


🌍 Deployment Ready

Your server is ready for deployment to:

  • Heroku - Free tier available
  • Railway - Modern platform
  • Render - Easy deployment
  • DigitalOcean - Droplets or App Platform
  • AWS - EC2, Elastic Beanstalk
  • Google Cloud - App Engine
  • Azure - App Service

Note: For static hosting (without server), you can still use:

  • GitHub Pages
  • Netlify
  • Vercel
  • Firebase Hosting

🔐 Security Notes

Current Setup:

  • ✅ CORS enabled for cross-origin requests
  • ✅ Body parser for secure request handling
  • ✅ Error handling middleware
  • ⚠️ Mock authentication (localStorage-based)

For Production:

  • Implement real database (see MYSQL_INTEGRATION_GUIDE.md)
  • Add session management (express-session)
  • Hash passwords (bcrypt)
  • Add rate limiting (express-rate-limit)
  • Use environment variables for secrets
  • Enable HTTPS
  • Add input validation
  • Implement CSRF protection

📈 Next Steps

Immediate:

  1. ✅ Run the server: npm start
  2. ✅ Test all pages and features
  3. ✅ Create a user account
  4. ✅ Test save functionality

Short-term:

  1. 📝 Customize content (universities, scholarships)
  2. 🎨 Adjust styling and branding
  3. 🧪 Add more test prep content
  4. 📊 Enhance calculators and tools

Long-term:

  1. 🗄️ Set up MySQL database
  2. 🔐 Implement real authentication
  3. 📧 Add email notifications
  4. 📊 Add analytics
  5. 🌍 Deploy to production
  6. 📱 Create mobile app (optional)

✨ Features Working

✅ Currently Working:

  • Navigation between all pages
  • User registration and login
  • User profiles
  • Save universities and scholarships
  • Search and filter tools
  • Calculators and quizzes
  • Responsive design
  • Mobile menu
  • LocalStorage data persistence

🔄 Ready for Enhancement:

  • Database integration (MySQL ready)
  • API endpoints (mock → real)
  • User sessions (add express-session)
  • Email notifications
  • Admin panel
  • Advanced analytics

🎓 Learning Resources

Understand the Stack:

Enhancement Ideas:

  1. Add real-time chat support
  2. Implement document upload
  3. Create admin dashboard
  4. Add payment integration (for premium features)
  5. Implement social media login
  6. Add push notifications

📞 Support

Documentation:

  • README.md - Complete guide
  • INSTALLATION.md - Setup instructions
  • QUICK_START.txt - Quick reference
  • MYSQL_INTEGRATION_GUIDE.md - Database setup
  • AUTH_SYSTEM_README.md - Authentication details

Troubleshooting:

  1. Check console for errors (F12 in browser)
  2. Check server logs in terminal
  3. Verify all files are present
  4. Clear browser cache
  5. Try incognito/private mode

🎉 Congratulations!

Your Study Abroad Portal now has:

  • ✅ Professional server setup
  • ✅ Clean URL routing
  • ✅ API endpoints ready
  • ✅ Database integration ready
  • ✅ Two deployment options
  • ✅ Complete documentation
  • ✅ Easy startup scripts

You're ready to develop, test, and deploy!


📝 Quick Command Reference

# First-time setup
npm install

# Start server
npm start

# Stop server
Ctrl + C

# Use different port
PORT=8080 npm start

# Clear npm cache (if issues)
npm cache clean --force

# Reinstall everything
rm -rf node_modules package-lock.json
npm install

# Check versions
node --version
npm --version

🌟 You're All Set!

To Start Developing:

Linux/Mac:

./start-server.sh

Windows:

start-server.bat

Manual:

npm install  # First time only
npm start    # Every time

Then open: http://localhost:3000


Happy Coding! 🚀

Good luck with your Study Abroad Portal! 🌍✈️📚

Screenshoots Image Alt Image Alt Image Alt
Image Alt Image Alt Image Alt Image Alt Image Alt Image Alt Image Alt Image Alt Image Alt Image Alt Image Alt Image Alt Image Alt

About

This is a University Project so there could be a lot of things written extra or doesn't work. I believe in open source so, I shared my work.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors