diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..dfd295f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +name: Bug Report +about: Create a report to help us improve InboxOS +title: '[BUG] ' +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..98b5921 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +name: Feature Request +about: Suggest an idea for this project +title: '[FEATURE] ' +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..cc9656c --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,23 @@ +## Description +Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. + +Fixes # (issue) + +## Type of change +Please delete options that are not relevant. +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] This change requires a documentation update + +## How Has This Been Tested? +Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. + +## Checklist: +- [ ] My code follows the style guidelines of this project +- [ ] I have performed a self-review of my own code +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have made corresponding changes to the documentation +- [ ] My changes generate no new warnings +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes diff --git a/infrastructure/github/workflows/ci.yml b/.github/workflows/ci.yml similarity index 100% rename from infrastructure/github/workflows/ci.yml rename to .github/workflows/ci.yml diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..88c9a68 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,40 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..3a92c0b --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 InboxOS Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 5f6ee06..50c3d82 100644 --- a/README.md +++ b/README.md @@ -351,27 +351,21 @@ This monorepo isolates individual layers and clients under clean folders. All sy ```text InboxOS/ -├── assets/ # Logos, screenshots, and branding assets -├── backend/ # Node.js backend server (Express + Prisma) +├── .github/ # Community files, PR templates, GitHub Actions ├── frontend/ # React frontend client (Vite) +├── backend/ # Node.js backend server (Express + Prisma) ├── packages/ # Decoupled libraries and shared modules +├── scripts/ # Build, setup, and deployment scripts ├── docs/ # Developer manuals & architecture logs │ ├── api/ # API specifications and Postman config │ ├── architecture/ # Architecture design records and schema docs │ ├── contributing/ # Contribution guidelines │ ├── setup/ # Setup instructions │ └── workflows/ # Workflow definitions -├── development/ # Developer-only workspace -│ ├── prompts/ # AI prompt definitions -│ ├── scratch/ # Local scratch scripts and dumps -│ └── scripts/ # Development utility scripts -├── infrastructure/ # Configurations for running the application -│ ├── docker/ # Docker Compose configurations -│ ├── terraform/ # Terraform scripts for cloud provisioning -│ ├── postgres/ # PostgreSQL initialization scripts -│ ├── config/ # Env and gitignore template configurations -│ └── github/ # GitHub actions configurations ├── .gitignore # Git tracking rules +├── .firebaserc # Firebase CLI target configs (required for deployment) +├── firebase.json # Firebase rules and routing (required for deployment) +├── docker-compose.yml # Local full-stack orchestration ├── package.json # Root package workspace definition └── README.md # Repository Hero and Reference manual (this file) ``` @@ -398,14 +392,14 @@ git clone https://github.com/inboxos/inboxos.git cd inboxos # 2. Copy and configure variables -cp infrastructure/config/env/.env.example infrastructure/config/env/.env -# Edit infrastructure/config/env/.env with your secrets +cp scripts/config/env/.env.example scripts/config/env/.env +# Edit scripts/config/env/.env with your secrets # 3. Spin up all services (PostgreSQL, Redis, Backend, Frontend) -docker compose -f infrastructure/docker/docker-compose.yml up -d +docker compose up -d # 4. Execute database migrations -docker compose -f infrastructure/docker/docker-compose.yml exec backend npx prisma db push +docker compose exec backend npx prisma db push # 5. Open the Dashboard UI # Access the dashboard at http://localhost @@ -421,7 +415,7 @@ For active local debugging of individual services without Docker containerizatio ```bash cd backend npm install -# Configure backend/.env or use infrastructure/config/env/.env +# Configure backend/.env or use scripts/config/env/.env npm start ``` diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..44260f4 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,13 @@ +# Security Policy + +## Supported Versions + +Currently, only the `main` branch (latest release) is supported with security updates. + +## Reporting a Vulnerability + +Please do not report security vulnerabilities through public GitHub issues. + +Instead, please report them directly to the maintainers by emailing `security@inboxos.com` (or the respective maintainer email). + +You should receive a response within 48 hours. If the issue is confirmed as a vulnerability, we will open a private Security Advisory on GitHub and work on a patch. diff --git a/infrastructure/docker/docker-compose.yml b/docker-compose.yml similarity index 93% rename from infrastructure/docker/docker-compose.yml rename to docker-compose.yml index 051d167..6dd9a42 100644 --- a/infrastructure/docker/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,7 @@ services: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data - - ../postgres/init.sql:/docker-entrypoint-initdb.d/init.sql + - ./scripts/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql healthcheck: test: [ "CMD-SHELL", "pg_isready -U postgres -d inboxos" ] interval: 5s @@ -41,7 +41,7 @@ services: # ========================================== backend: build: - context: ../../backend + context: ./backend dockerfile: Dockerfile target: dev restart: unless-stopped @@ -62,7 +62,7 @@ services: - GEMINI_API_KEY=${GEMINI_API_KEY:-} - AI_PROVIDER=${AI_PROVIDER:-openai} volumes: - - ../../backend:/usr/src/app + - ./backend:/usr/src/app # Anonymous volume to preserve node_modules installed inside the container - /usr/src/app/node_modules depends_on: @@ -78,7 +78,7 @@ services: # ========================================== frontend: build: - context: ../../frontend + context: ./frontend dockerfile: Dockerfile target: dev restart: unless-stopped @@ -87,7 +87,7 @@ services: environment: - VITE_API_BASE_URL=http://localhost:8000 volumes: - - ../../frontend:/app + - ./frontend:/app # Anonymous volume to preserve node_modules installed inside the container - /app/node_modules depends_on: diff --git a/assets/.gitkeep b/frontend/public/assets/.gitkeep similarity index 100% rename from assets/.gitkeep rename to frontend/public/assets/.gitkeep diff --git a/infrastructure/config/env/.env.example b/scripts/config/env/.env.example similarity index 100% rename from infrastructure/config/env/.env.example rename to scripts/config/env/.env.example diff --git a/infrastructure/config/git/gitignore b/scripts/config/git/gitignore similarity index 100% rename from infrastructure/config/git/gitignore rename to scripts/config/git/gitignore diff --git a/infrastructure/postgres/init.sql b/scripts/postgres/init.sql similarity index 100% rename from infrastructure/postgres/init.sql rename to scripts/postgres/init.sql diff --git a/development/prompts/classification.json b/scripts/prompts/classification.json similarity index 100% rename from development/prompts/classification.json rename to scripts/prompts/classification.json diff --git a/development/scratch/get_logs.py b/scripts/scratch/get_logs.py similarity index 100% rename from development/scratch/get_logs.py rename to scripts/scratch/get_logs.py diff --git a/development/scratch/print_diagnose_logs.py b/scripts/scratch/print_diagnose_logs.py similarity index 100% rename from development/scratch/print_diagnose_logs.py rename to scripts/scratch/print_diagnose_logs.py diff --git a/development/scratch/print_step358.py b/scripts/scratch/print_step358.py similarity index 100% rename from development/scratch/print_step358.py rename to scripts/scratch/print_step358.py diff --git a/development/scratch/search_transcript.py b/scripts/scratch/search_transcript.py similarity index 100% rename from development/scratch/search_transcript.py rename to scripts/scratch/search_transcript.py diff --git a/development/scripts/analyze_logs.py b/scripts/scripts/analyze_logs.py similarity index 100% rename from development/scripts/analyze_logs.py rename to scripts/scripts/analyze_logs.py diff --git a/development/scripts/api_latency.jsonl b/scripts/scripts/api_latency.jsonl similarity index 100% rename from development/scripts/api_latency.jsonl rename to scripts/scripts/api_latency.jsonl diff --git a/development/scripts/generate_eval_dataset.py b/scripts/scripts/generate_eval_dataset.py similarity index 100% rename from development/scripts/generate_eval_dataset.py rename to scripts/scripts/generate_eval_dataset.py diff --git a/development/scripts/generate_mock_data.py b/scripts/scripts/generate_mock_data.py similarity index 100% rename from development/scripts/generate_mock_data.py rename to scripts/scripts/generate_mock_data.py diff --git a/development/scripts/mock_emails.json b/scripts/scripts/mock_emails.json similarity index 100% rename from development/scripts/mock_emails.json rename to scripts/scripts/mock_emails.json diff --git a/development/scripts/project_x_eval_dataset.csv b/scripts/scripts/project_x_eval_dataset.csv similarity index 100% rename from development/scripts/project_x_eval_dataset.csv rename to scripts/scripts/project_x_eval_dataset.csv diff --git a/infrastructure/terraform/.gitignore b/scripts/terraform/.gitignore similarity index 100% rename from infrastructure/terraform/.gitignore rename to scripts/terraform/.gitignore diff --git a/infrastructure/terraform/elasticache.tf b/scripts/terraform/elasticache.tf similarity index 100% rename from infrastructure/terraform/elasticache.tf rename to scripts/terraform/elasticache.tf diff --git a/infrastructure/terraform/main.tf b/scripts/terraform/main.tf similarity index 100% rename from infrastructure/terraform/main.tf rename to scripts/terraform/main.tf diff --git a/infrastructure/terraform/outputs.tf b/scripts/terraform/outputs.tf similarity index 100% rename from infrastructure/terraform/outputs.tf rename to scripts/terraform/outputs.tf diff --git a/infrastructure/terraform/rds.tf b/scripts/terraform/rds.tf similarity index 100% rename from infrastructure/terraform/rds.tf rename to scripts/terraform/rds.tf diff --git a/infrastructure/terraform/security_groups.tf b/scripts/terraform/security_groups.tf similarity index 100% rename from infrastructure/terraform/security_groups.tf rename to scripts/terraform/security_groups.tf diff --git a/infrastructure/terraform/terraform.tfvars b/scripts/terraform/terraform.tfvars similarity index 100% rename from infrastructure/terraform/terraform.tfvars rename to scripts/terraform/terraform.tfvars diff --git a/infrastructure/terraform/tfplan b/scripts/terraform/tfplan similarity index 100% rename from infrastructure/terraform/tfplan rename to scripts/terraform/tfplan diff --git a/infrastructure/terraform/variables.tf b/scripts/terraform/variables.tf similarity index 100% rename from infrastructure/terraform/variables.tf rename to scripts/terraform/variables.tf diff --git a/infrastructure/terraform/vpc.tf b/scripts/terraform/vpc.tf similarity index 100% rename from infrastructure/terraform/vpc.tf rename to scripts/terraform/vpc.tf