Skip to content
Open
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
119 changes: 119 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# =============================================================================
# DEASI - Environment Configuration Template
# =============================================================================
# SECURITY WARNING: This is a TEMPLATE file. DO NOT commit actual credentials.
# Copy this to .env and fill in your actual values.
# Add .env to .gitignore to prevent accidental commits.
# =============================================================================

# Node Environment
NODE_ENV=production

# Database Configuration
DB_URI=mongodb+srv://username:password@cluster.mongodb.net/deasi?retryWrites=true&w=majority
DB_NAME=deasi
DB_POOL_SIZE=10

# JWT Configuration
JWT_SECRET=your_super_secret_jwt_key_minimum_32_characters_long_here
JWT_EXPIRY=1h
REFRESH_TOKEN_SECRET=your_super_secret_refresh_token_key_minimum_32_characters_long_here
REFRESH_TOKEN_EXPIRY=7d

# Encryption Configuration
ENCRYPTION_KEY=your_32_character_encryption_key_for_aes_256_gcm_encryption_here

# API Configuration
API_PORT=3000
API_HOST=0.0.0.0
API_VERSION=v1
API_KEY=your_secure_api_key_here

# CORS Configuration
ALLOWED_ORIGINS=https://yourdomain.com,https://app.yourdomain.com,http://localhost:3000

# Rate Limiting
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100
LOGIN_ATTEMPT_MAX=5
LOGIN_LOCKOUT_TIME_MS=900000

# Security
BCRYPT_ROUNDS=12
SESSION_SECRET=your_session_secret_key_here
SECURE_COOKIE=true
SAME_SITE=strict

# Logging Configuration
LOG_LEVEL=info
LOG_FORMAT=json
LOG_FILE_PATH=logs/
LOG_MAX_SIZE=10m
LOG_MAX_FILES=14d

# Email Configuration (for password reset, notifications)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASS=your_app_specific_password_here
SMTP_FROM=noreply@deasi.com

# Monitoring & Observability
SENTRY_DSN=your_sentry_dsn_url_here_optional
MONITORING_ENABLED=true

# External Services
BOT_API_KEY=your_bot_api_key_here
BOT_API_ENDPOINT=https://api.bot-service.com

# SSL/TLS Configuration
SSL_CERT_PATH=/etc/ssl/certs/your-cert.crt
SSL_KEY_PATH=/etc/ssl/private/your-key.key

# Session Management
SESSION_TIMEOUT_MS=3600000
SESSION_COOKIE_NAME=deasi_session

# Feature Flags
FEATURE_MFA_ENABLED=true
FEATURE_AUDIT_LOGGING=true
FEATURE_IP_WHITELIST=false

# Backup Configuration
BACKUP_ENABLED=true
BACKUP_SCHEDULE=0 2 * * *
BACKUP_RETENTION_DAYS=30

# Development (Only for local development, never in production)
DEBUG_MODE=false
DEV_SKIP_AUTH=false

# =============================================================================
# INSTRUCTIONS FOR SETTING UP .env
# =============================================================================
#
# 1. Copy this file: cp .env.example .env
#
# 2. Generate secure secrets:
# - Node: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
# - Or use: openssl rand -hex 32
#
# 3. Fill in all values with your actual configuration
#
# 4. Ensure .env is in .gitignore
#
# 5. Never commit the .env file to version control
#
# 6. Use secure methods to share credentials (e.g., 1Password, LastPass, Vault)
#
# 7. Rotate secrets regularly (at least quarterly)
#
# 8. Use different secrets for dev/staging/production
#
# 9. For production, use environment variables from your deployment platform:
# - AWS Secrets Manager
# - Azure Key Vault
# - HashiCorp Vault
# - Google Cloud Secret Manager
#
# =============================================================================
42 changes: 42 additions & 0 deletions .github/workflows/deno.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow will install Deno then run `deno lint` and `deno test`.
# For more information see: https://github.com/denoland/setup-deno

name: Deno

on:
push:
branches: ["Richie121"]
pull_request:
branches: ["Richy121"]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Setup repo
uses: actions/checkout@v4

- name: Setup Deno
# uses: denoland/setup-deno@v1
uses: denoland/setup-deno@61fe2df320078202e33d7d5ad347e7dcfa0e8f31 # v1.1.2
with:
deno-version: v1.x

# Uncomment this step to verify the use of 'deno fmt' on each commit.
# - name: Verify formatting
# run: deno fmt --check

- name: Run linter
run: deno lint

- name: Run tests
run: deno test -A
Loading