Skip to content

Latest commit

 

History

History
79 lines (56 loc) · 3.21 KB

File metadata and controls

79 lines (56 loc) · 3.21 KB

Contributing to Compilo

Thanks for your interest. Contributions of all sizes are welcome.

Getting started

git clone https://github.com/sdesaurabh/compilo
cd compilo
npm install
cp .env.example .env   # add ANTHROPIC_API_KEY
npm run dev            # backend :3001, frontend :5173

Open http://localhost:5173. The frontend dev server proxies all /api requests to the backend automatically.

How to contribute

  1. Fork the repo and create a branch from main
  2. Make your change — keep it focused, one thing per PR
  3. Test manually — see the test checklist below
  4. Open a pull request — describe what you changed and why

Manual test checklist

Before opening a PR, verify the core pipeline still works end-to-end:

  • Upload a PDF → article compiled, appears in Wiki
  • Upload a DOCX or XLSX → article compiled
  • Ingest a URL → article compiled, links panel appears
  • Paste text → article compiled
  • Search for an article by keyword
  • Ask a question → answer with citations → appears in history
  • Download a Q&A answer as .md
  • Open the Knowledge Graph — nodes labelled, hover highlights work
  • Run a Health Check
  • Delete an article via the Article page and via the Wiki card
  • Delete a source in History → article disappears everywhere

What to work on

  • Issues labeled good first issue are good starting points
  • Check docs/ROADMAP.md for planned v2 features
  • Bug fixes and documentation improvements are always welcome

Code guidelines

  • Keep PRs small. One feature or fix per PR.
  • Don't break existing behaviour. The compile → wiki → Q&A pipeline must keep working.
  • No new dependencies without discussion. Open an issue first if your change needs a new npm package.
  • Follow existing code style. No linter is enforced — just match the surrounding code.
  • Backend errors should always return { error: string } JSON. Never let stack traces reach the client.
  • Frontend errors should show user-friendly messages. Never display raw err.message from the server.

Adding a new file type

  1. Add the extension to ALLOWED_EXTENSIONS in backend/routes/upload.js
  2. Add a case to parseFile() in backend/services/fileParser.js
  3. Add the accept type to ACCEPT in frontend/src/components/Uploader.jsx
  4. Add a FileTypeBadge case in frontend/src/pages/History.jsx

Adding a new URL source

  1. Add a detector (isMySourceUrl) and extractor (extractMySourceContent) in backend/routes/ingest.js
  2. Add the mimeType string (e.g. text/mysource)
  3. Add a platform pill to frontend/src/components/URLIngestor.jsx
  4. Add a FileTypeBadge case in frontend/src/pages/History.jsx

Reporting bugs

Use the bug report template. Include steps to reproduce, expected behaviour, and actual behaviour.

Suggesting features

Use the feature request template. Check docs/ROADMAP.md first — it might already be planned.

Questions

Open a GitHub Discussion for anything that isn't a bug or feature request.