Skip to content

RISSCoding/Backend-SA

Repository files navigation

Smart Attendance - Backend

image (19)

Node.js Express.js MySQL Prisma

Welcome to the backend repository for Smart Attendance, a simple yet efficient attendance management system that leverages facial recognition technology for streamlined and secure attendance tracking.

View Smart Attendance

Table of Contents

Features

  • JWT Authentication: Secure access through JWT for all API routes.
  • Role-based Authorization: Middleware to enforce specific roles, e.g., admin-only access.
  • Facial Recognition Integration: Integrate with a facial recognition service for automated attendance tracking.
  • Leave Management: Automatically track remaining leave days per account, with carryover policy.

Installation

  1. Clone the repository:
    git clone https://github.com/username/smart-attendance-backend.git
  2. Install dependencies:
    cd smart-attendance-backend
    npm install
  3. Set up the database:
    • Ensure MySQL is running with the following credentials:
      • User: root
      • Password: (no password)
      • Host: localhost
      • Database: smart-att
    • Run the following Prisma commands:
      npx prisma db push

Environment Variables

Set up a .env file in the root directory with the following keys:

DATABASE_URL=mysql://root:@localhost:3306/smart-att

Usage

Start the development server:

npm run dev

Available Scripts

  • npm run dev: Start the server in development mode with nodemon
  • npm run build: Build the project for production
  • npm start: Start the server in production mode

Database Schema

The database is managed via Prisma ORM with key models:

  • Account: User details and roles.
  • Presence: Records attendance data.
  • LeaveRequest: Tracks leave requests and approvals.
  • Schedule: Manages user schedules and availability.

Contributing

We welcome contributions! Please check out the Contributing Guidelines for more information.

License

This project is licensed under the MIT License.

About

Backend service RISSCoding provides a secure and efficient API for managing portfolio project data using Node.js and Prisma ORM.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors