https://github.com/bgmanu2426/ams-app
Attendance Management System using RFID reader and esp32 for mini project
https://github.com/bgmanu2426/ams-app
arduino attendance-management-system esp32 rfid-rc522
Last synced: 3 months ago
JSON representation
Attendance Management System using RFID reader and esp32 for mini project
- Host: GitHub
- URL: https://github.com/bgmanu2426/ams-app
- Owner: bgmanu2426
- Created: 2024-11-28T00:40:15.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-12-15T07:48:35.000Z (10 months ago)
- Last Synced: 2025-04-09T00:46:27.081Z (6 months ago)
- Topics: arduino, attendance-management-system, esp32, rfid-rc522
- Language: TypeScript
- Homepage: https://ams-app-eta.vercel.app
- Size: 500 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RFID Attendance Management System
## Problem Statement
The goal of this project is to develop an RFID-based attendance management system that automates the process of recording and managing attendance. The system uses RFID technology to identify users and store their attendance data in a MongoDB database. The attendance data is then displayed on a web-based user interface, allowing administrators to monitor and manage attendance records efficiently.
## Tech Stack
### Frontend
- **React**: A JavaScript library for building user interfaces.
- **Next.js**: A React framework for server-side rendering and generating static websites.
- **Tailwind CSS**: A utility-first CSS framework for styling.
- **shadcn/ui**: A component library for building modern web applications.### Backend
- **Node.js**: A JavaScript runtime built on Chrome's V8 JavaScript engine.
- **NextAuth.js**: Authentication for Next.js applications.
- **Mongoose**: An ODM (Object Data Modeling) library for MongoDB and Node.js.
- **MongoDB**: A NoSQL database for storing attendance data.### Hardware Components
- **ESP32 Microcontroller**: A low-cost, low-power system on a chip (SoC) with Wi-Fi and Bluetooth capabilities.
- **RFID RC522 Reader**: A low-cost RFID reader module for reading RFID tags.
- **OLED Display**: A small display module for showing messages and status updates.
- **MFRC522 Library**: A library for interfacing with the RFID RC522 reader.
- **SSD1306 Library**: A library for interfacing with the OLED display.
- **ArduinoJSON Library**: A library for parsing the data received by the backend to json format and extract the message.## Implementation
### Hardware Setup
1. **Connect the RFID RC522 Reader** to the ESP32 microcontroller.
2. **Connect the OLED Display** to the ESP32 microcontroller.
3. **Configure Wi-Fi** credentials in the `secrets.h` file.
4. **Upload the Arduino code** to the ESP32 microcontroller.### Arduino Code
The Arduino code reads the RFID tag, connects to Wi-Fi, and sends the tag data to the backend server. The server processes the data and stores it in the MongoDB database. The OLED display shows the status of the operation.### Backend
The backend is built using Next.js and handles the following:
- **User Authentication**: Using NextAuth.js for secure login and session management.
- **Database Operations**: Using Mongoose to interact with the MongoDB database.
- **API Endpoints**: For registering users, recording attendance, and fetching attendance data.### Frontend
The frontend is built using React, Next.js, and shadcn/ui, and provides the following features:
- **Login Page**: For user authentication.
- **Home Page**: Displays the attendance table with real-time updates.
- **Register User Page**: For administrators to register new users.## Result
The RFID Attendance Management System successfully automates the process of recording and managing attendance. The system provides real-time updates and displays attendance data on a web-based user interface. The OLED display on the hardware shows the status of the operation, providing immediate feedback to the user.
## Conclusion
The RFID Attendance Management System is an efficient and reliable solution for managing attendance. The system leverages RFID technology and modern web development frameworks to provide a seamless user experience. The use of ESP32 microcontroller and OLED display enhances the functionality and usability of the system.
## Deployment
The project is deployed on Vercel, a cloud platform for static sites and serverless functions. The deployment process involves pushing the code to a GitHub repository and connecting the repository to Vercel.
### Live Website
Check out the live website: [Attendance Managment System](https://ams-rfid.vercel.app) 🌐### Endpoints
- **POST /api/register**: Register a new user.
- **GET /api/attendance**: Fetch attendance data.
- **GET /api/register-rfid**: Register attendance using RFID.### Postman Collection
You can find the Postman collection for testing the API endpoints [here](https://www.postman.com/solar-moon-851836/workspace/my-workspace/collection/24239785-050688b2-3584-44a1-91ef-97ac4b594c65?action=share&creator=24239785) 📬## How to Run the Project
### Prerequisites
- Node.js
- MongoDB
- ESP32 Microcontroller
- RFID RC522 Reader
- OLED Display### Steps
1. **Clone the repository**:
```bash
git clone https://github.com/your-repo/rfid-attendance-system.git
cd rfid-attendance-system
```2. **Install dependencies**:
```bash
npm install
```3. **Set up environment variables**:
Create a.env
file based on the
.env.sample
file and fill in the required values.
4. **Run the development server**:
```bash
npm run dev
```5. **Upload the Arduino code** in `/public/rfid_attendance.ino` and required header files to the ESP32 microcontroller.
6. **Access the application**:
Open [http://localhost:3000](http://localhost:3000) in your browser to see the result.## Future Enhancements
- **Add more authentication methods**: Implement OAuth or other authentication methods.
- **Improve UI/UX**: Enhance the user interface for better usability.
- **Add more features**: Implement additional features like reporting and analytics.## References
- [Next.js Documentation](https://nextjs.org/docs)
- [NextAuth.js Documentation](https://next-auth.js.org/getting-started/introduction)
- [Mongoose Documentation](https://mongoosejs.com/docs/guide.html)
- [ESP32 Documentation](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/)
- [RFID RC522 Documentation](https://www.nxp.com/docs/en/data-sheet/MFRC522.pdf)
- [OLED Display Documentation](https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf)---