Skip to content

AI writing SaaS

ResearcherAI

ResearcherAI is a complete SaaS product for academic writing: user accounts, a research paper editor, AI writing tools powered by Google Gemini, document upload, credit-based billing and online payments. It covers the full set of pieces a paid SaaS needs, not just the AI feature.

Role
Full-stack development
Status
Deployed as a working SaaS with payments enabled.
ResearcherAI landing page: 'Write research papers faster with academic-grade AI assistance' with four tool cards

The problem

Writing a research paper means structuring sections, keeping an academic tone, formatting citations correctly and rewording text without changing its meaning. General-purpose chat tools do not understand paper structure or citation formats, and they give users no way to keep their work organised by paper and section.

Approach

I built the product around a section-based paper editor, so AI output lands in a specific part of a specific paper. Each AI tool — section generation, improve and rewrite, paraphrasing, citation generation — costs a set number of credits, which keeps usage predictable for users and model costs controlled for the product.

What I built

  • Section generator for abstract, problem statement, methodology, related work, results and conclusion
  • Improve and rewrite tool with selectable academic format and goal
  • Paraphrasing tool with tone options
  • Citation generator for IEEE, Springer and ACM formats
  • PDF and DOCX draft upload with text extraction
  • Credit balance, usage history and credit purchases through PayHere

Architecture

Next.js 14 App Router with React Server Components and TypeScript. PostgreSQL with Prisma ORM for users, papers, sections and credit transactions. Google Gemini for generation, AWS S3 for uploaded documents, and the PayHere payment gateway for credit purchases. Serverless API routes validate input and apply rate limits before any model call.

Next.js 14TypeScriptGoogle GeminiPostgreSQLPrismaAWS S3PayHereTailwind CSS

Key decisions

Credits instead of a flat subscription

AI generation has a real per-request cost. Pricing each tool in credits ties what users pay to what they use, and makes heavier operations like section generation cost more than a single citation.

Validation and rate limiting before the model

Every AI route validates input and enforces limits first, which protects both the credit balance and the model budget from malformed or abusive requests.

Uploaded drafts treated as untrusted data

Text extracted from uploaded PDFs and DOCX files is passed to the model as context, not as instructions, which reduces the risk of uploaded content steering the output.

Screens

ResearcherAI dashboard showing available credits, the citation generator, paraphrasing tool and a PayHere credit purchase panel
Dashboard with credit balance, tools and credit purchases.
ResearcherAI research paper editor with a section generation form and tabs for abstract, methodology, results and conclusion
Section-based paper editor.

Related services

Planning something similar?

If you are building a ai writing saas or something close to it, tell me about it. I will share how I would approach it and what would affect the scope.