https://github.com/omarsalemdmet/go-school-stdb
Web-based attendance and grading management system built in Golang using the Echo framework
https://github.com/omarsalemdmet/go-school-stdb
full-stack golang htmx server-side-rendering sqlite
Last synced: about 2 months ago
JSON representation
Web-based attendance and grading management system built in Golang using the Echo framework
- Host: GitHub
- URL: https://github.com/omarsalemdmet/go-school-stdb
- Owner: OmarSalemDMET
- License: mit
- Created: 2024-09-04T06:40:08.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-02-26T05:00:20.000Z (3 months ago)
- Last Synced: 2025-02-26T05:27:39.613Z (3 months ago)
- Topics: full-stack, golang, htmx, server-side-rendering, sqlite
- Language: HTML
- Homepage:
- Size: 192 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Attendance & Grading Management System
This project is a web-based attendance and grading management system built in Golang using the Echo framework. It provides functionality for creating student accounts, tracking attendance (including via QR code scanning), and managing student grades. The system uses SQLite for persistent data storage, HTML templates for the user interface, and several JavaScript libraries to enhance interactivity.
## Table of Contents
- [Overview](#overview)
- [Features](#features)
- [Technologies](#technologies)
- [File Structure](#file-structure)
- [Installation](#installation)
- [Usage](#usage)
- [Endpoints](#endpoints)
- [Contributing](#contributing)
- [License](#license)
- [Acknowledgements](#acknowledgements)## Overview
The **Attendance & Grading Management System** allows administrators to:
- **Create Student Accounts:** Generate accounts with unique IDs, stage, and day information.
- **Track Attendance:** Mark student attendance manually and via QR code scanning.
- **Manage Grades:** Record student grades and generate grade logs.
- **Export Data:** Generate downloadable CSV files for both student accounts and grade data.The application is designed to support educational environments where tracking student participation and performance is crucial.
## Features
- **Student Account Management:** Create and manage student records.
- **Attendance Tracking:**
- Manual attendance marking.
- QR code scanning integration for quick attendance recording.
- **Grading Module:** Input and record student grades.
- **CSV Exports:** Automatically generate CSV files for accounts (`data.csv`) and grade logs (`grades.csv`).
- **User Authentication:** Secure login using bcrypt for password hashing.## Technologies
- **Backend:** Golang, Echo framework
- **Database:** SQLite
- **Frontend:** HTML, CSS, JavaScript (htmx, jQuery, HTML5 QR Code)
- **Libraries:**
- `github.com/gocarina/gocsv`
- `github.com/google/uuid`
- `github.com/labstack/echo/v4`
- `github.com/mattn/go-sqlite3`
- `golang.org/x/crypto/bcrypt`## File Structure
```
Attendance-Grading-System/
├── main.go # Main server application and route definitions.
├── javascript/ # JavaScript libraries and custom scripts.
│ ├── htmx.js
│ ├── jquery.js
│ └── qr.js
├── html/ # HTML templates for UI rendering.
│ ├── login.html # Template for login, account creation, attendance, grading, etc.
│ └── qrCode.html # Template for QR code scanning interface.
├── css/ # CSS files for styling.
│ └── style.css
└── [Data Files] # CSV files generated by the application (e.g., data.csv, grades.csv).
```## Installation
1. **Clone the Repository:**
```bash
git clone https://github.com/yourusername/Attendance-Grading-System.git
cd Attendance-Grading-System
```2. **Install Dependencies:**
Ensure that you have Go installed (Go 1.XX+ is recommended). Then, initialize your module and install required packages:
```bash
go mod tidy
```3. **Build and Run the Application:**
```bash
go run main.go
```The server will start on port `8080`.
## Usage
- **Access the Web Application:**
Open your browser and navigate to `http://localhost:8080`.
- **User Interface:**
- **Login Page:** Access via `/loginPage` to log in with a username and password.
- **Account Creation:** Use the account creation panel to generate new student accounts.
- **Attendance:**
- Manually mark attendance via provided forms.
- Use the QR code scanning page (accessed via `/qrAttend`) to scan student IDs.
- **Grading:**
- Input student grades via the grading panel.
- Download grade logs in CSV format.## Endpoints
| Endpoint | Method | Description |
|-------------------------|--------|-------------|
| `/attend` | POST | Receives attendance data via the wrapper handler. |
| `/createAccounts` | POST | Creates student accounts and generates a CSV file of the accounts. |
| `/addAttendance` | POST | Records attendance data; inserts records for present and absent students. |
| `/login` | POST | Authenticates users using a username and password. |
| `/getStudentData` | POST | Retrieves attendance records for a specific student. |
| `/gradingTable` | POST | Retrieves student data for grading based on stage and day. |
| `/gradeStudents` | POST | Records student grades and marks. |
| `/getGrades` | POST | Retrieves grade data for a specific student. |
| `/creatGradeLog` | POST | Generates a CSV file for grade logs. |
| `/attendance` | GET | Renders the QR code attendance page. |
| `/loginPage` | GET | Renders the login page. |
| `/accounts` | GET | Renders the account creation panel. |
| `/` | GET | Renders the default data retrieval page. |
| `/getCsv` | GET | Downloads the student accounts CSV file. |
| `/getGradesCsv` | GET | Downloads the grade logs CSV file. |
| `/qrAttend` | GET | Renders the QR attendance page. |
| `/gradePanal` | GET | Renders the grading management panel. |
| `/StudentsMarks` | GET | Renders the student grading page. |
| `/gradesCsvs` | GET | Renders an alternative grade CSV download page. |## Contributing
Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes. For major changes, open an issue first to discuss your proposed modifications.
## Acknowledgements
- **Echo Framework:** For the robust web framework.
- **SQLite:** For the lightweight database solution.
- **gocsv & Google UUID:** For CSV handling and unique ID generation.
- **bcrypt:** For secure password handling.
- **JavaScript Libraries:** htmx, jQuery, and HTML5 QR Code for enhanced frontend functionality.
- Thanks to all the developers and maintainers of the libraries and tools used in this project.