A full-stack Digital Notice Board application built for university environments. VUC enables administrators and moderators to publish notices across categories, while students can browse, filter, and stay informed β all through a modern, responsive web interface.
- Features
- Tech Stack
- Project Structure
- Prerequisites
- Getting Started
- Environment Variables
- API Endpoints
- User Roles
- Database Seeding
- Screenshots
- License
- JWT Authentication β Secure login & registration with bcrypt password hashing
- Role-Based Access Control β Three roles:
admin,moderator,student - Notice Management β Full CRUD operations for creating, editing, and deleting notices
- Approval Workflow β Notices go through a
pending β published / rejectedpipeline - Category Filtering β Browse notices by categories: Academic, Sports, Clubs & Societies, Welfare, Marketplace, Lost & Found, Donations, Hostel & Accommodation
- Pending Notices Queue β Dedicated admin view for approving or rejecting notices
- User Profiles β View and manage user profile information
- Responsive Design β Modern UI with Tailwind CSS, Framer Motion animations, and Lucide icons
- Toast Notifications β Real-time feedback using React Hot Toast
| Technology | Purpose |
|---|---|
| React 19 | UI library |
| Vite 7 | Build tool & dev server |
| Tailwind CSS 4 | Utility-first styling |
| React Router 7 | Client-side routing |
| Axios | HTTP client |
| Framer Motion | Animations |
| Lucide React | Icon library |
| React Hot Toast | Toast notifications |
| Technology | Purpose |
|---|---|
| Node.js + Express 4 | REST API server |
| MongoDB + Mongoose 8 | Database & ODM |
| JSON Web Tokens | Authentication |
| bcryptjs | Password hashing |
| Nodemailer | Email utilities |
| dotenv | Environment config |
| CORS | Cross-origin support |
VUC_project/
βββ client/ # Frontend (React + Vite)
β βββ public/ # Static assets
β βββ src/
β β βββ api/ # Axios API configuration
β β βββ components/ # Reusable UI components
β β β βββ CreateNotice.jsx
β β β βββ EditNotice.jsx
β β β βββ NoticeList.jsx
β β β βββ Header.jsx
β β β βββ Sidebar.jsx
β β β βββ Footer.jsx
β β β βββ Navbar.jsx
β β β βββ Layout.jsx
β β β βββ ProtectedRoute.jsx
β β βββ context/ # React context (AuthContext)
β β βββ pages/ # Route-level pages
β β β βββ Dashboard.jsx
β β β βββ Login.jsx
β β β βββ Register.jsx
β β β βββ Profile.jsx
β β β βββ CategoryPage.jsx
β β β βββ PendingNotices.jsx
β β β βββ StudentServices.jsx
β β βββ App.jsx # Root component & routes
β β βββ main.jsx # Entry point
β β βββ index.css # Global styles
β βββ index.html
β βββ vite.config.js
β βββ package.json
β
βββ server/ # Backend (Express + MongoDB)
β βββ config/
β β βββ db.js # MongoDB connection
β βββ controllers/
β β βββ authController.js # Login & register logic
β β βββ noticeController.js # Notice CRUD & status updates
β βββ middleware/
β β βββ authMiddleware.js # JWT auth & role checks
β βββ models/
β β βββ User.js # User schema (userId, name, email, role)
β β βββ Notice.js # Notice schema (title, content, category, status)
β βββ routes/
β β βββ authRoutes.js # POST /login, /register
β β βββ noticeRoutes.js # CRUD + status endpoints
β βββ utils/ # Utility helpers
β βββ seed.js # Database seeding script
β βββ server.js # Express app entry point
β βββ package.json
β
βββ .gitignore
βββ README.md
- Node.js v18 or higher
- npm v9 or higher
- MongoDB Atlas account (or a local MongoDB instance)
git clone https://github.com/your-username/VUC_project.git
cd VUC_projectcd server
npm installCreate a .env file in the server/ directory (see Environment Variables).
# Start the development server
npm run devThe API server will start on http://localhost:5000.
cd client
npm installCreate a .env file in the client/ directory:
VITE_API_URL=http://localhost:5000/api# Start the development server
npm run devThe client will start on http://localhost:5173.
cd server
npm run seedThis populates the database with sample users and notices for testing.
| Variable | Description | Example |
|---|---|---|
PORT |
Server port | 5000 |
MONGO_URI |
MongoDB connection string | mongodb+srv://user:pass@cluster.mongodb.net/vuc |
JWT_SECRET |
Secret key for JWT signing | your_jwt_secret_key |
| Variable | Description | Example |
|---|---|---|
VITE_API_URL |
Backend API base URL | http://localhost:5000/api |
| Method | Endpoint | Description | Access |
|---|---|---|---|
POST |
/api/auth/register |
Register a new user | Public |
POST |
/api/auth/login |
Login & receive JWT | Public |
| Method | Endpoint | Description | Access |
|---|---|---|---|
GET |
/api/notices |
Get all notices (filtered by role) | Authenticated |
GET |
/api/notices/:id |
Get a single notice | Authenticated |
POST |
/api/notices |
Create a new notice | Admin, Moderator |
PUT |
/api/notices/:id |
Update a notice | Admin, Moderator |
PATCH |
/api/notices/:id/status |
Approve / reject a notice | Admin only |
DELETE |
/api/notices/:id |
Delete a notice | Admin, Moderator |
| Role | Permissions |
|---|---|
| Admin | Full access β create, edit, delete, approve/reject notices, manage all content |
| Moderator | Create, edit, and delete notices (subject to approval workflow) |
| Student | View published notices only |
User IDs follow the university registration pattern:
Year/Course/RegNo β e.g., 2021/ICT/075
| Category |
|---|
| Academic |
| Sports |
| Clubs & Societies |
| Welfare & Student Services |
| Marketplace |
| Lost & Found |
| Donations |
| Hostel & Accommodation |
Run the seed script to populate the database with test data:
cd server
npm run seedThis creates sample users (admin, moderator, student) and notices across various categories, useful for development and testing.
This project is licensed under the ISC License.

