Ready to join the ThinkRED development adventure? Let's get your environment sparkling! ✨
This guide will help you set up the ThinkRED Technologies monorepo for local development. We've made it as smooth as possible - because great developers deserve great tools! 🛠️
Before diving into the ThinkRED universe, make sure you have these essentials:
- Node.js (version 18.0.0 or higher) - LTS recommended 🟢
- npm (version 8.0.0 or higher) - for package management 📦
- Git (for version control) 🔄
- Code Editor (VS Code recommended with extensions) 💻
Pro Tip: Need help installing these? Check our troubleshooting guide! 💡
Get the ThinkRED magic on your machine!
git clone https://github.com/thinkredtech/thinkredtech.github.io.git
cd thinkredtech.github.ioOne command to rule them all - that's the ThinkRED way! 🎪
# Single command installs ALL workspace dependencies
npm installThis automatically does the heavy lifting:
-
✅ Installs root dependencies and tooling
-
✅ Installs frontend dependencies (React, Vite, etc.)
-
✅ Installs backend dependencies (CLASP, Apps Script tools)
-
✅ Sets up workspace linking between packages
-
✅ Copies documentation to frontend public directory
-
✅ Validates environment setup
Magic happening behind the scenes? That's our monorepo superpowers at work! ⚡
Let's personalize your development experience!
Copy the environment example file:
cp .env.example .envEdit the .env file with your configuration:
# Google Apps Script Configuration
GOOGLE_APPS_SCRIPT_ID=your-script-id
GOOGLE_APPS_SCRIPT_DEPLOYMENT_ID=your-deployment-id
GOOGLE_APPS_SCRIPT_BASE_URL=https://script.google.com/macros/s
# Frontend Configuration
NODE_ENV=development
FRONTEND_BASE_URL=http://localhost:3000
# Development Settings
ENABLE_DEV_LOGGING=true
ENABLE_API_DEBUG=trueTime to see the magic come alive! 🎭
npm run devThe website will be available at http://localhost:3000 - your new development playground! 🎮
Congratulations! You're now part of the ThinkRED development family! 🎉
This project uses npm workspaces for automatic dependency management across all packages:
# At the root - installs ALL workspace dependencies automatically
npm installThis single command:
- Installs root dependencies and development tools
- Installs frontend workspace dependencies
- Installs backend workspace dependencies
- Creates proper workspace links
- Automatically copies documentation for development
- Maintains dependency version consistency
{
"workspaces": [
"frontend",
"backend"
]
}| Command | Description |
|---|---|
npm install |
Install all workspace dependencies (recommended) |
npm run task install |
Task runner version with detailed output |
npm run install:clean |
Clean install (removes node_modules first) |
- postinstall: Automatically copies documentation files for development
- workspace linking: npm automatically links shared dependencies
- version consistency: Overrides ensure consistent package versions
After npm install at root:
thinkred-monorepo/
├── node_modules/ # Root dependencies + workspace symlinks
├── frontend/
│ └── node_modules/ # Frontend-specific dependencies
└── backend/
└── node_modules/ # Backend-specific dependencies (minimal)
- Developer Experience: Single command installs everything
- CI/CD Simplification: One installation step for all environments
- Dependency Consistency: Shared packages use same versions
- Performance: npm optimizes shared dependencies
- Maintainability: No manual workspace management needed
To verify the workspace setup is working:
# Check workspace structure
npm ls --workspaces
# Verify all dependencies are installed
ls frontend/node_modules backend/node_modules
# Test development server (should work immediately)
npm run dev- npm workspaces handle dependency resolution automatically
- Hoisting: Shared dependencies are installed at root level when possible
- Isolation: Workspace-specific dependencies remain in their respective directories
- Linking: npm creates symlinks for cross-workspace dependencies
The frontend dependencies are automatically installed when you run npm install at the root level
(see Monorepo Workspace Configuration above).
-
Verify Frontend Setup
# Check that frontend dependencies were installed ls frontend/node_modules -
Available Scripts
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLintnpm run format- Format code with Prettiernpm run type-check- Run TypeScript type checking
-
Development Features
- Hot module replacement (HMR)
- TypeScript support
- Tailwind CSS with live reload
- ESLint and Prettier integration
- Automated testing setup
- Automatic documentation sync for
/docsroute
The backend dependencies are automatically installed when you run npm install at the root level
(see Monorepo Workspace Configuration above).
-
Install Google Apps Script CLI
npm install -g @google/clasp
-
Login to Google Apps Script
clasp login
-
Backend Environment Setup
cd backend cp .env.example .envConfigure your
.envfile:SCRIPT_ID=your_google_apps_script_id CONTACT_FORM_SHEET_ID=your_contact_form_sheet_id JOB_APPLICATION_SHEET_ID=your_job_application_sheet_id RESUME_PARENT_FOLDER_ID=your_google_drive_folder_id EMAIL_TO=hello@thinkred.tech
-
Deploy Backend
npm run deploy
The backend requires several Google Cloud services:
- Google Sheets: For storing form submissions
- Google Drive: For storing resume files
- Gmail: For sending email notifications
Recommended VS Code extensions:
- ES7+ React/Redux/React-Native snippets
- Prettier - Code formatter
- ESLint
- TypeScript Importer
- Tailwind CSS IntelliSense
- GitLens
Add to your workspace settings (.vscode/settings.json):
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"typescript.preferences.importModuleSpecifier": "relative"
}-
Create Contact Form Sheet
- Column headers: Timestamp, Name, Email, Phone, Company, Project Type, Budget, Timeline, Message
- Share with your Google Apps Script service account
-
Create Job Application Sheet
- Column headers: Timestamp, Job ID, Name, Email, Phone, Experience, Skills, Portfolio, Cover Letter, Resume URL
- Share with your Google Apps Script service account
-
Configure GitHub Repository
- Enable GitHub Pages in repository settings
- Set source to GitHub Actions
-
Environment Secrets
Add the following secrets to your GitHub repository:
VITE_API_URL: Your Google Apps Script deployment URL
-
Create New Google Apps Script Project
-
Configure Project Settings
- Set project name: "ThinkRED Website Backend"
- Enable necessary Google Cloud services
-
Deploy as Web App
- Execute as: Me
- Who has access: Anyone
-
Check Development Server
npm run dev
Verify the site loads at
http://localhost:5173 -
Check Build Process
npm run build
Verify build completes without errors
-
Run Tests
npm run test
-
Test Backend Setup
cd backend node verify-setup.js -
Test Form Submission
- Submit a test contact form
- Check Google Sheets for new entry
- Verify email notification
Port Already in Use
# Kill process using port 5173
npx kill-port 5173Permission Denied
# Fix npm permissions
npm config set prefix ~/.npm-global
export PATH=~/.npm-global/bin:$PATHGoogle Apps Script Login Issues
# Clear clasp credentials and re-login
clasp logout
clasp loginBuild Failures
# Clear node modules and reinstall
rm -rf node_modules
npm installFor additional support:
- Check the Troubleshooting Guide
- Review the FAQ
- Check the Architecture Documentation
- Create an issue in the repository
After completing the setup:
- Review Architecture: Read ARCHITECTURE.md to understand the system
- Understand Workflow: Check WORKFLOW.md for development process
- Follow Style Guide: Review STYLE_GUIDE.md for coding standards
- API Documentation: Familiarize yourself with API.md
Setup Complete! You're ready to start developing with the ThinkRED Technologies website.