Public repo: https://github.com/swciitg/Welfare_Board_Portal
Live site: https://swc.iitg.ac.in/welfare-board/
A full-stack portal for the Students' Welfare Board (SWB) at IIT Guwahati. The project includes a React frontend and an Express/Node backend with MongoDB. AdminJS is used as an admin panel for managing site content such as contacts, counselors, events, and resources.
- Project Overview
- Architecture
- Features
- Quick Start (Development)
- Environment Variables
- API Endpoints
- Testing & Linting
- Deployments (Docker)
- Contributing
- License
- Contact / Support
Welfare Board Portal is a web application used by the Students' Welfare Board at IIT Guwahati to display resources, contacts, counsellors, events, and other student welfare information. Admins manage content through AdminJS.
This repository contains two main directories:
frontend/- React app (Create React App) with TailwindCSS for styling.backend/- Express.js + MongoDB backend with AdminJS for content management.
- Frontend: React, TailwindCSS, react-router, axios
- Backend: Node.js, Express, Mongoose (MongoDB), AdminJS
- Admin Panel: AdminJS (mounted at
/welfare-board/api/adminby default) - Database: MongoDB (connection configured via environment variables)
- Dynamic Contacts & Counselors managed via AdminJS
- Resources page with PDF assets and modern icons
- Events listing and details
- Image + file uploads
- Responsive UI for mobile, tablet, and desktop
- AdminJS for CRUD operations on content
- Node.js (>=16)
- npm or yarn
- MongoDB (local or Atlas)
- Git
- Open a terminal and start in the
backendfolder:
cd backend
npm install-
Create a
.envfile inbackend/(see Environment Variables). -
Start the backend (development):
npm start- The backend serves API routes and mounts AdminJS at
/welfare-board/api/admin.
- In a new terminal, go to the
frontendfolder and install deps:
cd frontend
npm install- Start the frontend (development):
npm start- The frontend runs on
http://localhost:3000by default and proxies API calls to the backend (when configured).
Backend contains scripts to populate initial contacts and counselors:
cd backend
# Populate contacts
node populateContacts.js
# Populate counselors
node populateCounselors.jsImportant: ensure MONGODB_URI (or MONGODB_URI env var used by your project) is set in .env before running scripts.
- URL (local):
http://localhost:8000/welfare-board/api/admin - Use the admin email/password set in
.env.
The Admin panel exposes resources: Contacts, Counselors, Events, Facilities, Team Members, Club Info, Homepage data, etc.
Create a .env file in backend/ with the following variables (example):
PORT=8000
MONGO_URI=mongodb://localhost:27017/welfare_board
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=strongpassword
COOKIE_NAME=adminjs
COOKIE_PASSWORD=a-secure-cookie-password
For production, store secrets securely (Vault / environment configuration in your hosting provider).
Some key endpoints (mounted under /welfare-board/api or as configured):
GET /welfare-board/api/home- Homepage dataGET /welfare-board/api/contacts- List contactsGET /welfare-board/api/counselors- List active counselorsGET /welfare-board/api/club/:name- Club dataGET /welfare-board/api/event:id- Event detailsPOST /welfare-board/api/upload- File upload (protected routes may apply)
(Refer to backend/controllers for full list of available routes and response shapes.)
- Frontend uses
react-scripts testfor unit tests (if any) - Linting: follow project ESLint / Prettier configuration if present
This repo contains docker-compose files and Dockerfiles for frontend/ and backend/. You can run containers using:
# from repo root
docker-compose up --buildAdjust environment variables and Docker networking as required.
Thanks for your interest in contributing! We welcome contributions from students, maintainers, and participants during events like Hacktoberfest.
Please follow these steps:
- Fork the repository
- Create a feature branch from
main:
git checkout -b feat/your-feature-name- Make changes, run tests, and ensure linting/formatting
- Commit with clear messages (see
CONTRIBUTINGbelow for examples) - Push to your fork and open a Pull Request against
main
- Keep PRs focused and small
- Provide a clear description of the change and screenshot (if UI)
- Add tests where applicable
- Follow the existing code style
If you plan to contribute for Hacktoberfest, please:
- Choose issues labelled
hacktoberfestorgood-first-issue - Make meaningful contributions (fixes, features, docs)
- Avoid trivial or spammy PRs
feat: add counselors admin resource and apifix: correct admin route mounting and env variable usagedocs: add README and contrib guidelines
Specify license (e.g., MIT) here.
If you need help, open an issue on the repo or contact the maintainers via the project website.
Last updated: October 31, 2025