Skip to content

Repository files navigation

Code2Docx

A web tool to build code question documents and export them as PDF or DOCX. Designed for students and educators to quickly assemble lab/assignment submissions with formatted code blocks and rendered output previews.

How It Works

  1. Document Info — Fill in title, subject, name, roll number, and date.
  2. Add Blocks — Add question blocks (with code files) or free-text blocks.
  3. Attach Code Files — Each question can have multiple files (HTML, CSS, JS, etc.). Files are combined to render a live output preview.
  4. Export — Hit Export PDF or Export DOCX to download a formatted document with code listings and output screenshots.

Libraries Used

Library Purpose
Next.js React framework (app router, build tooling)
React UI component library
Tailwind CSS Utility-first styling
docx Generates .docx Word documents in the browser
jsPDF Client-side PDF generation
html2canvas Renders HTML/CSS output to canvas for screenshots
file-saver Triggers browser file downloads
Sonner Toast notifications

Getting Started

# Install dependencies
npm install

# Start dev server
npm run dev

# Production build
npm run build
npm start

Open http://localhost:3000 to use the app.

About

college project lol

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages