Skip to content

Bulee048/SCC

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

34 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Smart Campus Companion (SCC)

A comprehensive platform for managing campus life, featuring AI-powered tools, real-time collaboration, and seamless integrations.

πŸš€ Features

Phase 1 (Current Implementation)

  • βœ… Authentication System: Secure JWT-based authentication with refresh tokens
  • βœ… User Management: Role-based access control (Student, Teacher, Admin)
  • βœ… Real-time Communication: Socket.io integration for instant updates
  • βœ… Responsive Dashboard: Modern UI with React and Redux Toolkit

Upcoming Features

  • πŸ“š Academic Schedule & Attendance Tracking
  • πŸ“ Assignment & Deadline Management
  • πŸ€– AI-Powered Timetable Generator
  • πŸ‘₯ Study Groups & Chat System
  • πŸ—³οΈ Meetings & Polling Engine
  • πŸ“„ Notes Sharing (OneDrive Integration)
  • πŸ“… Google Calendar Integration
  • πŸ“– Notebook LM Exam Mode
  • πŸ”” Real-time Notification System

πŸ—οΈ Architecture

Tech Stack

  • Frontend: React.js, Redux Toolkit, Socket.io Client
  • Backend: Node.js, Express.js, Socket.io
  • Database: MongoDB with Mongoose
  • Authentication: JWT (Access + Refresh Tokens)
  • Styling: Modern CSS with responsive design

Project Structure

SCC/
β”œβ”€β”€ backend/              # Node.js backend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/       # Database configuration
β”‚   β”‚   β”œβ”€β”€ controllers/  # Route controllers
β”‚   β”‚   β”œβ”€β”€ middlewares/  # Auth & validation middlewares
β”‚   β”‚   β”œβ”€β”€ models/       # Mongoose models
β”‚   β”‚   β”œβ”€β”€ routes/       # API routes
β”‚   β”‚   β”œβ”€β”€ utils/        # Helper functions
β”‚   β”‚   └── server.js     # Entry point
β”‚   β”œβ”€β”€ .env              # Environment variables
β”‚   └── package.json
β”‚
β”œβ”€β”€ frontend/             # React frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/   # Reusable components
β”‚   β”‚   β”œβ”€β”€ features/     # Redux slices
β”‚   β”‚   β”œβ”€β”€ pages/        # Page components
β”‚   β”‚   β”œβ”€β”€ services/     # API services
β”‚   β”‚   β”œβ”€β”€ socket/       # Socket.io client
β”‚   β”‚   β”œβ”€β”€ store/        # Redux store
β”‚   β”‚   β”œβ”€β”€ App.jsx       # Main component
β”‚   β”‚   └── main.jsx      # Entry point
β”‚   β”œβ”€β”€ .env              # Environment variables
β”‚   └── package.json
β”‚
└── README.md

πŸ“‹ Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn
  • MongoDB Atlas account (or local MongoDB)

βš™οΈ Installation & Setup

1. Clone the Repository

git clone <your-repo-url>
cd SCC

2. Backend Setup

cd backend
npm install

Configure Environment Variables

Edit backend/.env:

PORT=5000
NODE_ENV=development
CLIENT_URL=http://localhost:5173

# MongoDB Connection
MONGO_URI=your_mongodb_connection_string

# JWT Secret (use a strong random string)
JWT_SECRET=your_super_secret_jwt_key_change_this_in_production

# Email Configuration (for future features)
EMAIL_USER=your_email@example.com
EMAIL_PASS=your_email_password

# API Keys (for future features)
OPENAI_API_KEY=your_openai_api_key
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
ONEDRIVE_CLIENT_ID=your_onedrive_client_id
ONEDRIVE_CLIENT_SECRET=your_onedrive_client_secret

Start Backend Server

npm run dev

Server will run on http://localhost:5000

3. Frontend Setup

Open a new terminal:

cd frontend
npm install

Configure Environment Variables

Edit frontend/.env:

VITE_API_URL=http://localhost:5000
VITE_SOCKET_URL=http://localhost:5000

Start Frontend Development Server

npm run dev

Frontend will run on http://localhost:5173

🎯 Usage

  1. Open http://localhost:5173 in your browser
  2. Click "Get Started" or "Register" to create a new account
  3. Fill in your details:
    • Students: Provide student ID, department, and year
    • Teachers: Select teacher role
  4. Login with your credentials
  5. Access your personalized dashboard

πŸ“‘ API Endpoints

Authentication

  • POST /api/auth/register - Register new user
  • POST /api/auth/login - Login user
  • POST /api/auth/logout - Logout user
  • POST /api/auth/refresh - Refresh access token
  • GET /api/auth/me - Get current user profile (Protected)
  • PUT /api/auth/profile - Update user profile (Protected)

πŸ” Security Features

  • Password hashing with bcrypt
  • JWT access tokens (15 minutes expiry)
  • JWT refresh tokens (7 days expiry)
  • HTTP-only cookie support (ready)
  • Role-based access control
  • Input validation
  • Environment variable protection

πŸ§ͺ Testing

Backend Testing

cd backend
npm test

Frontend Testing

cd frontend
npm test

πŸ“¦ Deployment

Backend Deployment (Render/Railway)

  1. Create account on Render or Railway
  2. Connect your GitHub repository
  3. Set environment variables
  4. Deploy

Frontend Deployment (Vercel)

  1. Create account on Vercel
  2. Connect your GitHub repository
  3. Set build command: npm run build
  4. Set output directory: dist
  5. Add environment variables
  6. Deploy

Database (MongoDB Atlas)

  • Already cloud-hosted
  • No additional setup needed

πŸ›£οΈ Roadmap

Phase 1: βœ… Authentication & Dashboard (Completed)

  • User authentication system
  • Basic dashboard
  • Real-time socket connection

Phase 2: Groups & Chat (Next)

  • Study group creation
  • Real-time chat system
  • File sharing in groups

Phase 3: AI Scheduler

  • OpenAI integration
  • Timetable generation
  • Smart scheduling

Phase 4: Google Calendar Integration

  • OAuth2 setup
  • Calendar sync
  • Event management

Phase 5: Notes Sharing & Polling

  • OneDrive integration
  • Meeting scheduler
  • Polling system

Phase 6: Notifications & Optimization

  • Push notifications
  • Email notifications
  • Performance optimization
  • Caching implementation

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/AmazingFeature
  3. Commit your changes: git commit -m 'Add some AmazingFeature'
  4. Push to the branch: git push origin feature/AmazingFeature
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License.

πŸ‘₯ Authors

Your Name - Initial work

πŸ™ Acknowledgments

  • OpenAI for AI capabilities
  • MongoDB for database
  • Socket.io for real-time features
  • React community for excellent tools

πŸ“ž Support

For support, email your-email@example.com or create an issue in the repository.

πŸ”§ Troubleshooting

Common Issues

Backend won't start:

  • Check if MongoDB URI is correct
  • Ensure port 5000 is not in use
  • Verify all dependencies are installed

Frontend won't connect:

  • Check if backend is running
  • Verify API URLs in .env
  • Clear browser cache

Socket connection fails:

  • Ensure backend Socket.io is running
  • Check CORS settings
  • Verify socket URL in frontend

πŸ“š Additional Resources

About

A comprehensive platform for managing campus life, featuring AI-powered tools, real-time collaboration, and seamless integrations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 69.3%
  • CSS 30.6%
  • HTML 0.1%