diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..18b2550 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,27 @@ +--- +name: Bug report +about: Report something that isn't working correctly +title: '' +labels: bug +assignees: '' +--- + +**What happened?** +A clear description of the bug. + +**Steps to reproduce** +1. Go to '...' +2. Click on '...' +3. See error + +**Expected behavior** +What should have happened instead. + +**Screenshots** +If applicable, add screenshots. + +**Environment** +- Browser and version: +- Device (desktop/mobile): +- Offline or online: +- Language setting: diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..f87a9f5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest a new feature or improvement +title: '' +labels: enhancement +assignees: '' +--- + +**What problem does this solve?** +Describe the need or gap this feature addresses. + +**Proposed solution** +How you'd like it to work. + +**Alternatives considered** +Other approaches you've thought about. + +**Additional context** +Anything else -- screenshots, links, related issues. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..4c74123 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,19 @@ +## What does this PR do? + +Brief description of the change. + +## Why? + +Context or motivation for the change. + +## How to test + +Steps to verify this works correctly. + +## Checklist + +- [ ] Tested offline (no network) +- [ ] Tested across supported languages (if applicable) +- [ ] Accessibility checked (keyboard nav, screen reader, contrast) +- [ ] No new lint warnings (`npm run lint`) +- [ ] Build passes (`npm run build`) diff --git a/.oxlintrc.json b/.oxlintrc.json index 61e707f..2630ec6 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -219,6 +219,6 @@ "**/ui/breadcrumb.tsx", "**/ui/progress.tsx", "**/ui/resizable.tsx", - "Docs/**" + "docs/**" ] } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..bd17192 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,52 @@ +# Contributing to CALMe + +CALMe is a crisis intervention tool. Contributions here have real impact on people in real distress. We take that seriously, and we appreciate that you do too. + +## Getting set up + +```bash +git clone https://github.com/CALMe25/CALMe.git +cd CALMe +npm install +npm run dev +``` + +The app runs at `http://localhost:5173`. Everything runs locally -- no backend, no API keys, no external services. + +## Development workflow + +1. Create a branch from `main` +2. Make your changes +3. Run `npm run lint` and `npm run build` before committing +4. Open a pull request using the PR template + +Commits are linted on pre-commit via Husky + lint-staged. If the hook fails, fix the issue rather than skipping it. + +## What we need help with + +- **Mental health professionals** -- reviewing and refining conversation flows, validating therapeutic content against the Six Cs model +- **Translators** -- expanding language support (Hebrew, Arabic, English currently; Russian and Amharic are priorities) +- **Accessibility specialists** -- WCAG 2.2 audit, screen reader testing, assistive technology validation +- **Developers** -- see [docs/ROADMAP.md](docs/ROADMAP.md) for current priorities + +## Code style + +- TypeScript throughout -- no `any` unless absolutely necessary +- Linting: OXLint (Rust-based, runs fast) +- Formatting: OXFmt +- UI components: Radix UI + Tailwind CSS +- No external API calls in the conversation flow -- everything runs offline + +## Conversation content + +If you're contributing to conversation maps or therapeutic content, coordinate with the team first. Crisis intervention content is reviewed by a mental health professional before merging. Open an issue to discuss before submitting a PR. + +## Reporting issues + +Use the issue templates: +- **Bug report** -- something isn't working +- **Feature request** -- something that should exist + +## Code of conduct + +Be decent. This project exists to help people in crisis. Bring that same care to how you treat contributors. diff --git a/Docs/ProfileIntro.css b/Docs/ProfileIntro.css deleted file mode 100644 index e69de29..0000000 diff --git a/Docs/ProfileIntro.tsx b/Docs/ProfileIntro.tsx deleted file mode 100644 index fb56611..0000000 --- a/Docs/ProfileIntro.tsx +++ /dev/null @@ -1,40 +0,0 @@ -// src/components/ProfileIntro.tsx -//guided user profile questions to parse information to save -//what should I call you? or what is your name? -//what are your preferred pronouns? -//where is your closest safe space? - stairway, public miklat, private mamad -//what is your preferred language? - hebrew, arabic, english -//what are your accessibility needs? - large text, high contrast, screen reader - -import React from "react"; - -// Assuming UserProfile type is still needed within this component -interface UserProfile { - name: string; - age: number; - primaryConcerns: string[]; - gender: string; - language: "hebrew" | "arabic" | "english"; - accessibilityPreferences: string[]; -} - -// You might want to pass props to ProfileIntro later, but for now, -// let's make it a simple component that renders something. -const ProfileIntro: React.FC = () => { - return ( -
-

