Skip to content

docs: improve setup & contributing guide and add .env.example files#132

Open
Sarthakkad05 wants to merge 20 commits intoAOSSIE-Org:mainfrom
Sarthakkad05:docs/setup-cleanup
Open

docs: improve setup & contributing guide and add .env.example files#132
Sarthakkad05 wants to merge 20 commits intoAOSSIE-Org:mainfrom
Sarthakkad05:docs/setup-cleanup

Conversation

@Sarthakkad05
Copy link

@Sarthakkad05 Sarthakkad05 commented Feb 2, 2026

Fixes #126

This PR improves onboarding and documentation:

  • Added comprehensive README with setup guide
  • Added frontend/backend .env.example files
  • Added CONTRIBUTING.md
  • Added CODE_OF_CONDUCT.md to align with organization guidelines and community standards
  • Added ARCHITECTURE.md to provide contributors with a clear overview of the system design

These changes make it easier for new contributors to understand the project structure and get started quickly.

Summary by CodeRabbit

  • Documentation
    • Added comprehensive architecture documentation with system component diagrams and data flow specifications.
    • Updated README with streamlined technical overview and links to detailed guides.
    • Introduced contributor code of conduct and contribution guidelines.
    • Added configuration file templates for development setup.

This document outlines the architecture and data flow of the Perspective application, detailing the client-server model, AI services, and data storage components.
This document outlines the Contributor Covenant Code of Conduct, detailing the community's pledge, standards, enforcement responsibilities, and consequences for violations.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 2, 2026

📝 Walkthrough

Walkthrough

This PR introduces comprehensive documentation and configuration guidance for the Perspective project. New files include ARCHITECTURE.md (with system design diagrams), CODE_OF_CONDUCT.md (contributor standards), CONTRIBUTING.md (setup and contribution workflow), and .example.env files for backend and frontend environments. README.md is restructured to serve as a condensed overview linking to detailed documentation.

Changes

Cohort / File(s) Summary
Documentation & Architecture
ARCHITECTURE.md, README.md, CODE_OF_CONDUCT.md
Added ARCHITECTURE.md with Mermaid diagrams documenting client-server-AI-vector flow and component interactions. Restructured README.md from narrative format to concise, tech-stack-centric overview with links to detailed docs. Introduced CODE_OF_CONDUCT.md with Contributor Covenant standards.
Contribution Guidelines
CONTRIBUTING.md
New file with onboarding instructions, project setup steps for frontend (Next.js) and backend (FastAPI + uv), environment variable configuration, and PR workflow guidance.
Environment Configuration
backend/.example.env, frontend/.example.env
Added .example.env files in backend and frontend directories containing placeholder environment variables (GROQ_API_KEY, PINECONE_API_KEY, PORT, SEARCH_KEY, NEXT_PUBLIC_API_URL) with inline comments.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A warren of docs, now so neat and bright,
With ARCHITECTURE maps and CODE_OF_CONDUCT right!
.env blueprints guide the way,
Contributing's smooth—hop in and stay!
From chaos to clarity, what a delightful sight! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: documentation improvements (setup & contributing guide) and addition of .env.example files, which directly align with the PR's primary objectives.
Linked Issues check ✅ Passed The PR addresses all key requirements from issue #126: comprehensive README updates, CONTRIBUTING.md guide, backend .env.example file with environment variables and comments, and additional documentation (ARCHITECTURE.md, CODE_OF_CONDUCT.md).
Out of Scope Changes check ✅ Passed All changes are directly scoped to documentation and configuration files specified in issue #126; no unrelated code changes or out-of-scope modifications were introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 Fix all issues with AI agents
In `@backend/.example.env`:
- Around line 1-4: Add inline comments to the .env example explaining each
variable and how to obtain or generate the required values: annotate
GROQ_API_KEY with its purpose (Sanity/Groq API access) and where to get it,
PINECONE_API_KEY with Pinecone account/console steps, PORT with server binding
note and default, and SEARCH_KEY with Google Custom Search Engine / API key
acquisition and CSE ID if applicable; ensure each comment is concise, placed on
the same line as the variable, and uses consistent tone and formatting so new
contributors can quickly configure their environment.
- Around line 1-4: Add the missing OPENAI_API_KEY entry to the example env so it
matches CONTRIBUTING.md: insert a new variable line
OPENAI_API_KEY=<your_openai_api_key> into the .env example alongside
GROQ_API_KEY, PINECONE_API_KEY, PORT, and SEARCH_KEY; ensure the variable name
exactly matches OPENAI_API_KEY used in CONTRIBUTING.md and any runtime config so
contributors see consistent required keys.

In `@CONTRIBUTING.md`:
- Line 65: The copy command in CONTRIBUTING.md uses the wrong source filename;
change the shell command that currently references ".env.example" to use the
actual backend env filename ".example.env" so the step (cp .env.example .env)
succeeds—update the line in CONTRIBUTING.md accordingly.

