This is a Next.js project bootstrapped with create-next-app
. It includes a dynamic geofence attendance system.
Ensure you have the following installed:
- Node.js
- npm, yarn, pnpm, or bun
-
Clone the repository:
git clone https://github.com/kevalshah14/AttendanceSystem.git cd my-app
-
Install dependencies:
npm install # or yarn install # or pnpm install # or bun install
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.
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
- 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 likeButton
,Input
, andLabel
.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 are defined in the .env file. Example:
DATABASE_URL="file:./dev.db"
- GET
/api/geofence?attendanceId={attendanceId}
: Fetch geofence data for a specific attendance ID. - POST
/api/geofence
: Set a new geofence location.
- GET
/api/attendance
: Fetch all attendance records. - DELETE
/api/attendance
: Clear all attendance records.
Located in app/attendance/[attendanceId]/page.tsx.
Located in components/dynamic-geofence-attendance-system.tsx
.
Button
: components/ui/button.tsxInput
: components/ui/input.tsxLabel
: components/ui/label.tsx
Located in lib/utils.ts
.
To learn more about Next.js, take a look at the following resources:
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.
This project is licensed under the MIT License. See the LICENSE file for details.