# Elfit Arabia B2B Procurement Portal

A robust B2B e-commerce and procurement platform built with Node.js, Express, and SQLite.

## Features
- Product Catalog with Attribute Management
- Admin Dashboard for Order and Inquiry Tracking
- Email Notifications for New Inquiries
- Client and Item Performance Metrics

## Local Setup

1. **Clone the repository**:
   ```bash
   git clone <your-repo-url>
   cd B2B-js
   ```

2. **Install dependencies**:
   ```bash
   npm install
   ```

3. **Configure Environment Variables**:
   Copy the `.env.example` to a new file named `.env` and fill in your details:
   ```bash
   cp .env.example .env
   ```

4. **Initialize Database** (if applicable):
   If you have seed scripts, run them now.
   ```bash
   node seed_from_old_db.js
   ```

5. **Run the application**:
   - For development: `npm run dev`
   - For production: `npm start`

## Deployment

### Recommended Platforms
- **Render**: Great for simple Node.js apps with good SQLite support via persistent disks.
- **Railway**: Very easy to set up and deploy.
- **Heroku**: Traditional choice, though requires paid tier for persistent storage.

### Steps for Deployment
1. Connect your GitHub repository to the chosen platform.
2. Set up the Environment Variables from your `.env` file in the platform's settings.
3. Ensure the start command is set to `npm start`.
