spliceboti 4e17b6d5c3 Enhance DJ management with password reset and deactivation features
This commit introduces the ability to reset user passwords, both temporary and permanent, within the DJ management interface. It also adds soft deactivation and hard deletion options for users. The InvitationManagement component has been updated to improve clarity and user experience during the user creation process. Backend changes include password hashing using bcrypt, new API endpoints for status checks and password management, and modifications to storage functions to handle sanitized user data and password verification.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 3a22ac80-cd1d-4441-9e36-f24fc2f4c3de
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3478f7c3-db8c-4fca-9165-3adbdf1b5829/3a22ac80-cd1d-4441-9e36-f24fc2f4c3de/Yn4xAWn
2025-09-12 21:18:07 +00:00
2025-07-09 23:38:00 +00:00

DJ Management System

A comprehensive web-based DJ management and event scheduling system built with React, Express.js, and PostgreSQL.

Features

  • User Management: DJ profiles with social media links, bio, and contact information
  • Event Management: Create, schedule, and manage DJ events with multiple event types
  • Availability System: Calendar-based availability management for DJs
  • Admin Dashboard: Complete administrative controls for user and event management
  • Assignment Tool: Automated DJ assignment with rotation algorithms
  • WordPress Integration: API endpoints for displaying events on WordPress sites
  • Authentication: Secure authentication using Replit Auth (OpenID Connect)

Quick Start with Docker

Prerequisites

  • Docker and Docker Compose installed on your system

Environment Setup

  1. Create a .env file in the root directory:
# Database Configuration
DATABASE_URL=postgresql://postgres:postgres@db:5432/dj_management

# Authentication
SESSION_SECRET=your-super-secret-session-key-here-minimum-32-chars
REPLIT_DOMAINS=localhost,yourdomain.com
REPL_ID=your-repl-id
ISSUER_URL=https://replit.com/oidc

# Application
NODE_ENV=production
PORT=5000

Running with Docker Compose

# Build and start the application
docker-compose up --build

# Run in detached mode
docker-compose up -d --build

# Stop the application
docker-compose down

# View logs
docker-compose logs -f app

The application will be available at http://localhost:5000

Building Docker Image Manually

# Build the Docker image
docker build -t dj-management .

# Run the container
docker run -p 5000:5000 \
  -e DATABASE_URL="your-database-url" \
  -e SESSION_SECRET="your-session-secret" \
  -e REPLIT_DOMAINS="localhost" \
  dj-management

Development Setup

Prerequisites

  • Node.js 18+
  • PostgreSQL database
  • npm or yarn

Local Development

  1. Install dependencies:
npm install
  1. Set up environment variables:
cp .env.example .env
# Edit .env with your configuration
  1. Set up the database:
npm run db:push
  1. Start the development server:
npm run dev

API Endpoints

Authentication

  • GET /api/login - Initiate login flow
  • GET /api/logout - Logout user
  • GET /api/auth/user - Get current user

Events

  • GET /api/events - Get all events
  • POST /api/events - Create new event
  • GET /api/events/upcoming - Get upcoming events
  • GET /api/events/public - Public events (for WordPress integration)

Admin

  • GET /api/users - Get all users (admin only)
  • GET /api/stats/admin - Admin dashboard statistics
  • POST /api/invitations - Send DJ invitation

WordPress Integration

The system provides public API endpoints for WordPress integration:

// Fetch upcoming events for WordPress widget
fetch('https://your-domain.com/api/events/public')
  .then(response => response.json())
  .then(events => {
    // Display events in WordPress
  });

Production Deployment

Docker Deployment

  1. Update the docker-compose.yml with your production settings
  2. Set up proper SSL/TLS certificates
  3. Configure your reverse proxy (nginx/Apache)
  4. Set up proper backup for PostgreSQL data

Environment Variables

Required environment variables for production:

  • DATABASE_URL: PostgreSQL connection string
  • SESSION_SECRET: Secure session encryption key
  • REPLIT_DOMAINS: Comma-separated list of allowed domains
  • REPL_ID: Your Replit application ID
  • NODE_ENV: Set to "production"

Architecture

  • Frontend: React 18 with TypeScript, Vite, TailwindCSS
  • Backend: Express.js with TypeScript, Drizzle ORM
  • Database: PostgreSQL with session storage
  • Authentication: OpenID Connect (Replit Auth)
  • UI Components: Radix UI primitives with shadcn/ui

License

MIT License - see LICENSE file for details

S
Description
No description provided
Readme 225 KiB
Languages
TypeScript 96.6%
CSS 1.6%
Shell 1.2%
Dockerfile 0.4%
HTML 0.2%