# CampusConnect

CampusConnect is a Node.js, Express, EJS, and PostgreSQL web application for
student semester registration, campus facility bookings, payment verification,
role dashboards, and report downloads.


## Active Features

- Student and staff local account registration with RUB email verification
- IT Admin controlled account creation for privileged roles
- One-account limits for solo roles such as Finance, DAA, DSA, DRIL, Coach,
  CollegeAdmin, GuestHouseManager, ITAdmin, and Exam-cell
- Programme-scoped PL and HoD accounts
- Hostel-scoped SSO accounts
- IT Admin programme management for future programme changes
- Student semester registration with hostel, phone, receipt, and status reports
- Finance confirmation for paid semester registration records
- Exam-cell semester registration status and download access
- Outdoor sports booking with coach payment confirmation and finance reports
- Guesthouse booking with manager/college-admin payment confirmation and finance reports
- Hall booking approval by CollegeAdmin
- Excel report downloads
- Audit logging for important administrative actions


## Technology Stack

- Node.js and Express
- EJS templates
- PostgreSQL with pg-promise
- Multer uploads
- Nodemailer email verification and notification emails
- Optional Gotify and WhatsApp notifications


## Setup

```bash
npm ci
cp .env.example .env   # if you create an example file later
npm start
```

The main runtime settings are documented in `requirement.txt`.


## Database Reset And Demo Users

To empty the database and create demo users for every role:

```bash
CONFIRM_FLUSH=YES node scripts/flushDatabase.js --seed-demo-accounts
```

All demo users use password:

```text
demo
```

Demo login emails:

- `demo.student@rub.edu.bt`
- `demo.staff@rub.edu.bt`
- `demo.daa@rub.edu.bt`
- `demo.dsa@rub.edu.bt`
- `demo.dril@rub.edu.bt`
- `demo.pl@rub.edu.bt`
- `demo.hod@rub.edu.bt`
- `demo.sso@rub.edu.bt`
- `demo.finance@rub.edu.bt`
- `demo.examcell@rub.edu.bt`
- `demo.coach@rub.edu.bt`
- `demo.guesthouse@rub.edu.bt`
- `demo.collegeadmin@rub.edu.bt`
- `demo.itadmin@rub.edu.bt`


## Documentation

- `requirement.txt` lists runtime requirements and environment variables.
- `DEPLOYMENT.md` explains manual hosting behind Apache for
  `https://campusconnect.sherubtse.edu.bt/`.
- `USER_DOCUMENTATION.md` explains the current user-facing workflows.
