Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Research Writing Studio

A 100% local, privacy-focused AI writing assistant for researchers, graduate students, and academic writers.

✨ Features

  • Humanizer — Rewrite AI-generated text to sound natural
  • Academic Rewrite — Convert text to IEEE/APA/Journal quality
  • Grammar Assistant — Fix grammar, punctuation, and style
  • Paraphraser — Rephrase with multiple modes
  • Summarizer — Condense documents to key points
  • Research Helper — Generate research questions, objectives, novelty statements and more
  • AI Writeup — Generate a full write-up from a topic or outline
  • Documents — Extract text from a .docx, or rewrite a whole document paragraph by paragraph with its styling intact
  • Model Manager — Connect to any local AI provider (Ollama, LM Studio), or use Demo mode with no model at all
  • History — Every generation, searchable, exportable, deletable
  • Export — Download results as .docx, .md, or .txt

All text tools stream their output token-by-token, so results appear as the model writes them and can be stopped mid-generation.

🎛 Options that actually do something

Each module's system prompt lives in backend/prompts/ as editable Markdown and defines its own option vocabulary — what Strength: High means for the Humanizer, what Mode: IEEE means for Academic Rewrite, how long a Short summary is. The selected values are appended to the prompt at request time, followed by a shared output contract that stops smaller models from adding "Here is the rewritten text:".

Edit any .md file in backend/prompts/ to tune behaviour — no code change, no restart beyond the reloader. If you add a new dropdown option in the UI, define it in the matching prompt file; backend/tests/test_prompts.py fails if you forget.

Model size matters

The full prompts run 600–1100 tokens. A model needs roughly 7B parameters to follow them; below about 3B it tends to continue a long structured prompt rather than execute it, echoing the instructions back instead of doing the work.

Short-form versions live in backend/prompts/compact/ and are selected automatically when the loaded model reports fewer than 3B parameters. Override this under Settings → Prompt Detail. The app shows a banner whenever a small model is loaded, so unchanged-looking output is never a mystery.

Recommended: ollama pull qwen2.5:7b (or larger, with a GPU).

🚀 Quick Start

Requirements

  • Python 3.10+
  • Node.js 18+
  • Ollama (or any OpenAI-compatible local server)

1. Start both servers (Windows)

start.bat

2. Manual startup

Backend:

cd backend
.\venv\Scripts\activate
uvicorn main:app --reload

Frontend:

cd frontend
npm run dev

3. Open in browser

🧠 Setting up a Model

  1. Install Ollama and pull a model:
    ollama pull qwen2.5:8b
  2. In the RWS app, go to Model Manager
  3. Set provider to Ollama, endpoint to http://localhost:11434, and enter model name qwen2.5:8b
  4. Click Connect & Load

To try the interface without installing anything, pick Demo mode in the provider dropdown — it returns canned sample text.

🧪 Tests

cd backend
.\venv\Scripts\activate
pytest

Tests run against a throwaway SQLite file and the deterministic mock provider, so they never touch rws.db or require a model.

📁 Project Structure

ResearchWritingStudio/
├── backend/
│   ├── api/           # FastAPI routes
│   ├── database/      # SQLite + SQLAlchemy
│   ├── manager/       # AI Model Manager, providers, DOCX handling
│   │   └── providers/ # Ollama, LM Studio, Demo adapters
│   ├── prompts/       # Editable system prompts (.md)
│   │   └── compact/   # Short-form variants for small models
│   ├── tests/         # pytest suite
│   └── main.py        # App entrypoint
├── frontend/
│   └── src/
│       ├── components/ # Layout components
│       ├── pages/      # Feature module pages
│       ├── hooks/      # useProcessStream (streaming generations)
│       └── lib/        # API client + theme
└── start.bat          # Windows launcher

🔒 Privacy

All processing is done locally. No data is sent to external servers. Your documents stay on your machine.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages