Skip to content

Full-stack Scout Management System with QR attendance tracking, automated WhatsApp messaging, financial management, and activity planning. Built with Spring Boot, JavaScript, and SQLite for complete offline operation.

Notifications You must be signed in to change notification settings

abanoubwagim/scout-management-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

🎯 Scout Management System

Scout Management System Java Spring Boot Version

A complete web-based system for managing scout organizations - members, attendance, activities, and WhatsApp communications.

FeaturesQuick StartAPI DocumentationTech Stack


🚀 New Backend Version Will be Available!
We're continuously improving the codebase. A newer version of the backend is currently under development with enhanced features, improved performance, and better code organization. Stay tuned for updates!


📋 Table of Contents


✨ Features

👥 Member Management

  • ✅ Add, edit, delete, and search scout members
  • ✅ Auto-generated member codes (YYMMDD format)
  • ✅ Categorization by age groups
  • ✅ Phone and address validation
  • ✅ Export member lists to PDF

📸 QR Attendance System

  • ✅ Scan QR codes to mark attendance
  • ✅ Automatic late detection with configurable time windows
  • ✅ Real-time attendance tracking
  • ✅ Daily attendance reports
  • ✅ Category-based attendance filtering

💰 Financial Tracking

  • ✅ Automatic late fee calculation
  • ✅ Daily and monthly revenue reports
  • ✅ Tax amount customization
  • ✅ Financial export to PDF
  • ✅ Revenue analytics

🎯 Activity Management

  • ✅ Create and manage scout activities and events
  • ✅ Activity status tracking (upcoming/completed)
  • ✅ Location and description details
  • ✅ Activity statistics dashboard

📱 WhatsApp Integration

  • ✅ Automated message sending to members
  • ✅ Bulk messaging capabilities
  • ✅ Message tracking and status
  • ✅ Selenium-based WhatsApp Web automation

📄 Reporting & Export

  • ✅ PDF generation for all reports
  • ✅ Member lists with filters
  • ✅ Attendance summaries
  • ✅ Financial statements

🔒 Additional Features

  • ✅ Admin authentication system
  • ✅ Database backup functionality
  • ✅ Offline operation support
  • ✅ Mobile hotspot compatibility
  • ✅ RESTful API architecture

🛠 Technology Stack

Category Technology
Backend Java 17, Spring Boot 3.x
Database SQLite
Frontend Bootstrap 5.3, HTML5, CSS3, JavaScript
Automation Selenium WebDriver
PDF Generation jsPDF
Build Tool Maven

📂 Project Structure

📦 scout-system
│
├── 📂 src/main/java/com/scout_system/
│   ├── 📂 controller/         # REST API Controllers (6 files)
│   │   ├── MemberController.java
│   │   ├── AttendanceController.java
│   │   ├── TaxController.java
│   │   ├── ActivityController.java
│   │   ├── WhatsAppController.java
│   │   └── AdminController.java
│   │
│   ├── 📂 service/            # Business Logic (7 services   
│   │   ├── MemberService.java
│   │   ├── AttendanceService.java
│   │   ├── TaxService.java
│   │   ├── ActivityService.java
│   │   ├── WhatsAppSchedulerService.java
│   │   └── AdminService.java
|   |   └── DataCleanupScheduler.java
│   │   └── 📂 impl/
│   │           ├── MemberServiceImpl.java
│   │           ├── AttendanceServiceImpl.java
│   │           ├── TaxServiceImpl.java
│   │           ├── ActivityServiceImpl.java
|   |           └── AdminServiceImpl.java
│   ├── 📂 repository/         # JPA Repositories (5 files)
│   │   ├── MemberRepository.java
│   │   ├── AttendanceRepository.java
│   │   ├── TaxRepository.java
│   │   ├── ActivityRepository.java
│   │   └── AdminRepository.java
│   │
│   ├── 📂 model/              # Entity Models (5 entities)
│   │   ├── Member.java
│   │   ├── Attendance.java
│   │   ├── Tax.java
│   │   ├── Activity.java
│   │   └── Admin.java
│   │
│   ├── 📂 util/             # Configuration
│   │   ├── SecurityConfig.java
│   │   ├── DatabaseBackup.java
│   │   ├── LocalDateAttributeConverter.java
│   │   └── SQLiteConfig.java
│   │
│   └── 📄 ScoutSystemApplication.java
│
├── 📂 src/main/resources/
│   ├── 📄 application.properties
│   ├── 📄 logback-spring.xml
│   └── 📂 static/
│       ├── 📂 assets/
│       │   ├── 📂 css/        # Stylesheets
│       │   ├── 📂 img/        # Images & logos
│       │   ├── 📂 js/         # JavaScript modules (9 files)
│       │   ├── 📂 fonts/         # Fonts 
│       │   ├── 📂 icons/         # Icons
│       └── ├── signIn.html    # HTML pages (8 pages)
│           ├── register.html
│           ├── dashboard.html
│           ├── members.html
│           ├── attendance.html
│           ├── attendance-qr.html
│           ├── qr-checkin.html
│           ├── activities.html
│           ├── whatsapp.html
│           └── taxes.html
│
└── 📄 scout_system.db     # SQLite database  
├── 📄 pom.xml                 # Maven dependencies
├── 📄 .gitignore
└── 📄 README.md

