We welcome contributions of all kinds! Whether you are fixing a bug, adding a new LangGraph node, expanding frontend visualization features, improving documentation, or adding localized translations, your help is appreciated.
If you have questions, feedback, or want to discuss ideas before building:
- AOSSIE Discord Server: https://discord.gg/hjUhu33uAn
- Discord Channel: #perspective (join the server first; the channel link only opens for members)
- Official Repository: https://github.com/AOSSIE-Org/Perspective
- Node.js:
v22or higher (matches CI) - Python:
3.13or higher - uv: Python package manager (https://docs.astral.sh/uv/)
git clone https://github.com/AOSSIE-Org/Perspective.git
cd Perspectivecd frontend
npm install
npm run devOpen http://localhost:3000 to view the application.
cd backend
cp .env.example .env
# Fill in your GROQ_API_KEY and PINECONE_API_KEY in .env
uv sync --no-build-isolation
uv run main.pyThe FastAPI backend runs on http://localhost:8000.
- Create a Feature Branch:
git checkout -b feature/your-feature-name
- Quality Checks:
Run the same checks as CI before submitting:
For backend changes:
cd frontend npm run lint npx tsc --noEmit npm run test:coverage # Vitest; fails below 90% coverage npm run build # static export to frontend/out
cd backend uv run pytest --cov # pytest; fails below 90% coverage
- Include tests: every pull request that adds or changes functionality must add or update tests, as described in the Testing Policy.
- Commit Messages:
Use clear, descriptive commit messages following Conventional Commits (e.g.,
feat: add preset topic card,fix: header logo alignment). - Developer Certificate of Origin (DCO):
Ensure your commits adhere to our
DCO.md.
All new functionality, in the frontend and the backend, must include tests in the automated test suites, and bug fixes should add a test that fails without the fix. Pull requests that add behaviour without tests will not be merged.
| Part | Tests live in | Run locally | Framework |
|---|---|---|---|
| Frontend | frontend/tests/ |
npm test in frontend/ (npm run test:coverage for the CI coverage check) |
Vitest |
| Backend | backend/tests/ |
uv run pytest in backend/ (uv run pytest --cov for the CI coverage check) |
pytest |
- Coverage is measured on the whole code base and must stay at or above 90% (lines, branches, functions and statements) in both parts. A new page, component, hook or module is counted automatically, so it needs its own tests.
- Frontend: coverage includes everything under
app/,components/,hooks/,config/,i18n/andlib/. The only exclusions are type declarations and shadcn/ui primitives that nothing imports, listed with their reasons infrontend/vitest.config.mts; when you start using one of those primitives, remove it from the list and test it. Render components with React Testing Library inside the real message catalogs (renderWithIntlinfrontend/tests/helpers/intl.tsx), assert what the reader sees and can do, and mock only what jsdom cannot do (shared mocks are infrontend/tests/setup.ts). Prefer fast-check property tests where the input space is large. - Backend: tests must not need API keys or network access.
backend/tests/conftest.pysets placeholder API keys, fakes Pinecone, the embedding model and NLTK downloads, and blocks DNS lookups and outbound connections; use its fixtures (fake_chat_clientfor Groq,fake_indexfor Pinecone,resolve_hostsfor DNS) andmonkeypatchfor other external calls. Coverage coversapp/andmain.py([tool.coverage.*]inbackend/pyproject.toml); use Hypothesis property tests where the input space is large. - CI enforces both suites:
frontend-ci.ymlruns lint, type-check, the Vitest suite with coverage and the build on changes tofrontend/, andbackend-ci.ymlruns the pytest suite with coverage on changes tobackend/. Pull requests are merged only when these checks pass.
- Next.js App Router: Use React Server Components by default. Use
"use client"only for interactive stateful components. - Design System: Use semantic CSS variables (
bg-background,text-foreground,bg-card). Avoid ad-hoc inline dark classes. - Internationalization (i18n): User-visible strings should be added to catalog files in
frontend/messages/en.jsonandfrontend/messages/hi.json. Use navigation helpers fromfrontend/i18n/navigation.ts. - No magic constants: the backend URL, endpoints and timeouts live in
frontend/config/api.ts; the site URL and public pages infrontend/config/site.ts. - Static export: the frontend is deployed to GitHub Pages as static HTML, so do not add server-only features (
redirects(), route handlers, cookies, middleware). - Zero TODOs Policy: Ensure all code, documentation, and metadata files contain no remaining
TODOplaceholders.
Thank you for contributing to AOSSIE & Perspective!