{"id":29022610,"url":"https://github.com/nelman25/capacicalc","last_synced_at":"2026-05-07T06:32:46.181Z","repository":{"id":295501177,"uuid":"990238550","full_name":"Nelman25/CapaciCalc","owner":"Nelman25","description":"Where physics meets code ⚡ Watch capacitors charge/discharge in real-time and chat with an AI about the math behind the curves.","archived":false,"fork":false,"pushed_at":"2025-05-26T11:31:38.000Z","size":142,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-26T03:02:24.248Z","etag":null,"topics":["chartjs","gemini-api","react","tailwindcss","typscript","zustand"],"latest_commit_sha":null,"homepage":"https://capaci-calc.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nelman25.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-25T19:23:06.000Z","updated_at":"2025-05-26T11:31:42.000Z","dependencies_parsed_at":"2025-05-25T22:31:03.760Z","dependency_job_id":"7d20c6ce-6b43-4e8c-8711-47f70bfaa4c3","html_url":"https://github.com/Nelman25/CapaciCalc","commit_stats":null,"previous_names":["nelman25/capacicalc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Nelman25/CapaciCalc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nelman25%2FCapaciCalc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nelman25%2FCapaciCalc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nelman25%2FCapaciCalc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nelman25%2FCapaciCalc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nelman25","download_url":"https://codeload.github.com/Nelman25/CapaciCalc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nelman25%2FCapaciCalc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261990277,"owners_count":23241185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chartjs","gemini-api","react","tailwindcss","typscript","zustand"],"created_at":"2025-06-26T03:02:24.731Z","updated_at":"2026-05-07T06:32:46.125Z","avatar_url":"https://github.com/Nelman25.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CapaciCalc: Capacitor Charge-Discharge Calculator\n\n## 📝 Overview\nCapaciCalc is an interactive capacitor charge-discharge calculator I developed as my Physics 2 final project. This tool provides:\n\n- **Real-time calculations** of capacitor voltage during charge/discharge cycles\n- **Visualization** of the exponential charge/discharge curve\n- **AI-powered explanations** for understanding the physics behind the results\n\n## ✨ Features\n\n### ⚡ Core Calculator\n- Calculate instantaneous voltage at any time point\n- Supports both charging and discharging scenarios\n- Automatic time constant (τ = RC) calculation\n- Unit conversions for capacitance (F, μF, nF, pF) and resistance (Ω, kΩ, MΩ)\n\n### 📊 Visualization\n- Interactive graph showing the complete charge/discharge curve\n- Highlighted time constant (τ) markers\n- Real-time updates as parameters change\n\n### 🤖 AI Physics Assistant\n- Built-in chatbot powered by Gemini API\n- Ask follow-up questions about:\n  - Calculation results\n  - Physics concepts\n  - Circuit behavior explanations\n- Provides formatted responses with Markdown support\n\n## 🛠️ Technical Implementation\n\n### Frontend\n- **React** with TypeScript\n- **Zustand** for state management\n- **Chart.js** + **react-chartjs-2** for visualization\n- **ShadCN** UI components for clean interface\n\n### AI Integration\n- Google's **Gemini API** for physics explanations\n- Dynamic prompt engineering for technical responses\n- Response formatting with Markdown support\n\n## 🚀 Getting Started\n\n### Prerequisites\n- Node.js (v18+ recommended)\n- Google Gemini API key (for AI features)\n\n### Installation\n```bash\ngit clone https://github.com/yourusername/capacicalc.git\ncd capacicalc\nnpm install\n```\n\n### Configuration\nCreate a `.env` file:\n```env\nVITE_GEMINI_API_KEY=your_api_key_here\n```\n\n### Running\n```bash\nnpm run dev\n```\n\n## 📚 Physics Concepts Implemented\n\n### Key Formulas\n- Time constant: τ = RC\n- Charging: V(t) = V₀(1 - e^(-t/τ))\n- Discharging: V(t) = V₀e^(-t/τ)\n\n### Graph Features\n- Shows 0 → 5τ range (99.3% complete charge/discharge)\n- Exponential curve visualization\n- Dynamic scaling based on circuit parameters\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnelman25%2Fcapacicalc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnelman25%2Fcapacicalc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnelman25%2Fcapacicalc/lists"}