An open API service indexing awesome lists of open source software.

https://github.com/classyid/lab-management-system

A comprehensive web-based laboratory management system for universities. Features real-time booking, WhatsApp notifications, equipment tracking, and admin dashboard. Built with Flask & PostgreSQL.
https://github.com/classyid/lab-management-system

Last synced: 4 months ago
JSON representation

A comprehensive web-based laboratory management system for universities. Features real-time booking, WhatsApp notifications, equipment tracking, and admin dashboard. Built with Flask & PostgreSQL.

Awesome Lists containing this project

README

          

# Lab Management System

A comprehensive web-based laboratory management system designed for universities and academic institutions. This system streamlines laboratory booking, equipment management, and user coordination with real-time notifications and analytics.

## Features

### Core Functionality
- **Real-time Lab Booking** - Online reservation system with conflict detection
- **Multi-role Support** - Different interfaces for Students, Faculty, and Administrators
- **Equipment Management** - Track and manage laboratory equipment inventory
- **WhatsApp Integration** - Automated notifications for bookings and approvals
- **Dashboard Analytics** - Comprehensive reporting and usage statistics

### User Roles
- **Students**: Book labs, view availability, manage personal bookings
- **Faculty**: All student features plus priority booking and extended access
- **Administrators**: Full system management, approval workflows, user management

### Technical Features
- Responsive web design for all devices
- CSRF protection and security measures
- Rate limiting to prevent abuse
- Database backup and recovery
- Load tested for reliability

## Tech Stack

- **Backend**: Python Flask
- **Database**: PostgreSQL
- **Frontend**: HTML5, CSS3, JavaScript, Tailwind CSS
- **Integration**: WhatsApp Business API
- **Testing**: K6 for load testing
- **Deployment**: Linux (Ubuntu/CentOS)

## Installation

### Prerequisites
- Python 3.8+
- PostgreSQL 12+
- Node.js (for development tools)
- WhatsApp Business API access (optional)

### Quick Start

1. **Clone the repository**
```bash
git clone https://github.com/classyid/lab-management-system.git
cd lab-management-system
```

2. **Set up virtual environment**
```bash
python3 -m venv lab
source lab/bin/activate # On Windows: lab\Scripts\activate
```

3. **Install dependencies**
```bash
pip install -r requirements.txt
```

4. **Configure database**
```bash
# Create PostgreSQL database
createdb lab_management

# Update config.py with your database credentials
cp config.py.example config.py
```

5. **Initialize database**
```bash
python3 run.py --init-db
```

6. **Run the application**
```bash
python3 run.py
```

7. **Access the application**
- Open browser and go to `http://localhost:5000`
- Default admin credentials: `admin` / `admin123`

## Configuration

### Database Setup
Update `config.py` with your PostgreSQL credentials:
```python
DB_HOST = 'your_db_host'
DB_PORT = '5432'
DB_NAME = 'lab_management'
DB_USER = 'your_db_user'
DB_PASSWORD = 'your_db_password'
```

### WhatsApp Integration
Configure WhatsApp API in the admin panel:
1. Login as admin
2. Go to Admin → WhatsApp Configuration
3. Set API URL and enable notifications
4. Test connection

## Usage

### For Students
1. Register/login with your credentials
2. Browse available laboratories
3. Select lab and time slot
4. Submit booking request
5. Receive WhatsApp confirmation

### For Administrators
1. Login with admin credentials
2. Manage laboratories and equipment
3. Approve/reject booking requests
4. Monitor system usage and analytics
5. Configure system settings

## API Documentation

### Booking API
```
POST /api/submit_booking
Content-Type: application/json

{
"lab_id": 1,
"start_time": "2025-09-10T09:00",
"end_time": "2025-09-10T11:00",
"purpose": "Programming Lab Session",
"participants": 25,
"priority": "normal"
}
```

### Status Check
```
GET /api/check_availability?lab_id=1&start_time=...&end_time=...
```

## Testing

### Run Unit Tests
```bash
python -m pytest tests/
```

### Load Testing
```bash
# Install K6
curl https://github.com/grafana/k6/releases/download/v0.47.0/k6-v0.47.0-linux-amd64.tar.gz -L | tar xvz

# Run load test
./k6 run tests/load_test.js
```
![K6](screenshots/k6.png)

## Deployment

### Production Setup
1. **Server Requirements**
- 2+ CPU cores
- 4GB+ RAM
- 100GB+ storage
- Linux OS (Ubuntu 20.04+ recommended)

2. **Deploy with Docker** (recommended)
```bash
docker-compose up -d
```

3. **Manual Deployment**
```bash
# Install production dependencies
pip install gunicorn psycopg2-binary

# Run with Gunicorn
gunicorn -w 4 -b 0.0.0.0:5000 app:app
```

### Environment Variables
```bash
export FLASK_ENV=production
export SECRET_KEY=your-secret-key
export DB_PASSWORD=your-db-password
export WHATSAPP_API_URL=your-whatsapp-api
```

## Contributing

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

### Development Guidelines
- Follow PEP 8 style guide
- Write tests for new features
- Update documentation
- Ensure code passes all tests

## Security

- Regular security updates
- Input validation and sanitization
- CSRF protection enabled
- Rate limiting implemented
- SQL injection prevention
- Session management security

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Support
- **Email**: kontak@classy.id

## Screenshots

![Dashboard](screenshots/dashboard.png)
![Booking Form](screenshots/booking.png)

## Acknowledgments

- Flask community for the excellent framework
- PostgreSQL team for robust database solution
- Contributors and testers
- Open source libraries used in this project

---

**Made with ❤️ for academic institutions**
```