From f1a6d4851e6be2dccc7ea785e88984e0d62afdc2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 30 Dec 2025 15:26:12 +0000 Subject: [PATCH 1/5] Initial plan From f8f10ccf484465c383a169ec76b89bfebfecfbc2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 30 Dec 2025 15:34:00 +0000 Subject: [PATCH 2/5] Create complete production-ready Construction Assistant application structure Co-authored-by: al7566 <215473224+al7566@users.noreply.github.com> --- .env.example | 13 + .gitignore | 35 +++ .nvmrc | 1 + CONTRIBUTING.md | 433 +++++++++++++++++++++++++++++++ DEPLOYMENT.md | 414 ++++++++++++++++++++++++++++++ LICENSE | 21 ++ README.md | 336 +++++++++++++++++------- jsconfig.json | 25 ++ netlify.toml | 25 ++ package.json | 51 ++++ postcss.config.js | 6 + public/index.html | 19 ++ render.yaml | 27 ++ src/App.jsx | 618 +++++++++++++++++++++++++++++++++++++++++++++ src/index.css | 17 ++ src/index.js | 11 + tailwind.config.js | 26 ++ vercel.json | 35 +++ 18 files changed, 2027 insertions(+), 86 deletions(-) create mode 100644 .env.example create mode 100644 .gitignore create mode 100644 .nvmrc create mode 100644 CONTRIBUTING.md create mode 100644 DEPLOYMENT.md create mode 100644 LICENSE create mode 100644 jsconfig.json create mode 100644 netlify.toml create mode 100644 package.json create mode 100644 postcss.config.js create mode 100644 public/index.html create mode 100644 render.yaml create mode 100644 src/App.jsx create mode 100644 src/index.css create mode 100644 src/index.js create mode 100644 tailwind.config.js create mode 100644 vercel.json diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..a361feb --- /dev/null +++ b/.env.example @@ -0,0 +1,13 @@ +# Environment Variables Template +# Copy this file to .env and fill in your values + +# Future: Claude API Integration +# REACT_APP_CLAUDE_API_KEY=your_api_key_here +# REACT_APP_CLAUDE_API_URL=https://api.anthropic.com/v1 + +# Future: Analytics (optional) +# REACT_APP_GA_TRACKING_ID=your_ga_id_here + +# App Configuration +REACT_APP_NAME="Construction Assistant" +REACT_APP_VERSION=1.0.0 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cce8522 --- /dev/null +++ b/.gitignore @@ -0,0 +1,35 @@ +# Dependencies +node_modules/ +/.pnp +.pnp.js + +# Testing +/coverage + +# Production build +/build +/dist + +# Misc +.DS_Store +.env +.env.local +.env.development.local +.env.test.local +.env.production.local + +# Logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# IDE +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# OS +Thumbs.db diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..02c8b48 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +18.18.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..9d26d82 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,433 @@ +# Contributing to Smart Construction Assistant + +First off, thank you for considering contributing to Smart Construction Assistant! It's people like you that make this tool better for the construction community. + +## Table of Contents +- [Code of Conduct](#code-of-conduct) +- [Getting Started](#getting-started) +- [How Can I Contribute?](#how-can-i-contribute) +- [Development Workflow](#development-workflow) +- [Style Guidelines](#style-guidelines) +- [Commit Guidelines](#commit-guidelines) +- [Pull Request Process](#pull-request-process) + +## Code of Conduct + +### Our Pledge + +We are committed to providing a welcoming and inspiring community for all. Please be respectful and constructive in all interactions. + +### Our Standards + +**Positive behavior includes:** +- Using welcoming and inclusive language +- Being respectful of differing viewpoints +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards others + +**Unacceptable behavior includes:** +- Harassment, trolling, or derogatory comments +- Public or private harassment +- Publishing others' private information +- Other conduct which could reasonably be considered inappropriate + +## Getting Started + +### Prerequisites + +- Node.js 18.18.0 or higher +- npm or yarn +- Git +- A GitHub account +- Basic knowledge of React and JavaScript + +### Development Setup + +1. **Fork the repository** on GitHub + +2. **Clone your fork**: + ```bash + git clone https://github.com/YOUR_USERNAME/SmartAssistant2.git + cd SmartAssistant2 + ``` + +3. **Add upstream remote**: + ```bash + git remote add upstream https://github.com/al7566/SmartAssistant2.git + ``` + +4. **Install dependencies**: + ```bash + npm install + ``` + +5. **Create a branch**: + ```bash + git checkout -b feature/your-feature-name + ``` + +6. **Start development server**: + ```bash + npm start + ``` + +## How Can I Contribute? + +### Reporting Bugs + +Before creating bug reports, please check existing issues. When creating a bug report, include: + +- **Clear title and description** +- **Steps to reproduce** the issue +- **Expected behavior** +- **Actual behavior** +- **Screenshots** if applicable +- **Environment details** (OS, browser, Node version) + +**Bug Report Template:** + +```markdown +**Describe the bug** +A clear description of what the bug is. + +**To Reproduce** +Steps to reproduce: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +What you expected to happen. + +**Screenshots** +If applicable, add screenshots. + +**Environment:** +- OS: [e.g., Windows 10, macOS 12] +- Browser: [e.g., Chrome 96, Safari 15] +- Node Version: [e.g., 18.18.0] +- App Version: [e.g., 1.0.0] +``` + +### Suggesting Enhancements + +Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, include: + +- **Clear title and description** +- **Use case** - Why is this needed? +- **Proposed solution** +- **Alternatives considered** +- **Additional context** or screenshots + +**Enhancement Template:** + +```markdown +**Is your feature request related to a problem?** +A clear description of the problem. + +**Describe the solution you'd like** +A clear description of what you want to happen. + +**Describe alternatives you've considered** +Other solutions or features you've considered. + +**Additional context** +Any other context, screenshots, or examples. +``` + +### Your First Code Contribution + +Unsure where to begin? Look for issues labeled: + +- `good first issue` - Good for newcomers +- `help wanted` - Extra attention needed +- `documentation` - Documentation improvements + +### Pull Requests + +1. **Small, focused changes** are easier to review +2. **One feature/fix per PR** +3. **Update documentation** if needed +4. **Add tests** if applicable +5. **Follow style guidelines** + +## Development Workflow + +### Branch Naming + +Use descriptive branch names: +- `feature/calculator-improvements` +- `fix/chat-input-bug` +- `docs/deployment-guide` +- `refactor/component-structure` + +### Making Changes + +1. **Keep changes focused** - One feature or fix per PR +2. **Write clear code** - Use meaningful variable names +3. **Comment complex logic** - Help others understand +4. **Test thoroughly** - Verify all scenarios work +5. **Update docs** - Keep README current + +### Testing Your Changes + +```bash +# Run the development server +npm start + +# Build for production +npm run build + +# Run tests (when available) +npm test + +# Lint your code +npm run lint +``` + +**Manual testing checklist:** +- [ ] App loads without errors +- [ ] All tabs are accessible +- [ ] Calculators produce correct results +- [ ] Chat input and responses work +- [ ] Mobile responsiveness works +- [ ] No console errors +- [ ] Build completes successfully + +## Style Guidelines + +### JavaScript/React Style + +- Use **functional components** with hooks +- Use **meaningful variable names** +- Keep **components focused** (single responsibility) +- Use **destructuring** where appropriate +- Prefer **const** over let, avoid var +- Use **async/await** over promises +- Follow **DRY principle** (Don't Repeat Yourself) + +**Example:** + +```jsx +// Good +const [isOpen, setIsOpen] = useState(false); +const handleToggle = () => setIsOpen(!isOpen); + +// Avoid +var x = false; +function toggle() { + x = !x; +} +``` + +### CSS/Tailwind Style + +- Use **Tailwind utility classes** +- Keep **custom CSS minimal** +- Use **responsive modifiers** (sm:, md:, lg:) +- Group **related classes** together +- Use **component-specific classes** sparingly + +**Example:** + +```jsx +// Good + + +// Avoid inline styles + +``` + +### File Organization + +``` +src/ +├── components/ # Reusable components (future) +├── utils/ # Helper functions (future) +├── App.jsx # Main component +├── index.js # Entry point +└── index.css # Global styles +``` + +## Commit Guidelines + +### Commit Message Format + +``` +(): + + + +