# Facial Attendance System

A Django-based facial recognition attendance system.

## Features
- User registration and authentication
- Facial recognition for attendance marking
- Event management (create, close events)
- Attendance reports

## Setup Instructions

1. **Clone the repository:**
   ```bash
   git clone <repo-url>
   cd facial_attendance_system-main
   ```

2. **Create and activate a virtual environment:**
   ```bash
   python -m venv venv
   source venv/bin/activate  # On Windows: venv\Scripts\activate
   ```

3. **Install dependencies:**
   ```bash
   pip install -r requirements.txt
   ```

4. **Apply migrations:**
   ```bash
   python manage.py migrate
   ```

5. **Run the development server:**
   ```bash
   python manage.py runserver
   ```

6. **(Optional) Expose locally using ngrok:**
   ```bash
   ngrok http 8000
   ```

## Usage
- Access the app at `http://localhost:8000/` or your ngrok URL.
- Register users and mark attendance using facial recognition.

## Project Structure
- `attendance/` - Django app for attendance logic
- `app/` - Static files, images, and utility scripts
- `media/` - Uploaded images
- `facial_attendance_django/` - Project settings

## Notes
- Make sure your webcam is connected for facial recognition.
- For production, set `DEBUG = False` and configure allowed hosts and static/media file serving.

---

*Feel free to update this README with more details as your project evolves.*

