4e17b6d5c3b7e6278db00479875a6a38a9c2f07a
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
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
- Create a
.envfile 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
- Install dependencies:
npm install
- Set up environment variables:
cp .env.example .env
# Edit .env with your configuration
- Set up the database:
npm run db:push
- Start the development server:
npm run dev
API Endpoints
Authentication
GET /api/login- Initiate login flowGET /api/logout- Logout userGET /api/auth/user- Get current user
Events
GET /api/events- Get all eventsPOST /api/events- Create new eventGET /api/events/upcoming- Get upcoming eventsGET /api/events/public- Public events (for WordPress integration)
Admin
GET /api/users- Get all users (admin only)GET /api/stats/admin- Admin dashboard statisticsPOST /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
- Update the
docker-compose.ymlwith your production settings - Set up proper SSL/TLS certificates
- Configure your reverse proxy (nginx/Apache)
- Set up proper backup for PostgreSQL data
Environment Variables
Required environment variables for production:
DATABASE_URL: PostgreSQL connection stringSESSION_SECRET: Secure session encryption keyREPLIT_DOMAINS: Comma-separated list of allowed domainsREPL_ID: Your Replit application IDNODE_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
Description
Languages
TypeScript
96.6%
CSS
1.6%
Shell
1.2%
Dockerfile
0.4%
HTML
0.2%