🚀 Quick Start

Prerequisites

  • Java 17 or higher
  • Maven 3.6+
  • Google Chrome (for WhatsApp integration)
  • ChromeDriver (compatible with your Chrome version)

Installation

  1. Clone the repository
git clone https://github.com/abanoubwagim/scout-management-system.git
cd scout-management-system
  1. Build the project
mvn clean package
  1. Run the application
java -jar target/scout-management-system-1.0.0.jar
  1. Access the application

Open your browser and navigate to:

http://localhost:9090/signIn.html
  1. Login with default credentials
Username: admin
Password: admin123

First-Time Setup

  1. Register a new admin account at http://localhost:9090/register.html
  2. Login with your new credentials
  3. Start adding scout members
  4. Configure WhatsApp session (first-time QR scan required)

⚙️ Configuration

Edit src/main/resources/application.properties:

# Server Configuration
server.port=9090

# Database Configuration
spring.datasource.url=jdbc:sqlite:database/scout_system.db
spring.datasource.driver-class-name=org.sqlite.JDBC
spring.jpa.database-platform=org.hibernate.community.dialect.SQLiteDialect

# JPA Configuration
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=false

# WhatsApp Configuration
whatsapp.session.path=C:/whatsapp-session
whatsapp.chrome.driver.path=chromedriver.exe

Time Windows for Late Detection

Configure in AttendanceService.java:

// Scouts and Guides: 12:10 PM
// Cubs and Blossoms: 12:10 PM
// Buds: 11:40 AM

📚 API Documentation

Base URL: http://localhost:9090

👥 Member Management

Add New Member

POST /members/addMember
Content-Type: application/json

{
  "code": "251201",
  "fullName": "Abanoub Wagim",
  "title": "Scout Member",
  "dateOfBirth": "01/12/2025",
  "phone": "01111111111",
  "address": "Cairo, Egypt",
  "category": "Scouts and Guides"
}

Field Validations:

  • code: Exactly 6 digits (YYMMDD format)
  • phone: 11 digits starting with "01"
  • category: "Scouts and Guides" | "Cubs and Blossoms" | "Buds"
  • title: "Scout Leader" | "Scout Assistant" | "Scout Member"

Get All Members

GET /members/allMembers

Get Member by Code

GET /members/member/{code}

Update Member

PUT /members/update/{code}
Content-Type: application/json

{
  "fullName": "Abanoub Wagim",
  "title": "Scout Leader",
  "dateOfBirth": "01/12/2025",
  "phone": "01111111111",
  "address": "New Address",
  "category": "Scouts and Guides"
}

Delete Member

DELETE /members/delete/{code}

Get Member Count

GET /members/getCountAllMember

Backup Database

GET /members/backup

✅ Attendance Management

Record Attendance (QR Scan)