In `@frontend/.env.example`:
- Line 1: Add inline comments to the .env.example by annotating each environment
variable with a short description; for example, document NEXT_PUBLIC_API_URL to
explain it is the frontend-accessible base URL for the backend API (used by
client-side fetches) and note expected formats (e.g., http://localhost:8000 or
https://api.example.com) and when to change it for production. Update the
NEXT_PUBLIC_API_URL entry in the file (and any other variables present) to
include these concise inline explanations next to the variable names.

In `@README.md`:
- Line 10: Update the broken link in README.md: replace the incorrect link
target "./CONTRIBUTING.md" with "./ARCHITECTURE.md" for the sentence that
references "ARCHITECTURE.md" so the displayed text and the href match; ensure
the markdown link text remains "ARCHITECTURE.md" and only the URL portion is
changed.
- Line 7: The Discord badge image tag in the README is missing alt text which
harms accessibility; update the <img> element (the Discord badge image) to
include a meaningful alt attribute (e.g., alt="Join our Discord community") so
screen readers can describe the image, ensuring the anchor and image structure
(<a href="https://discord.gg/hjUhu33uAn"><img ...></a>) remains unchanged aside
from adding the alt text.
🧹 Nitpick comments (2)
backend/.example.env (1)

1-4: Standardize placeholder format for consistency.

The placeholder values use inconsistent formats: <groq_api_key>, <your_pinecone_API_KEY>, and <your_Google_custom_search_engine_API_key>. Standardizing to a consistent pattern like <your_service_api_key> improves readability and professionalism.

CONTRIBUTING.md (1)

68-75: Add brief explanations for each API key.

To align with issue #126's goal of reducing onboarding friction, consider adding a brief note explaining what each API key is used for and where to obtain it. This complements the inline comments that should be added to the .example.env file itself.

📚 Example enhancement
 4. Fill required keys:
 ```bash
-OPENAI_API_KEY=
-GROQ_API_KEY=
-PINECONE_API_KEY=
-SEARCH_KEY=
+# Get these API keys from:
+# - OpenAI/Groq: For LLM inference → console.groq.com or platform.openai.com
+# - Pinecone: For vector database → app.pinecone.io
+# - Google Custom Search: For fact-checking → console.cloud.google.com
+
+OPENAI_API_KEY=<your_key_here>
+GROQ_API_KEY=<your_key_here>
+PINECONE_API_KEY=<your_key_here>
+SEARCH_KEY=<your_key_here>
 PORT=8000
</details>

</blockquote></details>

</blockquote></details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

README.md Outdated

## Setup & Deployment
1. First, join the **[Discord Server](https://discord.gg/hjUhu33uAn) (Go to Projects->Perspective)** to chat with everyone.
2. For detailed setup instructions, coding guidelines, and the contribution process, please check out our [ARCHITECTURE.md](./CONTRIBUTING.md) file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fix broken link to ARCHITECTURE.md.

The text says "ARCHITECTURE.md" but the link points to ./CONTRIBUTING.md. This will send users to the wrong document.

🔗 Proposed fix
-2. For detailed setup instructions, coding guidelines, and the contribution process, please check out our [ARCHITECTURE.md](./CONTRIBUTING.md) file.
+2. For detailed setup instructions, coding guidelines, and the contribution process, please check out our [CONTRIBUTING.md](./CONTRIBUTING.md) file. For architecture details, see [ARCHITECTURE.md](./ARCHITECTURE.md).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
2. For detailed setup instructions, coding guidelines, and the contribution process, please check out our [ARCHITECTURE.md](./CONTRIBUTING.md) file.
2. For detailed setup instructions, coding guidelines, and the contribution process, please check out our [CONTRIBUTING.md](./CONTRIBUTING.md) file. For architecture details, see [ARCHITECTURE.md](./ARCHITECTURE.md).
🤖 Prompt for AI Agents
In `@README.md` at line 10, Update the broken link in README.md: replace the
incorrect link target "./CONTRIBUTING.md" with "./ARCHITECTURE.md" for the
sentence that references "ARCHITECTURE.md" so the displayed text and the href
match; ensure the markdown link text remains "ARCHITECTURE.md" and only the URL
portion is changed.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@README.md`:
- Around line 1-127: Add a "Getting Started" (or "Quick Start") section to
README.md under the project description that lists prerequisites (Node.js,
Python, API keys), notes the new .example.env files included in this PR, and
provides concise setup steps: clone repo, copy .example.env -> .env, install
frontend deps with npm and backend deps with pip/poetry, then run the frontend
(Next.js) and backend (uvicorn/FastAPI) dev servers; end the section with a link
to CONTRIBUTING.md for full instructions. Reference the README's top-level
"Perspective" header and the existing CONTRIBUTING.md link so reviewers can
locate the change and verify the .example.env mention.
🧹 Nitpick comments (2)
README.md (2)

16-34: Consider consolidating redundant architecture information.

The architecture component sections here (Frontend, Backend, AI & NLP, Data & Storage) overlap significantly with the Technical Stack table on lines 48-121. Both present the same technologies in different formats, creating maintenance overhead—any stack changes require updates in two places.

Consider keeping just one format:

  • Option 1: Keep the descriptive sections (lines 16-34) for better context and remove the table
  • Option 2: Keep the table (cleaner, scannable) and remove these sections
  • Option 3: Move these detailed descriptions to ARCHITECTURE.md and keep only the table in README

37-37: Remove unnecessary HTML spacing entities.

Line 37 contains &nbsp;&nbsp; entities that appear to be leftover formatting artifacts. These don't serve a purpose in markdown and can be removed for cleaner source.

@Sarthakkad05
Copy link
Author

All review suggestions addressed. Ready for review. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add comprehensive README and .env.example files

1 participant