Skip to content

kevalshah14/AttendanceSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Project Documentation

Overview

This is a Next.js project bootstrapped with create-next-app. It includes a dynamic geofence attendance system.

Getting Started

Prerequisites

Ensure you have the following installed:

  • Node.js
  • npm, yarn, pnpm, or bun

Installation

  1. Clone the repository:

    git clone https://github.com/kevalshah14/AttendanceSystem.git
    cd my-app
  2. Install dependencies:

    npm install
    # or
    yarn install
    # or
    pnpm install
    # or
    bun install

Running the Development Server

Start the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

Project Structure

my-app/
    .env
    .eslintrc.json
    .gitignore
    .next/
    app/
        api/
        attendance/
            [attendanceId]/
                page.tsx
        fonts/
        globals.css
        layout.tsx
        page.tsx
    components/
        dynamic-geofence-attendance-system.tsx
        ui/
            button.tsx
            input.tsx
            label.tsx
    lib/
        utils.ts
    prisma/
    README.md
    tailwind.config.ts
    tsconfig.json

Key Files and Directories

  • app/attendance/[attendanceId]/page.tsx: Implements the attendance page with geofence functionality.
  • components/dynamic-geofence-attendance-system.tsx: Contains the dynamic geofence attendance system component.
  • components/ui/: Contains reusable UI components like Button, Input, and Label.
  • lib/utils.ts: Utility functions used across the project.
  • .env: Environment variables for Prisma and other configurations.
  • tailwind.config.ts: Tailwind CSS configuration.
  • tsconfig.json: TypeScript configuration.

Environment Variables

Environment variables are defined in the .env file. Example:

DATABASE_URL="file:./dev.db"

API Endpoints

Geofence API

  • GET /api/geofence?attendanceId={attendanceId}: Fetch geofence data for a specific attendance ID.
  • POST /api/geofence: Set a new geofence location.

Attendance API

  • GET /api/attendance: Fetch all attendance records.
  • DELETE /api/attendance: Clear all attendance records.

Components

AttendancePage

Located in app/attendance/[attendanceId]/page.tsx.

DynamicGeofenceAttendanceSystemComponent

Located in components/dynamic-geofence-attendance-system.tsx.

UI Components

  • Button: components/ui/button.tsx
  • Input: components/ui/input.tsx
  • Label: components/ui/label.tsx

Utility Functions

Located in lib/utils.ts.

Learn More

To learn more about Next.js, take a look at the following resources:

Deployment

The easiest way to deploy your Next.js app is to use the Vercel Platform.

Check out the Next.js deployment documentation for more details.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published