POST /attendance/attend
Content-Type: application/json

{
  "code": "251201",
  "category": "Scouts and Guides"
}

Response:

{
  "id": 123,
  "memberCode": "251201",
  "category": "Scouts and Guides",
  "checkInTime": "12:15:30 PM",
  "dateOfDay": "2025-11-01",
  "status": "Present",
  "amount": -1
}

Get Today's Attendance

GET /attendance/allAttendancePerToday

Get Present Count

GET /attendance/presentToday

Get Absent Count

GET /attendance/absentToday

Get Late Members Today

GET /attendance/lateToday

Get Category Attendance

GET /attendance/scouts-and-guides
GET /attendance/cubs-and-blossoms
GET /attendance/buds

💰 Tax Management

Get Daily Totals

GET /taxes/dailyTotal

Response:

[
  {
    "date": "01-11-2025",
    "totalAmount": 150.0,
    "day": "Friday"
  }
]

Get Monthly Totals

GET /taxes/monthlyTotal

Get Total Revenue

GET /taxes/totalRevenue

Update Tax Amount

POST /taxes/updateAmount
Content-Type: application/json

{
  "taxId": 15,
  "amount": 10
}

Get Category Taxes

GET /taxes/today/scoutsAndGuides
GET /taxes/today/cubsAndBlossoms
GET /taxes/today/buds

🎯 Activity Management

Add Activity

POST /activities/addActivity
Content-Type: application/json

{
  "name": "Annual Camp 2025",
  "date": "25-12-2025",
  "location": "Sinai Desert",
  "description": "Week-long camping trip",
  "status": "upcoming"
}

Get All Activities

GET /activities/allActivities

Delete Activity

DELETE /activities/delete/{id}

Mark as Completed

POST /activities/completed/{id}

Get Statistics

GET /activities/totalActivity
GET /activities/upComingActivity
GET /activities/completedActivity

📱 WhatsApp Integration

Send Message to Member

POST /whatsapp/send/{code}

Send to All Pending

POST /whatsapp/send-all

Get Pending Members

GET /whatsapp/pending

Get Pending Count

GET /whatsapp/pending/count

Reset Sent Status

PUT /whatsapp/reset/{code}

Get Total Sent

GET /whatsapp/totalMessageSent

⚠️ Error Handling

HTTP Status Codes

Code Meaning Usage
200 OK Successful request
204 No Content Successful but no data
400 Bad Request Invalid input
401 Unauthorized Authentication failed
404 Not Found Resource doesn't exist
500 Internal Server Error Server error

Common Error Responses

Member Not Found

{
  "error": "The Member doesn't exist."
}

Duplicate Attendance

{
  "error": "Member has already attended today for category: Scouts and Guides"
}

Duplicate Member Code

{
  "error": "The code already exists"
}

📸 UI & UX

register signIn dashboard Members Edit - Members Delete - Members Attend - Members profile Members - Members Attendance taxes Activities QR Attendance Whatsapp


🔄 Version History & Roadmap

Current Version (v1.0)

This README documents the stable release version currently available in the repository.

Upcoming Version (v2.0) - In Development

We're actively working on an improved backend with:

  • 🔧 Enhanced code architecture and organization
  • ⚡ Performance optimizations
  • 🛡️ Improved security features
  • 🐛 Bug fixes and stability improvements
  • 📊 Additional reporting capabilities
  • 📝 Improved JavaScript codebase

Note: The new version maintains backward compatibility with existing data and configurations. Migration guides will be provided upon release.


🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a 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

💬 Support

For issues, questions, or feature requests:


🙏 Acknowledgments

  • Built with ❤️ for Mar-Mina Scouts in Egypt

🌟 Star History

If this project helped you, please consider giving it a ⭐!


🎯 This project is open source and available for any scout organization to use and customize.

Made with ❤️ for Scout Organizations Worldwide

⬆ Back to Top

About

Full-stack Scout Management System with QR attendance tracking, automated WhatsApp messaging, financial management, and activity planning. Built with Spring Boot, JavaScript, and SQLite for complete offline operation.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published