From 4ab2822de940e2fde4c4df1c95dd363df05189c3 Mon Sep 17 00:00:00 2001 From: adishchowdhury Date: Tue, 6 Jan 2026 14:29:24 +0530 Subject: [PATCH 01/12] Add Contributors page for user submissions --- .../src/app/pages/Contributors.tsx | 183 ++++++++++++++++++ 1 file changed, 183 insertions(+) create mode 100644 LocalMind-Frontend/src/app/pages/Contributors.tsx diff --git a/LocalMind-Frontend/src/app/pages/Contributors.tsx b/LocalMind-Frontend/src/app/pages/Contributors.tsx new file mode 100644 index 0000000..daa439b --- /dev/null +++ b/LocalMind-Frontend/src/app/pages/Contributors.tsx @@ -0,0 +1,183 @@ +import React, { useMemo, useState } from "react"; +import { CONTRIBUTORS, type Contributor } from "../../data/contributors"; +import "./contributors.css"; + +const REPO_ISSUE_NEW_URL = "https://github.com/NexGenStudioDev/LocalMind/issues/new"; + +function enc(s: string) { + return encodeURIComponent(s); +} + +function buildNewIssueUrl(c: Contributor) { + const title = `Add contributor: ${c.name}`; + + const body = +`Hi maintainers, +Please add me to the Contributors page. + +Name: ${c.name} +Email: ${c.email} +GitHub: ${c.github} +LinkedIn: ${c.linkedin} +Bio: ${c.bio} +Area of contribution (optional): ${c.area ?? ""} +Tags (optional): ${(c.tags ?? []).join(", ")} + +Notes: +- Beginners are welcome. +- No contribution is too small. +`; + + return `${REPO_ISSUE_NEW_URL}?title=${enc(title)}&body=${enc(body)}`; +} + +export default function ContributorsPage() { + const [name, setName] = useState(""); + const [email, setEmail] = useState(""); + const [github, setGithub] = useState(""); + const [linkedin, setLinkedin] = useState(""); + const [bio, setBio] = useState(""); + const [area, setArea] = useState(""); + const [tags, setTags] = useState(""); + + const list = useMemo(() => CONTRIBUTORS, []); + + const issueUrl = useMemo(() => { + const c: Contributor = { + name: name.trim(), + email: email.trim(), + github: github.trim(), + linkedin: linkedin.trim(), + bio: bio.trim(), + area: area.trim() || undefined, + tags: tags + .split(",") + .map((t) => t.trim()) + .filter(Boolean), + }; + + const requiredOk = + c.name && c.email && c.github && c.linkedin && c.bio; + + return requiredOk ? buildNewIssueUrl(c) : ""; + }, [name, email, github, linkedin, bio, area, tags]); + + return ( +
+
+

Contributors

+

+ This project grows because people like you show up and help. + Beginners are welcome, and no contribution is too small. +

+
+ +
+

People who contributed

+
+ {list.map((c) => ( + + ))} +
+
+ +
+

How to become a contributor

+
    +
  • Pick an issue labeled “good first issue” (or any small task).
  • +
  • Fork the repo, create a new branch, and make a focused change.
  • +
  • Open a pull request and describe what you changed and why.
  • +
  • Ask questions—collaboration helps everyone grow.
  • +
+
+ +
+

Add your details

+

+ Fill the fields below and click “Create request”. + It will open a GitHub issue with your details prefilled. +

+ +
+ + + + + + + + +