Skip to main content
Back to Elite Events

Elite Events Documentation

Technical documentation, guides, and API references for the Elite Events platform.

Getting Started/Quickstart Guide

πŸš€ Elite Events - Developer Quick Start

Get up and running in 5 minutes with Elite Events development environment.


Prerequisites

Before you begin, ensure you have:

  • Node.js 18.0 or higher (Download)
  • npm or yarn package manager
  • MySQL 8.0+ database (local or cloud)
  • Git for version control
  • Code editor (VS Code recommended)

1. Clone & Install (2 minutes)

# Clone the repository
git clone <repository-url>
cd elite_events_nextjs

# Install dependencies
npm install

2. Environment Setup (1 minute)

Create .env file in the project root:

# Database
DATABASE_URL="mysql://user:password@host:3306/database_name"

# NextAuth
NEXTAUTH_SECRET="your-secret-key-here"  # Generate with: openssl rand -base64 32
NEXTAUTH_URL="http://localhost:3000"

# Stripe (Optional for development)
NEXT_PUBLIC_STRIPE_PUBLIC_KEY="pk_test_..."
STRIPE_SECRET_KEY="sk_test_..."

Quick Database URL Format:

mysql://USERNAME:PASSWORD@HOST:PORT/DATABASE_NAME

3. Database Setup (1 minute)

# Push schema to database
npx prisma db push

# Seed with demo data (90 products, 2 users, 67 categories)
npx prisma db seed

Demo Credentials Created:

  • Admin: admin@dcsuniverse.com / admin123
  • Customer: demo@dcsuniverse.com / demo123

4. Start Development Server (30 seconds)

npm run dev

Open http://localhost:3000 πŸŽ‰


5. Verify Setup (30 seconds)

βœ… Check Homepage

  • Navigate to http://localhost:3000
  • Should see Elite Events homepage

βœ… Test Login

  1. Click "Sign In" in header
  2. Login with: demo@dcsuniverse.com / demo123
  3. Header should show your username

βœ… Test Admin (Optional)

  1. Logout
  2. Login with: admin@dcsuniverse.com / admin123
  3. See "Admin" menu in navigation
  4. Click Admin β†’ Products

🎯 Common Tasks

Run Tests

npm test                  # Run all tests
npm run test:watch        # Watch mode
npm run test:coverage     # Coverage report

Database Operations

npx prisma studio         # Open database GUI
npx prisma migrate dev    # Create migration
npx prisma db seed        # Re-seed database

Linting & Type Checking

npm run lint              # ESLint
npm run type-check        # TypeScript
npm run build             # Production build

Open Database GUI

npx prisma studio

Opens at http://localhost:5555


πŸ“ Project Structure

elite_events_nextjs/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                 # Next.js App Router pages
β”‚   β”‚   β”œβ”€β”€ api/            # API routes
β”‚   β”‚   β”œβ”€β”€ (auth)/         # Auth pages (signin, signup)
β”‚   β”‚   β”œβ”€β”€ shop/           # Shop pages
β”‚   β”‚   └── admin/          # Admin pages
β”‚   β”œβ”€β”€ components/         # React components
β”‚   β”‚   β”œβ”€β”€ layout/         # Layout components (Header, Footer)
β”‚   β”‚   └── features/       # Feature components (Shop, Cart, Admin)
β”‚   β”œβ”€β”€ redux/              # Redux state management
β”‚   β”‚   └── features/       # Redux slices
β”‚   β”œβ”€β”€ lib/                # Utilities & helpers
β”‚   └── types/              # TypeScript types
β”œβ”€β”€ prisma/
β”‚   β”œβ”€β”€ schema.prisma       # Database schema
β”‚   └── seed.ts             # Seed data script
β”œβ”€β”€ public/                 # Static assets
β”‚   └── images/             # Product images
└── docs/                   # Documentation

πŸ”§ Development Workflow

1. Create a New Feature

# Create feature branch
git checkout -b feature/my-feature

# Make changes
# ... code code code ...

# Run tests
npm test

# Commit
git add .
git commit -m "Add: my feature"

2. Before Pushing

# Lint and type-check
npm run lint
npm run type-check

# Run tests
npm test

# Build to verify
npm run build

3. Common Development Commands

# Development server with hot reload
npm run dev

# Database GUI
npx prisma studio

# Reset database (⚠️ deletes all data)
npx prisma migrate reset --force

# View logs
# Check terminal running `npm run dev`

πŸ—„οΈ Database Schema Overview

Core Tables

  • User - Authentication & profiles
  • Product - Product catalog (90 items)
  • Category - Hierarchical categories (67)
  • Order - Order tracking
  • Cart - Shopping cart items
  • Wishlist - Saved products
  • Address - Shipping/billing addresses

Advanced Tables

  • ProductImage - Product images
  • Review - Product reviews
  • Inventory - Stock tracking
  • StockMovement - Inventory audit
  • Notification - User notifications

View Schema: prisma/schema.prisma


πŸ” Demo Accounts

Admin Account

Email:    admin@dcsuniverse.com
Password: admin123
Access:   Full admin panel (/admin/*)

Customer Account

Email:    demo@dcsuniverse.com
Password: demo123
Access:   Customer features (cart, wishlist, orders)

⚠️ Change these in production!


πŸ› Troubleshooting

Port 3000 Already in Use

# Find and kill process
# Windows
netstat -ano | findstr :3000
taskkill /PID <PID> /F

# Mac/Linux
lsof -ti:3000 | xargs kill

Database Connection Error

  1. Verify DATABASE_URL in .env
  2. Check MySQL is running
  3. Verify credentials are correct
  4. Test connection with npx prisma db push

Module Not Found Errors

# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm install

Prisma Client Out of Sync

npx prisma generate

Environment Variables Not Loading

  1. Restart dev server (Ctrl+C then npm run dev)
  2. Verify .env file exists in root
  3. Check variable names match exactly

πŸ“š Next Steps

For Development

For Admin

For Project Understanding

  • πŸ“Š Review Project Status - Current status
  • πŸ—ΊοΈ See Plans Roadmap - Development roadmap

πŸ†˜ Need Help?

Documentation

  • Full docs in /docs directory
  • API reference: docs/API_REFERENCE.md
  • Troubleshooting: docs/TROUBLESHOOTING.md

Useful Commands

# View all npm scripts
npm run

# Prisma help
npx prisma --help

# Next.js help
npx next --help

βœ… Setup Verification Checklist

  • Node.js 18+ installed
  • MySQL database running
  • .env file configured
  • Dependencies installed (npm install)
  • Database schema pushed (npx prisma db push)
  • Database seeded (npx prisma db seed)
  • Dev server running (npm run dev)
  • Can access homepage (http://localhost:3000)
  • Can login with demo account
  • Tests passing (npm test)

πŸŽ‰ You're Ready!

Start building! Key files to explore:

  1. src/app/page.tsx - Homepage
  2. src/app/api/ - API routes
  3. src/components/ - React components
  4. prisma/schema.prisma - Database schema
  5. docs/guides/DEVELOPMENT.md - Detailed development guide

Happy coding! πŸš€


Quick Links:

Documentation | Elite Events | Philip Rehberger