β‘ 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
- 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.
- Automatic transcription of scanned documents using OCR engines like Tesseract.
- Structured text extraction to convert handwritten or typed notes into editable and searchable text.
- Efficient storage of both raw files and processed text in a relational database (PostgreSQL).
- Fast retrieval APIs to access patient notes anytime.
- TypeScript-first development
- Monorepo structure with Node workspaces
- Beautiful, responsive design built with Tailwind CSS and Shadcn UI
- Node.js 16+
- Npm/Bun
- Clone the repository
https://github.com/Sharmil001/lief-assignment.git
cd lief-assignment- Install dependencies
cd frontend && npm install
cd backend && npm install - Run the interpreter
npm run dev #rootCreate 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)Create a .env file in the frontend folder with the following variables:
NEXT_PUBLIC_API_URL="" #Backend API endpointlief-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.)
- 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
- 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
- Perplexity SDK - Unified AI interface for accessing multiple AI providers seamlessly
- Streaming - Real-time text formater & streaming interactive AI response
Build the frontend
cd frontend
npm run build###Backend (Render) Build the backend
cd backend
npm run buildMade with β€οΈ by the Sharmil Adroja
