Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.thesozocrm.com/llms.txt

Use this file to discover all available pages before exploring further.

Welcome to Elevate CRM Development!

Welcome to the team! This guide will get you from zero to productive in your first week.

Quick Start Checklist

  • Get Firebase project access
  • Clone repository
  • Install dependencies
  • Run local dev server
  • Make first test commit
  • Complete architecture walkthrough
  • Review coding standards
  • Complete first tutorial task
  • Pair program with senior dev
  • Submit first pull request

Day 1: Getting Started

Step 1: Access & Accounts (30 minutes)

Linear Workspace Access

1

Check Email

Check your email for Linear workspace invitation
2

Accept Invite

Click the invite link in your email
3

Verify Access

You should see the Engineering team and current sprint

Firebase Console Access

1

Check Email

Check your email for Firebase invitation
2

Accept Invite

Click the invite link in your email to access Firebase Console
3

Verify Projects

You should see 2 projects:
  • Production (READ ONLY for now)
  • Development (You’ll work here)

GitHub Access

1

Accept GitHub Invite

Accept GitHub repository invitation via email
2

Set up 2FA

Set up 2FA on your GitHub account (required)
3

Clone Repository

# Use the repo URL from your invitation email
git clone https://github.com/YOUR_ORG/YOUR_REPO.git
cd YOUR_REPO

Step 2: Development Environment Setup (1 hour)

IDE Setup (VS Code / Cursor)

Recommended: Use Cursor (AI-powered IDE) or VS Code with extensions
Required Extensions:
  • ESLint (code linting)
  • Prettier (code formatting)
  • React snippets
  • Firebase (Firebase tools)
  • GitLens (Git integration)
Recommended Settings (.vscode/settings.json):
{
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "eslint.validate": ["javascript", "javascriptreact"],
  "files.exclude": {
    "**/.git": true,
    "**/node_modules": true
  }
}

Required Software

Check Versions
# Check versions (minimum requirements)
node --version    # v18 or higher
npm --version     # v9 or higher
git --version     # v2.30 or higher

Install Dependencies

Install
cd elevate-crm-clean

# Install Node dependencies
npm install

# Install Firebase CLI globally
npm install -g firebase-tools

# Login to Firebase
firebase login

# Select development project
firebase use dev

Environment Configuration

Environment Setup
# Copy environment template
cp env.development.template .env.local

# Your .env.local should have:
REACT_APP_ENV=development
REACT_APP_FIREBASE_PROJECT_ID=elevate-crm-dev
# ... other vars (contact chandlerking@elevateyouenterprise.com for values)
Getting Environment Variables:
  • See env.development.template in the repo root for all available variables
  • Contact chandlerking@elevateyouenterprise.com for actual API keys and Firebase config values
  • For Firebase Secrets Manager setup, see docs/API_KEYS_SETUP.md in the repository

Step 3: Run the Application (30 minutes)

Start Development Server

# Terminal 1: Start React app
npm start

Verify Setup

1

Open Browser

2

Check Login Page

You should see the login page
3

Test Login

Try logging in with your test account
4

Explore Dashboard

Explore the dashboard
Success! If you can see the dashboard, your setup is complete!

Week 1: Learning the Codebase

Architecture Overview

Tech Stack

Frontend

  • React 18
  • Redux Toolkit
  • TanStack Query
  • Tailwind CSS

Backend

  • Firebase Auth
  • Cloud Firestore
  • Cloud Functions
  • Cloud Storage

Dev Tools

  • Linear (Issues & Sprints)
  • GitHub (Code & PRs)
  • Sentry (Error Monitoring)

Forms & Validation

  • React Hook Form
  • Zod validation

Project Structure

Directory Structure
elevate-crm-clean/
├── src/
│   ├── features/           # Feature-based organization
│   │   ├── deals/         # Deal management
│   │   ├── rep/           # Rep dashboard & profile
│   │   ├── admin/         # Admin features
│   │   ├── uploads/       # Document uploads
│   │   └── trainings/     # Training materials
│   ├── shared/            # Shared components & utilities
│   │   ├── components/    # Reusable UI components
│   │   ├── hooks/         # Custom React hooks
│   │   ├── services/      # API/business logic
│   │   ├── utils/         # Helper functions
│   │   └── schemas/       # Zod validation schemas
│   ├── core/              # Core app infrastructure
│   │   ├── auth/          # Authentication
│   │   ├── layout/        # App layout components
│   │   └── routing/       # Route configuration
│   └── firebase/          # Firebase configuration
├── functions/             # Firebase Cloud Functions
├── docs/                  # Documentation
└── tests/                # Test files

Key Concepts

1. Role-Based Access Control

Admin

Full access to everything

Manager

Team management + deal oversight

Rep

Own deals + team data
2. Data Flow
User action → Component

Component dispatches Redux action OR React Query mutation

Service layer handles Firebase calls

Update UI based on response
3. Commission Calculations
Commission Formula
Base Commission = Deal Amount × Rep Rate
Team Split = Base × 50% (if applicable)
Manager Override = Custom adjustments
Final Payout = Base + Bonuses - Deductions

Coding Standards

Using Cursor AI? Check out our comprehensive Cursor AI & Clean Code Guide for best practices on using AI coding assistants while maintaining code quality.

File Naming

  • Components: PascalCase.jsx (e.g., DealCard.jsx)
  • Utilities: camelCase.js (e.g., formatCurrency.js)
  • Constants: UPPER_SNAKE_CASE.js (e.g., API_ENDPOINTS.js)
  • Hooks: use*.js (e.g., useDeals.js)

Component Structure

Component Template
// 1. Imports
import React, { useState } from 'react';
import { useSelector } from 'react-redux';

// 2. Component
export default function DealCard({ deal, onUpdate }) {
  // Hooks
  const user = useSelector(state => state.auth.currentUser);
  const [loading, setLoading] = useState(false);
  
  // Event handlers
  const handleUpdate = async () => {
    setLoading(true);
    try {
      await onUpdate(deal.id);
    } catch (error) {
      console.error('Update failed:', error);
    } finally {
      setLoading(false);
    }
  };
  
  // Render
  return (
    <div className="deal-card">
      {/* JSX */}
    </div>
  );
}

Best Practices

  • Use React Hook Form for forms
  • Validate with Zod schemas
  • Handle loading states
  • Show user feedback (toasts/alerts)
  • Use explicit undefined checks: value !== undefined ? value : default
  • Add error boundaries
  • Write tests for business logic
  • Use var (use const/let)
  • Mutate state directly
  • Use .toLower() in Firebase rules (use .lower())
  • Access production data from dev
  • Push directly to main branch
  • Ship with console.log statements
  • Use falsy checks for numbers: value || default (use explicit checks)

Tutorial Tasks

Task 1: Fix a Simple Bug (1-2 hours)

Goal: Get familiar with the codebase and PR process
1

Find Issue in Linear

Find an open issue labeled good-first-issue in Linear
2

Assign to Yourself

Click “Assign to me” and move to “In Progress”
3

Create Branch

git checkout -b fix/ELE-123-bug-description
(Use Linear issue ID in branch name)
4

Fix Bug

Fix the bug and test locally
5

Commit with Linear ID

git commit -m "Fix: [description] (ELE-123)"
6

Push & Create PR

Push and create PR. Linear will auto-link the PR!
7

Update Linear

Move Linear issue to “In Review”

Task 2: Add a Feature Enhancement (2-3 hours)

Goal: Learn the feature development workflow Example Task: Add a “Copy to Clipboard” button for deal IDs
1

Create Feature Branch

Create a new branch for your feature
2

Add Button Component

Add the button component to the deal card
3

Implement Functionality

Implement copy to clipboard functionality
4

Add User Feedback

Add toast notification on success
5

Test Thoroughly

Test in different browsers and scenarios
6

Submit PR

Submit PR with screenshots

Task 3: Write Tests (2-3 hours)

Goal: Learn the testing approach
1

Pick a Function

Pick a utility function (e.g., formatCurrency)
2

Write Test Cases

Write tests for:
  • Happy path
  • Edge cases (0, negative, very large numbers)
  • Invalid input
3

Run Tests

npm test
4

Aim for 100% Coverage

Ensure all code paths are tested

Development Workflow

Daily Workflow

Daily Git Workflow
# 1. Start your day - get latest code
git checkout main
git pull origin main

# 2. Create feature branch
git checkout -b feature/my-awesome-feature

# 3. Make changes and test
npm start  # develop
npm test   # test changes

# 4. Commit frequently
git add .
git commit -m "feat: add awesome feature"

# 5. Push and create PR
git push origin feature/my-awesome-feature
# Then create PR on GitHub

# 6. After PR is merged
git checkout main
git pull origin main
git branch -d feature/my-awesome-feature

Branch Naming Convention

  • feature/ - New features
  • fix/ - Bug fixes
  • refactor/ - Code refactoring
  • docs/ - Documentation
  • test/ - Test additions

Commit Message Format

type: short description

- Bullet point details
- What changed
- Why it changed

Fixes #123
Types: feat, fix, refactor, docs, test, chore

Pull Request Process

1

Create PR

Create PR with clear title and description
2

