Welcome to the ThinkRED development methodology - where creativity meets technical excellence! ✨
Before diving into the ThinkRED development adventure, let's make sure you're equipped with the right tools! 🎯
- Node.js 18+ (LTS recommended) - The foundation of our stack 🟢
- npm 8+ for package management - Our dependency wizard 📦
- Git for version control - Time travel for code! ⏰
- Code Editor (VS Code recommended with our suggested extensions) 💻
- Google Account (for Google Apps Script development) - Your backstage pass 🎫
- Google CLASP (for backend deployment) - The deployment magic wand ✨
Let's make sure everything is in perfect harmony!
node --version # Should be v18.0.0 or higher
npm --version # Should be 8.0.0 or higher
git --version # Any recent versionThe ThinkRED monorepo is designed for developer happiness - one command to rule them all! 🎪
Get the ThinkRED universe on your machine!
git clone https://github.com/thinkredtech/thinkredtech.github.io.git
cd thinkredtech.github.ioOne command, all the magic! ⚡
# Installs dependencies for all workspaces
npm installTime to bring your ideas to life! 🚀
# Start frontend development server
npm run dev
# Or start all development services
npm run dev:allThe application will be available at http://localhost:3000
npm run dev- Start frontend development servernpm run dev:all- Start all development servers in parallelnpm run build- Build frontend for productionnpm run build:all- Build all componentsnpm run lint- Run ESLint across all workspacesnpm run lint:fix- Fix linting issues automaticallynpm run test- Run test suitesnpm run type-check- Run TypeScript compiler check
The monorepo uses a unified task management system. All tasks can be run from the root directory:
# Show all available tasks
npm run task --help
# Show workspace status
npm run status
# Run specific tasks
npm run task dev frontend # Start frontend dev server
npm run task build:all # Build all components
npm run task lint backend # Lint backend only- React 19 with TypeScript
- Vite for build tooling and development server
- Tailwind CSS for styling
- React Router for navigation
- React Markdown for documentation
- Start the dev server:
npm run dev - Make changes to files in
frontend/src/ - View changes at
http://localhost:3000(auto-reload) - Run tests:
npm run test - Lint code:
npm run lint
frontend/
├── src/ # Source code
│ ├── components/ # React components
│ ├── pages/ # Page components
│ ├── hooks/ # Custom React hooks
│ ├── utils/ # Utility functions
│ ├── styles/ # Global styles
│ └── types/ # TypeScript types
├── public/ # Static assets
├── docs/ # Public documentation
└── scripts/ # Build and optimization scripts
The backend runs on Google Apps Script and doesn't require local setup for most development tasks.
-
Install CLASP globally:
npm install -g @google/clasp
-
Login to Google Apps Script:
clasp login
-
Navigate to backend directory:
cd backend -
Available Scripts:
npm run push- Push code to Google Apps Scriptnpm run deploy- Deploy to Google Apps Scriptnpm run logs- View execution logs
thinkred-monorepo/
├── frontend/ # React frontend application
│ ├── src/ # Source code
│ ├── public/ # Static assets
│ ├── docs/ # User-facing documentation
│ └── package.json # Frontend dependencies
├── backend/ # Google Apps Script backend
│ ├── thinkREDBot.js # Main backend logic
│ └── package.json # Backend dependencies
├── docs/ # Developer documentation
└── README.md # Project overview
- Create a feature branch:
git checkout -b feature/feature-name - Make your changes in the appropriate directory
- Test locally using
npm run dev - Commit changes:
git commit -m "Add feature description" - Push branch:
git push origin feature/feature-name - Create pull request
- All React components are in
frontend/src/components/ - Pages are in
frontend/src/pages/ - Styles use Tailwind CSS classes
- TypeScript is enforced for type safety
- Main logic is in
backend/thinkREDBot.js - Uses Google Apps Script environment
- Test changes using
clasp pushand Google Apps Script editor - Deploy using
npm run deploy
Create a .env file in the frontend/ directory if needed:
VITE_API_URL=https://script.google.com/macros/s/YOUR_DEPLOYMENT_ID/execBackend configuration is handled through Google Apps Script Properties Service.
cd frontend
npm test- Start the development server
- Test all form submissions
- Check responsive design on different screen sizes
- Verify all routes work correctly
GitHub Pages (Automatic):
- Push to main branch triggers automatic deployment
- Site is available at
https://thinkredtech.github.io
Manual Deployment:
cd frontend
npm run build
npm run deploycd backend
npm run deployIf you encounter Node.js version issues:
# Using nvm (recommended)
nvm install 18
nvm use 18If you get permission errors:
# For npm global installs
npm config set prefix ~/.npm-global
export PATH=~/.npm-global/bin:$PATHIf the build fails:
- Clear node_modules:
rm -rf node_modules - Clear package-lock:
rm package-lock.json - Reinstall:
npm install
- ES7+ React/Redux/React-Native snippets
- TypeScript Importer
- Tailwind CSS IntelliSense
- Prettier - Code formatter
- ESLint
Create .vscode/settings.json:
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"typescript.preferences.importModuleSpecifier": "relative"
}- React Documentation
- TypeScript Documentation
- Tailwind CSS Documentation
- Google Apps Script Documentation
For development questions or issues:
- Check existing documentation in
/docs/ - Search closed issues on GitHub
- Create a new issue with detailed description
- Contact the development team
Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.