Skip to content

Sharmil001/note4doc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

47 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

web-logo

Note For Doc (Note4Doc)

⚑ This project implements a Patient Case Notes System designed for NHS doctors to:

Manually type patient case notes. Upload scanned case notes (images or PDFs, handwritten or typed) that are automatically transcribed using OCR/AI

✨ Features

πŸ“ Case Notes Input

  • Manual entry: Doctors can type patient case notes easily through a user-friendly web interface.
  • Scanned uploads: Support for uploading scanned case notes in image (JPEG, PNG) and PDF formats.

πŸ€– OCR & AI Transcription

  • Automatic transcription of scanned documents using OCR engines like Tesseract.
  • Structured text extraction to convert handwritten or typed notes into editable and searchable text.

πŸ’Ύ Scalable Storage & Retrieval

  • Efficient storage of both raw files and processed text in a relational database (PostgreSQL).
  • Fast retrieval APIs to access patient notes anytime.

πŸ› οΈ Developer Experience

  • TypeScript-first development
  • Monorepo structure with Node workspaces
  • Beautiful, responsive design built with Tailwind CSS and Shadcn UI

πŸš€ Quick Start

Prerequisites

  • Node.js 16+
  • Npm/Bun

Installation

  1. Clone the repository
    https://github.com/Sharmil001/lief-assignment.git
    cd lief-assignment
  1. Install dependencies
    cd frontend && npm install
    cd backend && npm install 
  1. Run the interpreter
    npm run dev #root

βš™οΈ Environment Variables Setup

Backend .env

Create a .env file inside the backend folder with the following variables:

APP_FRONTEND_ENDPOINT=""         # URL of the frontend application
APP_DB_PASSWORD=""              # Database password
APP_DB_HOST=""                   # Database host address
APP_DB_NAME=""                   # Database name
APP_DB_PORT=""                   # Database port
APP_DB_SSL=""                    # Enable SSL for DB connection (true/false)
APP_DB_USER=""                   # Database username
APP_DATABASE_CONNECTION=""       # Full database connection string (optional)
APP_PORT=""                  # Backend server port
APP_PERPLEXITY_API_KEY=          # API key for Perplexity AI service
APP_JWT_SECRET=                  # Secret key for JWT authentication
APP_NODE_ENV=                    # Environment (development/production)

Frontend .env

Create a .env file in the frontend folder with the following variables:

NEXT_PUBLIC_API_URL="" #Backend API endpoint

πŸ—οΈ Project Structure

lief-assignment/
β”œβ”€β”€ backend/                  # Node.js/Express backend service(s)
β”‚   β”œβ”€β”€ src/                  # Backend source code
β”‚   β”œβ”€β”€ tests/                # Backend tests
β”‚   β”œβ”€β”€ .env                  # Backend environment variables
β”‚   β”œβ”€β”€ drizzle.config.ts     # Drizzle ORM configuration for backend
β”‚   β”œβ”€β”€ tsconfig.json         # TypeScript config for backend
β”‚   └── package.json          # Backend dependencies & scripts
β”œβ”€β”€ frontend/                 # React/Next.js frontend application
β”‚   β”œβ”€β”€ components/           # Reusable UI components
β”‚   β”œβ”€β”€ pages/                # Next.js pages or React views
β”‚   β”œβ”€β”€ public/               # Static assets like images, icons, fonts
β”‚   β”œβ”€β”€ .env                  # Frontend environment variables
β”‚   β”œβ”€β”€ tsconfig.json         # TypeScript config for frontend
β”‚   └── package.json          # Frontend dependencies & scripts
β”œβ”€β”€ shared/                   # Shared code across backend and frontend
β”‚   β”œβ”€β”€ utils/                # Helper functions/utilities
β”‚   └── types/                # Shared TypeScript types & interfaces
β”œβ”€β”€ scripts/                  # Helper scripts (e.g., build, deploy, setup)
β”œβ”€β”€ .gitignore                # Git ignore rules
β”œβ”€β”€ README.md                 # Project README file
└── package.json              # Root-level dependencies & workspace config (lint, format, etc.)

🎯 Key Technologies

Frontend

  • Next 15 β€” latest Next.js with concurrent features for optimal performance and scalability.
  • React Hook Form 7 - Modern, performant form management library
  • Tailwind CSS - Utility-first CSS framework
  • Shadcn UI - Beautiful component library

Backend

  • Node - Fast JavaScript runtime
  • Express - Web framework for building APIs
  • Drizzle ORM - Type-safe database queries
  • PostgreSQL - open-source relational database
  • tesseract - OCR engine integrated for text recognition
  • pdf2pic & PDF Parser - Tools to convert and parse PDF files

AI Integration

  • Perplexity SDK - Unified AI interface for accessing multiple AI providers seamlessly
  • Streaming - Real-time text formater & streaming interactive AI response

🌐 Deployment

Frontend (Vercel)

Build the frontend

cd frontend
npm run build

###Backend (Render) Build the backend

cd backend
npm run build

Made with ❀️ by the Sharmil Adroja


Screenshots

Screenshot 2025-08-11 at 10 32 16β€―AM Screenshot 2025-08-11 at 10 33 08β€―AM Screenshot 2025-08-11 at 4 04 03β€―PM Screenshot 2025-08-11 at 10 34 09β€―AM Screenshot 2025-08-11 at 10 32 50β€―AM Screenshot 2025-08-11 at 10 34 50β€―AM Screenshot 2025-08-11 at 10 35 05β€―AM

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published