CustomPC.tech

🎯 CustomPC.tech - Quick Reference Guide

πŸ—‘οΈ Admin Chat Management

Delete Individual Chats

  1. Go to: admin-chats.html
  2. Hover over any chat in the sidebar
  3. Click the πŸ—‘οΈ Delete button that appears
  4. Confirm deletion
  5. Chat and all messages are permanently removed from Firebase

Features:


πŸ’³ Simple Payment System (NEW!)

User Side

  1. Go to: add-payment-method.html
  2. Enter card info (number, name, expiry, CVV, ZIP)
  3. Click β€œSave Payment Method”
  4. Card info stored in Firebase

Admin Side

  1. Go to: admin-payments.html
  2. Select user from list
  3. Enter charge amount and description
  4. Click β€œCharge User”
  5. Transaction recorded!

Features

Security


πŸ’³ Square Payment System (Advanced)

Quick Start (Local Testing)

cd backend
npm install
npm start

Then visit: http://localhost:3000/payments.html

Production Deployment

  1. Deploy backend to Heroku/Vercel/Railway
  2. Update config/square-config.js with your backend URL
  3. Test with a small payment ($1.00)
  4. Monitor in Square Dashboard

Your Credentials

Test Payment

  1. Login as admin
  2. Fill customer info
  3. Enter amount (e.g., $10.00)
  4. Enter card details
  5. Click β€œProcess Payment”
  6. Check Square Dashboard for transaction

πŸ’¬ Messaging System

User Side (messaging.html)

Admin Side (admin-chats.html)

Firebase Structure

chats/
  chat_username/
    info/
      username: "user123"
      email: "user@example.com"
      lastMessage: "Hello"
      lastMessageTime: 1234567890
      unreadCount: 2
    messages/
      msg1/
        text: "Hello"
        username: "user123"
        type: "user"
        timestamp: 1234567890
      msg2/
        text: "Hi there!"
        username: "Admin"
        type: "admin"
        timestamp: 1234567891

πŸ” Admin Access

Login as Admin

  1. Go to: login.html?admin=true
  2. Use admin credentials
  3. Access admin pages:
    • payments.html - Payment processing
    • admin-chats.html - Chat management
    • messaging.html - Admin chat interface

Admin Pages

User Pages


πŸš€ Deployment Checklist

Frontend (GitHub Pages)

Backend (Need to Deploy)

Firebase


πŸ“ Important Files

Configuration

Admin Pages

Backend

Documentation


πŸ†˜ Common Tasks

Start Backend Locally

cd backend
npm install
npm start

Test Square Connection

Visit: http://localhost:3000/api/test-square

View All Chats (Admin)

Visit: http://localhost:3000/admin-chats.html

Process Payment (Admin)

Visit: http://localhost:3000/payments.html

Delete a Chat (Admin)

  1. Go to admin-chats.html
  2. Hover over chat
  3. Click πŸ—‘οΈ Delete button

πŸ“Š Monitoring

Square Dashboard

Firebase Console

Your Admin Panel


πŸŽ‰ What’s Working

βœ… Chat System

βœ… Payment System

βœ… Admin System


🚧 Next Steps

  1. Deploy Backend
    • Choose: Heroku, Vercel, or Railway
    • Deploy backend/simple-payment-server.js
    • Update frontend config
  2. Test Payments
    • Process test payment
    • Verify in Square Dashboard
    • Test refund process
  3. Monitor & Maintain
    • Check Square Dashboard daily
    • Respond to chat messages
    • Process payments as needed

Everything is ready to go! Just deploy the backend and you’re live! πŸš€