A full-stack healthcare management platform with PDF OCR (Google Vision), resource & document management, and predictive analytics. This repo contains both the backend (Express) and the frontend (Next.js) used by MediOps.
- PDF upload + OCR (Google Cloud Vision)
- Clerk authentication
- MongoDB data store (Mongoose models)
- Dashboard with analytics and prediction components
- Modern frontend (Next.js + TypeScript + Tailwind)
- Backend docs:
backend/README.md - Setup notes:
SETUP.mdandQUICKSTART.md
Follow these steps to run the app locally.
Prerequisites
- Node.js 18+
- MongoDB (local or Atlas)
- Google Cloud project with Vision API enabled (service account JSON)
- Clerk account for authentication
Backend
-
Open a terminal and install dependencies:
cd backend npm install
-
Create an env file from the example and fill in secrets:
cp .env.example .env
-
Start the backend in dev mode:
npm run dev
Frontend
-
In a separate terminal, install frontend deps:
cd frontend npm install
-
Add a local env file:
cp .env.example .env.local
add Clerk publishable key, NEXT_PUBLIC_API_URL (e.g. http://localhost:5000)
-
Start the Next.js dev server:
npm run dev
By default:
- Frontend: http://localhost:3000
- Backend: http://localhost:5000
See the .env.example files in backend/ and frontend/ for the full list. Key variables include:
- BACKEND: PORT, MONGODB_URI, GOOGLE_APPLICATION_CREDENTIALS, FRONTEND_URL, MAX_FILE_SIZE
- FRONTEND: NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY, CLERK_SECRET_KEY, NEXT_PUBLIC_API_URL
/backend # Express API, OCR integration, Mongoose models, uploads
/src
package.json
/frontend # Next.js (app router), components, pages, styles
package.json
SETUP.md, QUICKSTART.md, backend/README.md
- GET /health — health check
- POST /api/documents/upload — upload PDF (multipart/form-data, auth required)
- GET /api/documents — list documents (auth required)
- GET /api/documents/:id — fetch document details
- DELETE /api/documents/:id — remove document
See backend/README.md for full API docs and payload examples.
- Use a local MongoDB or MongoDB Atlas for easy setup.
- Ensure
GOOGLE_APPLICATION_CREDENTIALSpoints to the service account JSON for Vision API. - When adding new environment variables, update the examples in each
backend/frontendfolder.
Run tests (if present) inside each package:
Backend:
cd backend npm test
Frontend:
cd frontend npm test
- Backend: deploy to Cloud providers (Railway, Render, Heroku). Provide env vars and connect to MongoDB Atlas.
- Frontend: deploy to Vercel or Netlify. Configure Clerk redirect URLs and environment variables.
- Fork the repo
- Create a branch:
git checkout -b feat/your-feature - Commit and push
- Open a PR describing the change and any migration notes
Please follow the existing code style and add tests for new business logic.
ISC
If you get stuck, check:
SETUP.mdandQUICKSTART.mdfor environment-specific stepsbackend/README.mdfor API details
If you still need help, open an issue describing the problem and environment (OS, Node version, error output).
Updated: improved onboarding, shorter Quick Start, and clearer links to existing documentation.