Fill Template

Fill out PR template (auto-generated)
3

Request Review

Request review from senior dev
4

Address Feedback

Address feedback promptly
5

Merge

Merge after approval (squash and merge)

Tools & Resources

Development Tools

Team Members: You’ll receive access links to all tools on your first day:
  • Linear - Issue tracking and sprints
  • Firebase Console - Backend management
  • GitHub - Code repository
  • Sentry - Error monitoring

Communication

Documentation

  • API Docs: API Reference
  • Team Workflow: Workflow Guide
  • Cursor AI Guide: Cursor & Clean Code Guide
  • Testing Strategy: See SAFE_TESTING_STRATEGY.md in repo root
  • Security Guide: See SECURITY_IMPLEMENTATION_COMPLETE.md in repo root
  • Project Docs: Check /docs folder for feature-specific documentation

Common Tasks

Running Tests

npm test

Debugging

React DevTools

1

Install Extension

Install React DevTools browser extension
2

Open DevTools

Open browser DevTools
3

Use React Tabs

Use “Components” and “Profiler” tabs

Firebase Debugging

firebase emulators:start --only firestore

Common Issues

Fix: Make sure you’re using dev project
firebase use dev
Fix: Delete node_modules and reinstall
rm -rf node_modules && npm install
Fix: Clear cache and rebuild
npm run clean && npm install && npm start
Fix: Kill the process or use a different port
# Find and kill process
lsof -ti:3000 | xargs kill -9

# Or use different port
PORT=3001 npm start
Fix: Re-login to Firebase
firebase logout
firebase login
firebase use dev
Fix: Pull latest changes first
git pull origin dev --rebase
git push origin your-branch-name

Getting Help

Before Asking

  1. Check documentation (especially docs/ folder)
  2. Search existing GitHub issues
  3. Google the error message
  4. Try debugging for 15-20 minutes

When Asking

Be specific! Instead of:
“The deal page isn’t working”
Say:
“When I click ‘Save Deal’ on the Edit Deal page, I get a 403 error in the console. I’m logged in as a test rep account. Screenshot attached.”

Who to Ask

Bug Reports

Create Linear issue with bug label

Feature Requests

Create Linear issue with feature label

Urgent Issues

Email + Linear issue with urgent label

Your First Week Schedule

1

Monday

  • ✅ Complete setup
  • ✅ Run app locally
  • ✅ Explore codebase
2

Tuesday-Wednesday

  • ✅ Read architecture docs
  • ✅ Complete Tutorial Task 1
  • ✅ Pair program with senior dev
3

Thursday-Friday

  • ✅ Start first sprint task
  • ✅ Submit first PR
  • ✅ Team code review session

Success Metrics

Week 1 Goals

  • Local development environment working
  • First PR merged
  • Understand basic architecture
  • Know where to find help

Month 1 Goals

  • Completed 5+ PRs
  • Can work independently on small tasks
  • Understand commission calculations
  • Contributing to code reviews

Month 3 Goals

  • Leading feature development
  • Mentoring newer devs
  • Contributing to architecture decisions
  • Shipping high-quality code consistently

Welcome Aboard! 🎉

You’re joining a growing team building a product that helps solar reps succeed. Your contributions matter! Questions? Ask early and often. We’re here to help!

Quick Reference

Essential Commands

npm start
# Opens http://localhost:3000

Common File Locations

WhatWhere
Componentssrc/features/[feature]/components/
Servicessrc/shared/services/ or src/features/[feature]/services/
Hookssrc/features/[feature]/hooks/ or src/shared/hooks/
Firebase Configsrc/firebase/firebaseConfig.js
Firestore Rulesfirestore.rules
Firestore Indexesfirestore.indexes.json
Environment Variables.env.local
Documentationdocs/ folder

Keyboard Shortcuts

VS Code / Cursor:
  • Cmd/Ctrl + P - Quick file open
  • Cmd/Ctrl + Shift + P - Command palette
  • Cmd/Ctrl + B - Toggle sidebar
  • Cmd/Ctrl + \ - Split editor
  • Cmd/Ctrl + Shift + F - Search in files
  • F12 - Go to definition
  • Shift + F12 - Find all references
Browser DevTools:
  • Cmd/Ctrl + Shift + I - Open DevTools
  • Cmd/Ctrl + R - Hard refresh
  • Cmd/Ctrl + Shift + R - Clear cache and refresh

Firebase Console

Backend management

Linear Workspace

Issue tracking (check email for invite)

GitHub Repository

Code repository

Sentry

Error monitoring

Last Updated: November 12, 2025
Maintained By: Development Team
Need Updates? Submit a PR to this doc!