From 75254e4ac155e8c9f4e3e573aae57d41a065144d Mon Sep 17 00:00:00 2001 From: Sushmita Date: Sat, 21 Mar 2026 00:47:12 +0530 Subject: [PATCH 1/6] docs: add contribution note to README --- README.md | 271 ++++++------------------------------------------------ 1 file changed, 30 insertions(+), 241 deletions(-) diff --git a/README.md b/README.md index 3c5adf2..9e15bf3 100644 --- a/README.md +++ b/README.md @@ -1,280 +1,69 @@ +
- -
- AOSSIE - -
- -  - -
- -[![Static Badge](https://img.shields.io/badge/aossie.org/TODO-228B22?style=for-the-badge&labelColor=FFC517)](https://TODO.aossie.org/) - - - + AOSSIE
-

- - -Telegram Badge -   - - -X (formerly Twitter) Badge -   - - -Discord Badge -   - - - Medium Badge -   - - - LinkedIn Badge -   - - - Youtube Badge + + Twitter Badge + +    + + Discord Badge + +    + + LinkedIn Badge +

---
-

TODO: Project Name

+

OrgExplorer

-[TODO](https://TODO.stability.nexus/) is a ... TODO: Project Description. +OrgExplorer is a web-based frontend project under AOSSIE. +It provides a simple and clean interface to explore GitHub organization data. --- +> 🚀 This project is actively maintained under AOSSIE and open for contributions. ## 🚀 Features -TODO: List your main features here: - -- **Feature 1**: Description -- **Feature 2**: Description -- **Feature 3**: Description -- **Feature 4**: Description +- ⚡ React + TypeScript + Vite setup +- 🎯 Clean and simple UI +- 🧩 Beginner-friendly structure +- 🔗 Ready for GitHub API integration --- ## 💻 Tech Stack -TODO: Update based on your project - -### Frontend -- React / Next.js / Flutter / React Native +- React - TypeScript -- TailwindCSS - -### Backend -- Flask / FastAPI / Node.js / Supabase -- Database: PostgreSQL / SQLite / MongoDB - -### AI/ML (if applicable) -- LangChain / LangGraph / LlamaIndex -- Google Gemini / OpenAI / Anthropic Claude -- Vector Database: Weaviate / Pinecone / Chroma -- RAG / Prompt Engineering / Agent Frameworks - -### Blockchain (if applicable) -- Solidity / solana / cardano / ergo Smart Contracts -- Hardhat / Truffle / foundry -- Web3.js / Ethers.js / Wagmi -- OpenZeppelin / alchemy / Infura - ---- - -## ✅ Project Checklist - -TODO: Complete applicable items based on your project type - -- [ ] **The protocol** (if applicable): - - [ ] has been described and formally specified in a paper. - - [ ] has had its main properties mathematically proven. - - [ ] has been formally verified. -- [ ] **The smart contracts** (if applicable): - - [ ] were thoroughly reviewed by at least two knights of The Stable Order. - - [ ] were deployed to: [Add deployment details] -- [ ] **The mobile app** (if applicable): - - [ ] has an _About_ page containing the Stability Nexus's logo and pointing to the social media accounts of the Stability Nexus. - - [ ] is available for download as a release in this repo. - - [ ] is available in the relevant app stores. -- [ ] **The AI/ML components** (if applicable): - - [ ] LLM/model selection and configuration are documented. - - [ ] Prompts and system instructions are version-controlled. - - [ ] Content safety and moderation mechanisms are implemented. - - [ ] API keys and rate limits are properly managed. - ---- - -## 🔗 Repository Links - -TODO: Update with your repository structure - -1. [Main Repository](https://github.com/AOSSIE-Org/TODO) -2. [Frontend](https://github.com/AOSSIE-Org/TODO/tree/main/frontend) (if separate) -3. [Backend](https://github.com/AOSSIE-Org/TODO/tree/main/backend) (if separate) - ---- - -## 🏗️ Architecture Diagram - -TODO: Add your system architecture diagram here - -``` -[Architecture Diagram Placeholder] -``` - -You can create architecture diagrams using: -- [Draw.io](https://draw.io) -- [Excalidraw](https://excalidraw.com) -- [Lucidchart](https://lucidchart.com) -- [Mermaid](https://mermaid.js.org) (for code-based diagrams) - -Example structure to include: -- Frontend components -- Backend services -- Database architecture -- External APIs/services -- Data flow between components - ---- - -## 🔄 User Flow - -TODO: Add user flow diagrams showing how users interact with your application - -``` -[User Flow Diagram Placeholder] -``` - -### Key User Journeys - -TODO: Document main user flows: - -1. **User Journey 1**: Description - - Step 1 - - Step 2 - - Step 3 - -2. **User Journey 2**: Description - - Step 1 - - Step 2 - - Step 3 - -3. **User Journey 3**: Description - - Step 1 - - Step 2 - - Step 3 +- Vite --- -## �🍀 Getting Started +## 📦 Getting Started ### Prerequisites -TODO: List what developers need installed +- Node.js (v18 or above) +- npm -- Node.js 18+ / Python 3.9+ / Flutter SDK -- npm / yarn / pnpm -- [Any specific tools or accounts needed] +--- ### Installation -TODO: Provide detailed setup instructions - -#### 1. Clone the Repository - -```bash -git clone https://github.com/AOSSIE-Org/TODO.git -cd TODO -``` - -#### 2. Install Dependencies - ```bash +git clone https://github.com/AOSSIE-Org/OrgExplorer.git +cd OrgExplorer npm install -# or -yarn install -# or -pnpm install -``` - -#### 3. Configure Environment Variables(.env.example) - -Create a `.env` file in the root directory: - -```env -# Add your environment variables here -API_KEY=your_api_key -DATABASE_URL=your_database_url -``` - -#### 4. Run the Development Server - -```bash npm run dev -# or -yarn dev -# or -pnpm dev -``` - -#### 5. Open your Browser - -Navigate to [http://localhost:3000](http://localhost:3000) to see the application. - -For detailed setup instructions, please refer to our [Installation Guide](./docs/INSTALL_GUIDE.md) (if you have one). - ---- - -## 📱 App Screenshots - -TODO: Add screenshots showcasing your application - -| | | | -|---|---|---| -| Screenshot 1 | Screenshot 2 | Screenshot 3 | - ---- - -## 🙌 Contributing - -⭐ Don't forget to star this repository if you find it useful! ⭐ - -Thank you for considering contributing to this project! Contributions are highly appreciated and welcomed. To ensure smooth collaboration, please refer to our [Contribution Guidelines](./CONTRIBUTING.md). - ---- - -## ✨ Maintainers - -TODO: Add maintainer information - -- [Maintainer Name](https://github.com/username) -- [Maintainer Name](https://github.com/username) - ---- - -## 📍 License - -This project is licensed under the GNU General Public License v3.0. -See the [LICENSE](LICENSE) file for details. - ---- - -## 💪 Thanks To All Contributors - -Thanks a lot for spending your time helping TODO grow. Keep rocking 🥂 - -[![Contributors](https://contrib.rocks/image?repo=AOSSIE-Org/TODO)](https://github.com/AOSSIE-Org/TODO/graphs/contributors) +>> 🚀 This project is actively being developed under AOSSIE. -© 2025 AOSSIE From e0e37e945d1692d5b024864a02580972cad6eac4 Mon Sep 17 00:00:00 2001 From: Sushmita Date: Sat, 21 Mar 2026 22:26:28 +0530 Subject: [PATCH 2/6] feat: add GitHub organization fetch feature --- src/App.tsx | 63 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 57 insertions(+), 6 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 0a3deb1..4c8e3a9 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,12 +1,63 @@ -import './App.css' +import { useState } from "react"; +import "./App.css"; function App() { + const [org, setOrg] = useState(""); + const [orgData, setOrgData] = useState(null); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(""); + + const fetchOrg = async () => { + if (!org) return; + + setLoading(true); + setError(""); + setOrgData(null); + + try { + const res = await fetch(`https://api.github.com/orgs/${org}`); + if (!res.ok) { + throw new Error("Organization not found"); + } + const data = await res.json(); + setOrgData(data); + } catch (err: any) { + setError(err.message); + } + + setLoading(false); + }; return ( - <> -

Hello, OrgExplorer!

- - ) +
+

OrgExplorer

+ + setOrg(e.target.value)} + style={{ padding: "10px", width: "250px", marginRight: "10px" }} + /> + + + + {loading &&

Loading...

} + {error &&

{error}

} + + {orgData && ( +
+ +

{orgData.login}

+

{orgData.description}

+

Followers: {orgData.followers}

+

Public Repos: {orgData.public_repos}

+
+ )} +
+ ); } -export default App +export default App; \ No newline at end of file From 34e4f21ad50dc8ad181cdb6305e0287ec18b8b2e Mon Sep 17 00:00:00 2001 From: Sushmita Yadav Date: Sat, 21 Mar 2026 23:48:17 +0530 Subject: [PATCH 3/6] Update App.tsx --- src/App.tsx | 85 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 58 insertions(+), 27 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 4c8e3a9..c0569d4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,42 +1,70 @@ -import { useState } from "react"; -import "./App.css"; +import { useRef, useState } from "react"; + +type GitHubOrg = { + avatar_url: string; + login: string; + description: string | null; + followers: number; + public_repos: number; +}; function App() { const [org, setOrg] = useState(""); - const [orgData, setOrgData] = useState(null); + const [orgData, setOrgData] = useState(null); const [loading, setLoading] = useState(false); const [error, setError] = useState(""); - const fetchOrg = async () => { - if (!org) return; - - setLoading(true); - setError(""); - setOrgData(null); - - try { - const res = await fetch(`https://api.github.com/orgs/${org}`); - if (!res.ok) { - throw new Error("Organization not found"); - } - const data = await res.json(); - setOrgData(data); - } catch (err: any) { - setError(err.message); +import { useRef } from "react"; + +const abortRef = useRef(null); + +const fetchOrg = async () => { + const orgName = org.trim(); + if (!orgName) return; + + abortRef.current?.abort(); + const controller = new AbortController(); + abortRef.current = controller; + + setLoading(true); + setError(""); + setOrgData(null); + + try { + const res = await fetch( + `https://api.github.com/orgs/${encodeURIComponent(orgName)}`, + { signal: controller.signal } + ); + + if (!res.ok) { + throw new Error("Organization not found"); } - setLoading(false); - }; + const data = await res.json(); + setOrgData(data); + } catch (err: unknown) { + if (err instanceof DOMException && err.name === "AbortError") return; + setError(err instanceof Error ? err.message : "Failed to fetch organization"); + } finally { + if (!controller.signal.aborted) setLoading(false); + } +}; return (

OrgExplorer

setOrg(e.target.value)} + + + setOrg(e.target.value)} style={{ padding: "10px", width: "250px", marginRight: "10px" }} /> @@ -49,7 +77,10 @@ function App() { {orgData && (
- + {`${orgData.login}{orgData.login}

{orgData.description}

Followers: {orgData.followers}

@@ -60,4 +91,4 @@ function App() { ); } -export default App; \ No newline at end of file +export default App; From 85c8978e2760d5047487df713426d23948a371c8 Mon Sep 17 00:00:00 2001 From: Sushmita Yadav Date: Sun, 22 Mar 2026 12:00:05 +0530 Subject: [PATCH 4/6] Update App.tsx --- src/App.tsx | 48 ++++++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index c0569d4..b6f34e2 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -14,13 +14,21 @@ function App() { const [loading, setLoading] = useState(false); const [error, setError] = useState(""); -import { useRef } from "react"; +import { useRef, useState } from "react"; const abortRef = useRef(null); const fetchOrg = async () => { const orgName = org.trim(); - if (!orgName) return; + const orgName = org.trim(); + +if (!orgName) { + abortRef.current?.abort(); // cancel previous request + setLoading(false); + setError(""); + setOrgData(null); + return; +} abortRef.current?.abort(); const controller = new AbortController(); @@ -60,14 +68,15 @@ const fetchOrg = async () => { setOrg(e.target.value)} - style={{ padding: "10px", width: "250px", marginRight: "10px" }} - /> - + id="org-input" + type="text" + placeholder="Enter GitHub org (e.g. google)" + value={org} + onChange={(e) => setOrg(e.target.value)} + style={{ padding: "10px", width: "250px", marginRight: "10px" }} +/> + + @@ -77,14 +86,17 @@ const fetchOrg = async () => { {orgData && (
- {`${orgData.login}{orgData.login} -

{orgData.description}

-

Followers: {orgData.followers}

-

Public Repos: {orgData.public_repos}

+ {`${orgData.login} + +

{orgData.login}

+

{orgData.description}

+

Followers: {orgData.followers}

+

Public Repos: {orgData.public_repos}

+
)}
From aa7d3eb2f9b09b90c6b1cbebffdf7a6a1d991ee3 Mon Sep 17 00:00:00 2001 From: Sushmita Yadav Date: Sun, 22 Mar 2026 12:12:43 +0530 Subject: [PATCH 5/6] Update App.tsx --- src/App.tsx | 131 ++++++++++++++++++++++++++-------------------------- 1 file changed, 65 insertions(+), 66 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index b6f34e2..a011f5d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -14,89 +14,88 @@ function App() { const [loading, setLoading] = useState(false); const [error, setError] = useState(""); -import { useRef, useState } from "react"; - -const abortRef = useRef(null); - -const fetchOrg = async () => { - const orgName = org.trim(); - const orgName = org.trim(); - -if (!orgName) { - abortRef.current?.abort(); // cancel previous request - setLoading(false); - setError(""); - setOrgData(null); - return; -} - - abortRef.current?.abort(); - const controller = new AbortController(); - abortRef.current = controller; - - setLoading(true); - setError(""); - setOrgData(null); - - try { - const res = await fetch( - `https://api.github.com/orgs/${encodeURIComponent(orgName)}`, - { signal: controller.signal } - ); - - if (!res.ok) { - throw new Error("Organization not found"); + const abortRef = useRef(null); + + const fetchOrg = async () => { + const orgName = org.trim(); + + // ✅ handle empty input properly + if (!orgName) { + abortRef.current?.abort(); + setLoading(false); + setError(""); + setOrgData(null); + return; } - const data = await res.json(); - setOrgData(data); - } catch (err: unknown) { - if (err instanceof DOMException && err.name === "AbortError") return; - setError(err instanceof Error ? err.message : "Failed to fetch organization"); - } finally { - if (!controller.signal.aborted) setLoading(false); - } -}; + abortRef.current?.abort(); + const controller = new AbortController(); + abortRef.current = controller; + + setLoading(true); + setError(""); + setOrgData(null); + + try { + const res = await fetch( + `https://api.github.com/orgs/${encodeURIComponent(orgName)}`, + { signal: controller.signal } + ); + + if (!res.ok) { + throw new Error("Organization not found"); + } + + const data = await res.json(); + setOrgData(data as GitHubOrg); + } catch (err: unknown) { + if (err instanceof DOMException && err.name === "AbortError") return; + setError(err instanceof Error ? err.message : "Failed to fetch organization"); + } finally { + if (!controller.signal.aborted) setLoading(false); + } + }; return (

OrgExplorer

+ {/* ✅ Accessible Label */} + + + {/* ✅ Input */} - GitHub organization - - - setOrg(e.target.value)} - style={{ padding: "10px", width: "250px", marginRight: "10px" }} -/> - - + id="org-input" + type="text" + placeholder="Enter GitHub org (e.g. google)" + value={org} + onChange={(e) => setOrg(e.target.value)} + style={{ padding: "10px", width: "250px", marginRight: "10px" }} + /> + + {/* ✅ Button */} + {/* ✅ Loading & Error */} {loading &&

Loading...

} {error &&

{error}

} + {/* ✅ Data Display */} {orgData && (
- {`${orgData.login} - -

{orgData.login}

-

{orgData.description}

-

Followers: {orgData.followers}

-

Public Repos: {orgData.public_repos}

- + {`${orgData.login} +

{orgData.login}

+

{orgData.description}

+

Followers: {orgData.followers}

+

Public Repos: {orgData.public_repos}

)}
From 0414e8abd1eb7d5d291cb7e9507b608250e33659 Mon Sep 17 00:00:00 2001 From: Sushmita Yadav Date: Sun, 22 Mar 2026 13:14:23 +0530 Subject: [PATCH 6/6] Update App.tsx fix: improve API error handling (status-based errors) --- src/App.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index a011f5d..ce70d90 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -42,9 +42,15 @@ function App() { { signal: controller.signal } ); - if (!res.ok) { - throw new Error("Organization not found"); - } + if (!res.ok) { + if (res.status === 404) { + throw new Error("Organization not found"); + } else if (res.status === 403) { + throw new Error("Rate limit exceeded. Please try again later."); + } else { + throw new Error(`Request failed (${res.status})`); + } +} const data = await res.json(); setOrgData(data as GitHubOrg);