Skip to content
Merged

cp3 #18

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# N-Market Inventory System Configuration
# IMPORTANT: Copy this file to .env and update the values for your environment

# Application Settings
DEBUG=1
ENVIRONMENT=development
LOG_LEVEL=DEBUG
ALLOWED_ORIGINS=http://localhost:3000,http://localhost:8000,http://127.0.0.1:3000,http://127.0.0.1:8000

# Database Configuration (SQLite for development - no setup required)
DATABASE_URL=sqlite:///./app.db
POSTGRES_USER=postgres
POSTGRES_PASSWORD=your_secure_password_here
POSTGRES_DB=inventory_db
DB_PORT=5432

# Redis Configuration (optional for development)
REDIS_PASSWORD=your_redis_password_here
REDIS_PORT=6379
REDIS_HOST=localhost

# Security (CHANGE THESE VALUES!)
JWT_SECRET_KEY=development_jwt_secret_key_change_in_production_at_least_32_characters
JWT_ALGORITHM=HS256
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=30

# SMTP Configuration (Update with your email service)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=your_email@gmail.com
SMTP_PASSWORD=your_app_password
SMTP_FROM_EMAIL=noreply@yourdomain.com

# Admin User (will be created on first run)
ADMIN_USERNAME=admin
ADMIN_PASSWORD=admin123
ADMIN_EMAIL=admin@example.com

# Database Roles (for PostgreSQL deployment)
APP_READ_PASSWORD=readuser_secure_password
APP_WRITE_PASSWORD=writeuser_secure_password

# Web Server
NGINX_PORT=80
NGINX_SSL_PORT=443

# PGAdmin (development only)
PGADMIN_EMAIL=admin@example.com
PGADMIN_PASSWORD=pgadmin_password
PGADMIN_PORT=5050

# Shop/Company Information
SHOP_NAME="N-Market"
SHOP_DESCRIPTION="Your One-Stop Inventory Solution"
SHOP_EMAIL="your_email@example.com"
SHOP_PHONE="+1-555-0123"
SHOP_ADDRESS="123 Business Street, City, State 12345"
SHOP_WEBSITE="https://n-market.ir"
COMPANY_LOGO_URL="/static/images/logos/n-market-logo.png"
COMPANY_LOGO_SQUARE_URL="/static/images/logos/n-market-logo.png"
COMPANY_LOGO_WIDE_URL="/static/images/logos/n-market-logo.png"
COMPANY_FAVICON_URL="/static/images/logos/icon3.ico"
49 changes: 44 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,12 @@ POST /receipts/{order_id}/generate # Generate PDF receipt
1. **Configure environment**

```bash
# Copy example environment file
cp .env.example .env

# Edit .env with your N-Market configuration
# For development, the defaults in .env.example work fine
# Update JWT_SECRET_KEY and email settings for full functionality
```

1. **Start services**
Expand Down Expand Up @@ -263,11 +267,14 @@ POST /receipts/{order_id}/generate # Generate PDF receipt
3. **Configure environment variables**

```bash
export DATABASE_URL="postgresql://user:pass@localhost/n_market_db"
export SECRET_KEY="your-secret-key"
export REDIS_URL="redis://localhost:6379"
export SHOP_NAME="N-Market"
export SHOP_EMAIL="modavari005@gmail.com"
# Copy example environment file
cp .env.example .env

# Edit .env file with your configuration
# At minimum, update these values:
# - JWT_SECRET_KEY (generate a secure key)
# - SMTP_USERNAME and SMTP_PASSWORD (for email features)
# - SHOP_EMAIL (your business email)
```

4. **Run migrations**
Expand All @@ -287,6 +294,37 @@ POST /receipts/{order_id}/generate # Generate PDF receipt
# Visit http://localhost:8000/logo-showcase to see branding implementations
```

### 🤝 **Team Development Setup**

**For team members cloning the repository:**

1. **Quick setup** (recommended):

```bash
# Copy environment template
cp .env.example .env

# Run setup (installs dependencies, pre-commit, runs migrations)
make setup-dev
```

2. **Manual setup**:

```bash
# 1. Copy environment template
cp .env.example .env

# 2. Edit .env file with your settings
# 3. Follow steps 1-5 above
```

**🔒 Important Notes:**

- Never commit the `.env` file (contains secrets)
- Always use `.env.example` as template
- The `.env.example` has safe defaults for development
- SQLite is used by default (no database setup required)

## ✨ **Logo Showcase**

N-Market includes a comprehensive logo implementation showcase demonstrating professional branding across different contexts:
Expand Down Expand Up @@ -479,6 +517,7 @@ az containerapp create \
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

---

📧 **Contact:** [modavari005@gmail.com](mailto:modavari005@gmail.com)
🌐 **Website:** [https://n-market.ir](https://n-market.ir)
📱 **Logo Showcase:** [http://localhost:8000/logo-showcase](http://localhost:8000/logo-showcase)
Empty file removed static/logo-test-dashboard.html
Empty file.
Empty file removed static/logo-test.html
Empty file.
Empty file removed static/test-logos.html
Empty file.