Installation Guide

Prerequisites

Before you begin, ensure you have the following installed on your system:

Step 1: Clone the Repository

git clone 
cd FaceVault

Step 2: Install Dependencies

Install the project dependencies using npm:

npm install

Step 3: Environment Configuration

Create a .env file in the root directory. You can use the provided .env.example as a template.

cp .env.example .env

Open the .env file and configure your database connection and session secret:

# Database Configuration
# For local PostgreSQL
DATABASE_URL=postgresql://username:password@localhost:5432/database_name
DATABASE_TYPE=local

# Session Configuration
SESSION_SECRET=your-secure-random-secret

# Server Configuration
PORT=3000
Note on Rate Limiting: The server implements rate limiting to protect against abuse:
Important: Replace username, password, and database_name with your actual PostgreSQL credentials.

Step 4: Database Setup

Push the database schema to your PostgreSQL instance:

npm run db:push

Step 5: Download Face Recognition Models

Download the required models for face detection and recognition:

npm run download-models

Step 6: Running the Application

Development Mode

To run the application in development mode with hot-reloading:

npm run dev

The application will be available at http://localhost:5000 (or the port specified in the console).

Production Build

To build and start the application for production:

npm run build
npm start

Docker Deployment (Optional)

You can also use Docker Compose to run the application:

docker-compose up --build

This will start both the application and a PostgreSQL database container.