Welcome to Profile Setup!

-

This is where the user profile introduction will go.

- {/* You will add your actual profile setup UI here */} -
- ); -}; -console.log("ProfileIntro is rendering!"); -export default ProfileIntro; // This line is crucial! diff --git a/Docs/Retired/deprecated-trauma-response-guide.md b/Docs/Retired/deprecated-trauma-response-guide.md deleted file mode 100644 index d64a541..0000000 --- a/Docs/Retired/deprecated-trauma-response-guide.md +++ /dev/null @@ -1,1248 +0,0 @@ -# **DEPRICATED-** - -This document has been replaced by seperate arcitecture and implimentation documents. - - -# Trauma Response App - Developer Implementation Guide - -**Note on Documentation Links**: All documentation links in this guide were valid as of the guide's creation. Please verify current URLs and version numbers before implementation, especially for: -- TensorFlow.js CDN links (use @latest or check current stable version) -- Android API documentation (may have moved with new Android versions) -- npm package versions - -## Project Goal - -### What We're Building -Build an offline-first mobile app that helps people during traumatic events (terror attacks, bombings, natural disasters) by: -- Assessing their safety status through natural conversation -- Providing immediate stress management activities -- Offering cognitive games for distraction -- Helping process the event afterward - -The app guides users through a structured therapeutic process: -1. Safety confirmation -2. Stress assessment -3. Calming activities (if stressed) -4. Cognitive games (when ready) -5. Event processing (if safe) - -### Critical Requirements -- **Must work completely offline** in shelters/bunkers with no network access -- **Must understand natural language** - not just keywords, but phrases like "I can't stop shaking" -- **Must run on old devices** - Android 5.0+ with 1GB RAM -- **Must respect silent mode** during active danger (no sounds/vibration) -- **Must be shareable** - <110MB total for peer-to-peer transfer in emergencies -- **Must load quickly** - <3 seconds after initial setup -- **Must preserve battery** - minimal background processing - -## Architecture Overview - -### Why This Architecture Matters - -This app is designed for crisis situations where: -- **Every second counts**: Initial setup takes 30 seconds, but thereafter loads in <3 seconds -- **Natural language is critical**: USE-Lite adds 25MB but understands "I can't breathe" means panic, not a medical issue -- **Old devices are common**: In emergencies, people use whatever phone works - we target Android 5.0+ -- **Battery life is critical**: Efficient code and minimal background processing preserve battery -- **Sharing is essential**: At 110MB the app can still be shared via local WiFi in shelters -- **True understanding required**: There's no substitute for semantic understanding in crisis response - -The USE-Lite model is our biggest component, but it's non-negotiable. When someone types "everything is spinning and I can't stop shaking," keywords won't help - we need real language understanding. - -### System Architecture - -```mermaid -graph TB - subgraph "User Interface" - UI[HTML/CSS Interface] - MIC[Microphone] - TXT[Text Input] - end - - subgraph "Core Logic" - STT[Web Speech API / Android STT] - PARSER[USE-Lite Parser ~25MB] - CONV[Conversation Manager] - STATE[JS Object / SharedPrefs] - end - - subgraph "Offline Content" - JSON[Conversation JSONs] - ACTS[Activity Scripts] - VID[Compressed Videos] - end - - MIC --> STT - TXT --> PARSER - STT --> PARSER - PARSER --> CONV - CONV <--> STATE - CONV --> JSON - CONV --> ACTS - CONV --> VID - STATE --> UI -``` - -### Technology Stack - -| Component | Web App (PWA) | Android Native | Why This Choice | -|-----------|--------------|----------------|-----------------| -| **Core** | Vanilla JS | Kotlin | No framework overhead | -| **UI** | Custom CSS (~10KB) | XML layouts | Built-in, no libraries | -| **Speech** | Web Speech API | Android STT | Device built-in, free | -| **Storage** | localStorage + IndexedDB | SharedPreferences | Simple, reliable | -| **Parser** | TensorFlow.js USE-Lite (25MB) | TF Lite USE-Lite (25MB) | Understands natural language | -| **Video** | HTML5 `