Skip to content

Its-Itachi/Smart-Office

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📄 Smart Office | Offline Document Editor with Voice Input

Smart Office is an offline-first, browser-based document creation system with real-time speech-to-text and PDF export.
Built for secure/air-gapped environments where cloud services are not an option.


🎥 Demo Video

Smart-Office.mp4

🧠 System Overview

  • Architecture: Client-Server over LAN (fully offline)
  • Backend: Node.js + Express + SQLite
  • Frontend: React + TipTap (ProseMirror)
  • Voice Input: Web Speech API (8 languages)
  • Export: PDF via browser print

✨ Key Features

  • 📝 Rich Text Editor
    Google Docs-like editing with bold, italic, headings, lists, and text alignment.

  • 🎤 Voice Input
    Real-time speech-to-text transcription supporting 8 languages.

  • 📋 Document Templates
    Pre-built templates: Official Letter, Meeting Notes, Project Report, Memo.

  • 📥 PDF Export
    Export any document to PDF for printing or sharing.

  • 🔒 Offline-First
    Works entirely on LAN with zero internet dependency.

  • 💾 Persistent Storage
    SQLite database for reliable document persistence.


⚙️ Design Highlights

  • JSON document model (not HTML) for ML-friendly structure
  • WebSocket-ready architecture for real-time STT streaming
  • Template system with placeholder text that auto-disappears
  • Modular component architecture for easy extension
  • ACID-compliant local storage

🛠 Tech Stack

Layer Tools Used
Backend Node.js, Express
Database SQLite (sql.js)
Frontend React, Vite
Editor TipTap (ProseMirror)
Voice Web Speech API
Export Browser Print API
Language JavaScript

🚀 How to Run Locally

1️⃣ Clone the repository

git clone https://github.com/Its-Itachi/Smart-Office.git
cd Smart-Office

2️⃣ Start Backend Server

cd server
npm install
npm start

Server runs at: http://localhost:3001

3️⃣ Start Frontend (New Terminal)

cd client
npm install
npm run dev

Application UI: http://localhost:3000


▶️ Using the Application

  1. Open http://localhost:3000 in Chrome/Edge (recommended for voice)
  2. Click + New or 📋 Use Template to create a document
  3. Edit using the rich text toolbar
  4. Click Record to dictate via voice
  5. Click 💾 Save to persist to database
  6. Click 📥 PDF to export for printing

📋 Available Templates

Template Use Case
Official Letter Formal correspondence with sender/receiver blocks
Meeting Notes Structured minutes with attendees, agenda, action items
Project Report Status report with progress, risks, recommendations
Internal Memo Office memo with TO/FROM/DATE/SUBJECT header
Blank Document Clean slate for free-form writing

📁 Project Structure

Smart-Office/
├── docs/
│   └── DESIGN.md       # Full system design document
├── server/
│   ├── server.js       # Express API + SQLite
│   └── package.json
├── client/
│   ├── src/
│   │   ├── App.jsx           # Main application
│   │   ├── templates.js      # Document templates
│   │   └── components/
│   │       ├── Editor.jsx        # TipTap editor
│   │       └── VoiceRecorder.jsx # Speech-to-text
│   └── package.json
└── README.md

📖 API Reference

Method Endpoint Description
GET /api/documents List all documents
POST /api/documents Create new document
GET /api/documents/:id Get single document
PUT /api/documents/:id Update document
DELETE /api/documents/:id Delete document
GET /api/health Server health check

🔮 Future Improvements

  • Server-side Vosk/Whisper for true offline STT
  • Multi-user authentication
  • Real-time collaboration (CRDT)
  • Document versioning & history
  • DOCX export support
  • Admin template editor UI

👤 Author

Jayesh Dethe

GitHub: https://github.com/Its-Itachi


📝 Notes

  • See docs/DESIGN.md for detailed system design covering all architecture decisions
  • Designed for secure offline environments with no cloud dependency
  • Voice input works best in Chrome/Edge browsers

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.


Happy coding! 🚀

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors