Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
venv/
.venv/
__pycache__/
*.pyc
.env
temp/
chroma_db/
node_modules/
Comment on lines +1 to +8
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Ignore Wrangler’s generated workspace before merging.

.wrangler/tmp/** artifacts are already in this PR, and the checked-in bundles contain absolute /home/ghanshyam-singh/... imports. Please ignore .wrangler/ and remove the committed temp bundle from the branch so local wrangler dev/deploy runs stop churning machine-specific files in source control.

🧹 Minimal ignore fix
 chroma_db/
 node_modules/
+.wrangler/
📝 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
venv/
.venv/
__pycache__/
*.pyc
.env
temp/
chroma_db/
node_modules/
venv/
.venv/
__pycache__/
*.pyc
.env
temp/
chroma_db/
node_modules/
.wrangler/
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.gitignore around lines 1 - 8, The repo is missing ignore rules for
Wrangler's generated workspace and a committed temp bundle with absolute
machine-specific imports; update the .gitignore to add .wrangler/ and
.wrangler/tmp/** (or at least .wrangler/tmp/**) so Wrangler artifacts are
ignored, then remove the committed bundle from the branch history by deleting
the file from the index (git rm --cached <committed-bundle-path>) and commit the
removal so the temp bundle is no longer tracked; ensure no other absolute
`/home/...` imports remain in the tree before merging.

115 changes: 113 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,113 @@
# scholarai
AI-powered research assistant designed to help students and scientists navigate large volumes of academic literature. Supports paper discovery, summarization, citation exploration, and question answering across research papers. Helps organize knowledge, identify trends, and accelerate literature review workflows.
# ScholarAI

Open-source AI-powered research assistant by Alpha One Labs.
Ask research questions, summarise papers, discover literature, and generate reviews —
all powered by **Cloudflare Workers AI** (`@cf/meta/llama-3.1-8b-instruct`).

---

## Project Structure

```
scholarai/
├── src/
│ └── worker.py # Single Python Worker — routing + AI logic
├── static/
│ └── index.html # Full frontend (HTML/CSS/JS, no build step)
├── wrangler.jsonc # Cloudflare Workers config
├── package.json # npm scripts for Wrangler CLI
└── README.md
```
Comment on lines +11 to +20
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add a language to the project-tree fence.

Markdownlint is flagging this block with MD040. A simple text/plaintext language tag will keep the README green in CI.

📝 Minimal fix
-```
+```text
 scholarai/
 ├── src/
 │   └── worker.py       # Single Python Worker — routing + AI logic
 ├── static/
 │   └── index.html      # Full frontend (HTML/CSS/JS, no build step)
 ├── wrangler.jsonc       # Cloudflare Workers config
 ├── package.json         # npm scripts for Wrangler CLI
 └── README.md
</details>

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.21.0)</summary>

[warning] 11-11: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @README.md around lines 11 - 20, The README's project-tree fenced code block
is missing a language tag causing MD040; update the fence in README.md by adding
a language identifier (e.g., use "text" or "plaintext") immediately after the
opening triple backticks so the block becomes text ... to satisfy
markdownlint.


</details>

<!-- fingerprinting:phantom:medusa:grasshopper -->

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


---

## Quick Start

### Prerequisites

- [Node.js](https://nodejs.org/) ≥ 18
- A free [Cloudflare account](https://dash.cloudflare.com/sign-up)

### 1. Install Wrangler

```bash
npm install
npx wrangler login
```

### 2. Run locally

```bash
npm run dev
```

Opens at `http://localhost:8787`.

### 3. Deploy

```bash
npm run deploy
```

---

## API Endpoints

| Method | Endpoint | Description |
|--------|-----------------|-------------------------------|
| GET | `/` | Serves the frontend HTML |
| GET | `/api/health` | Health check |
| POST | `/api/ask` | Ask a research question |
| POST | `/api/summarize`| Summarise a paper |
| POST | `/api/discover` | Discover relevant papers |
| POST | `/api/review` | Generate a literature review |

### `POST /api/ask`

```json
{ "question": "What is transfer learning?", "context": "(optional excerpt)" }
```

### `POST /api/summarize`

```json
{ "title": "...", "abstract": "...", "content": "..." }
```

At least one field required.

### `POST /api/discover`

```json
{ "query": "graph neural networks", "fields": ["ML", "biology"], "limit": 10 }
```

### `POST /api/review`

```json
{ "topic": "self-supervised learning", "style": "comprehensive", "audience": "researchers" }
```

`style` options: `comprehensive`, `brief`, `systematic`

---

## Contributing

1. Fork the repo
2. Create a branch: `git checkout -b feat/your-change`
3. Commit and open a Pull Request with a clear description

Please open an issue first for large changes.

---

## License

See [LICENSE](LICENSE).

---

## Maintained by

**Alpha One Labs** — open-source AI tooling for practical research workflows.
Loading